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
- Download theย mini-sdkย package and extract it to c:\mini-sdk
- Download theย fsck.ext4ย binary and put it into c:\mini-sdk
- Connect your device to the PC using an USB cable.
- 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.
- Open a command prompt on the PCย by typing cmdย in the search and press enter.
- Type the following command in the command prompt to navigate to the extracted folder in step 1.
cd /d c:\mini-sdk
- Now enter the following command to push fsck.ext4 tool to your device.
adb pushย fsck.ext4ย /tmp
- Start the adb shell by typing the following command.
adb shell
- Give full permissions to the fsck.ext4 file by giving 777 as the permission set.
chmod 777 /tmp/fsck.ext4
- 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.
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
“error, device not found”
pretty much renders the rest of it moot.
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?
Thank it very helpfull on my HTC one e8
Glad to know! Thanks for the appreciation!
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.
Hi! Do these tweaks require root access to the phone? Also, after a factory reset, do these settings remain?
Thank you!
Yes, they require root access and will stick even after a factory reset.
Thank you, Rakesh!