Tuesday, September 30, 2014

How to: Fix a random reboots on the HTC One M8


Some time ago I described a method to format the /data partition on the HTC One (M7) - How to: Fix a corrupted DATA partition on the HTC One. This method is suitable for more HTC devices (all with EXT4 support) and with the mkfs.ext4 tool you can format system and cache partitions as well. All you need to know is the proper /dev/block/mmcblk0pXY number of the partition you want to format.

However, formatting the partition always means that your data will be gone. On the HTC One M8 I noticed a problem, most likely caused by the wp_mod.ko module (module to disable system R/W protection). When the module is loaded too late and anything ever gets changed before the module is loaded the file-structure of the /data partition might (and probably will) get corrupted. As a result your device will reboot each time you'll try to make and change on the /system partition (even if mounted as RW). So removing, copying, moving, re-naming or editing any file on a system partition will result with the following message in the kernel log (last_kmsg.txt):


Formatting the /data partition is not the best idea for some and it's not needed in most cases.

Repair Process
  1. Download this mini-sdk package and extract it to c:\mini-sdk
  2. Download this fsck.ext4 binary and put it into c:\mini-sdk
  3. Connect your device to the PC
  4. Boot your device in recovery mode
  5. Open a command prompt on the PC (cmd.exe), type and confirm each command with ENTER:
  6. cd /d c:\mini-sdk
  7. adb push fsck.ext4 /tmp
  8. adb shell
  9. chmod 777 /tmp/fsck.ext4
  10. /tmp/fsck.ext4 -fn /dev/block/mmcblk0p47

This will fix your /data partition and you should see the following output (numbers in the last line will be different in each case):

e2fsck 1.42.9 (28-Dec-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p47: 19050/712704 files (2.7% non-contiguous), 2320338/2850816 blocks


Your /data partition is now fixed and you should no longer experience random reboots problem on your device (assuming that the corrupted /data partition was the source of the problem). Keep in mind that the fsck.ext4 -fn command can be used to check other EXT4 partitions on any device that has EXT4 file-system structure. All you need to know is the partition name or block number.


Do you have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) below this post!


For latest news follow Android Revolution HD on popular social platforms:

6 comments:

  1. Jadwal Sambung Ayam SV388 3 Maret 2019 - Minggu, Medan 3 Maret 2019 – Pada Hari Tersebut Akan Di Laksanakan Berbagai Pertandingan Sabung Ayam Secara Live di Arena Sabung Ayam Thailand.

    Situs Judi Sabung Ayam Online SV388 Merupakan Situs Judi Asal Thailand Yang Sangat Terkenal Dengan Permainan Sabung Ayam Yang Fair dan Menghibur Para Penonton Judi Sabung Ayam.

    Untuk Info Lebih Lanjut Bisa Hub kami Di :
    wechat : bolavita
    line : cs_bolavita
    whatsapp : +628122222995
    BBM: BOLAVITA

    ReplyDelete
  2. Wow! After all I got a web site from where I can actually get valuable information regarding my study and knowledge.| 스포츠토토티비

    ReplyDelete
  3. Hi, you look like you’ I want to join you.

    ReplyDelete
  4. Exceptionally marvelous !!! When I look for this I discovered

    ReplyDelete
  5. Personally I think overjoyed I discovered the blogs.

    ReplyDelete