HTC One M8 is the current flagship from HTC, and in our opinion is the most dazzling smartphone in the market with a full metallic design and aesthetic design. The M8 was released in the first quarter of this year with top-notch specs and stunning looks. However the true power of an Android smartphone can only be revealed when the device is subjected to some development. HTC M8 has vast developers community which strives to develop new custom roms, custom kernels, rooting and recovery methods etc…

Any sort of advanced usage of Android smartphone needs permission to modify the files in the System partition (/System) of the device. When formatting the /data partition while you’re testing any mods or roms on your M8, you might have observed some random reboots of the device. These random reboots might be a problem caused by the wp_mod.ko module which is responsible to disable Read/Write protection on your device. When this module is loaded too late and if anything changes before the module is loaded, you might have a corrupted /data partition on your device.

So whenever you’ll try to make changes to the /system partition your device reboots randomly. This means your device reboots whenever you try to remove, copy, move, edit any file in the system partition which is a serious issue for those who do a lot of modding. This issue leaves the following trace in the kernel log (last_kmsg.txt):


So, here we are to guide you on how to prevent these random reboots on your precious M8.

How to Fix Random Reboots on HTC One M8

  1. Download the mini-sdk package and extract it to c:\mini-sdk
  2. Download the fsck.ext4 binary and put it into c:\mini-sdk
  3. Connect your device to the PC using an USB cable.
  4. Boot your device in recovery mode
    • Power off your device.
    • Press and hold Volume Down button, and press the Power button to switch on your phone and release it quickly, but continue to hold the Volume Down button. This will boot your HTC One M8 into bootloader mode.
    • Press Volume down once to navigate to Recovery option, then press Power button to enter Recovery mode.
  5. Open a command prompt on the PC by typing cmd in the search and press enter.
  6. Type the following command in the command prompt to navigate to the extracted folder in step 1.
    cd /d c:\mini-sdk
  7. Now enter the following command to push fsck.ext4 tool to your device.
    adb push fsck.ext4 /tmp
  8. Start the adb shell by typing the following command.
    adb shell
  9. Give full permissions to the fsck.ext4 file by giving 777 as the permission set.
    chmod 777 /tmp/fsck.ext4
  10. Now move the file with proper permissions to the data partition. Type the following command:
    /tmp/fsck.ext4 -fn /dev/block/mmcblk0p47

This will fix your /data partition and you should see a similar output reflecting the success of the process.

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

That’s it, your /data partition is now fixed and you should no longer experience random reboots problem on your device considering that it was solely the issue.

Leave your feedback in the comments section below.



  1. Couldn’t get it to push but stages 8,9,10 seems to have put a stop to rebooting after sticking fsck.ext4 on an external card then moving it to /tmp using twrp, thanks

  2. Hello Sir , I tried doing it but still my phone is constantly rebooting. I am on marshmallow custom Rom on HTC one M8 , this problem started only when I flashed the custom ROM , do u have any other solution or reason why it is rebooting constantly?

  3. Thank you so very much. This solved my problem after i installed a custom rom on my device and it started rebooting when screen is off or not in power.

  4. Hi! Do these tweaks require root access to the phone? Also, after a factory reset, do these settings remain?

    Thank you!

This site uses Akismet to reduce spam. Learn how your comment data is processed.