• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Surprise Boot Loop

Hi,

My european One M8 suddenly rebooted a few days ago while sitting idly on my desk next to me, for no apparent reason. It went straight into a boot loop where it vibrates, turns screen on then shows the green HTC logo. Screen would then go blank, then back to HTC logo again, over and over. I ran the battery down, restarted on AC and the problem was fixed, only to happen again an hour later. Now I can't boot into the OS, but can get to bootloader and stock recovery menus using button combos. The phone is the unlocked version, and is S-OFF using sunshine about a year ago while I played around with custom roms. Since then I've gone back to stock firmware/OS using RUU, and updated OTA to the latest android a few weeks ago. Phone worked fine since then.

I've tried using the following RUU + a factory reset, but the problem persists:
0P6BIMG_M8_UL_M60_SENSE70_MR_HTC_Europe_6.12.401.4 _Radio_1.29.214500021.12G_20.72.4196t.01_release_4 64360_signed.zip

I've been desperately looking around for pointers and re-locked my bootloader, then tried RUU again. Still didn't cure the problem, and may well have been a bad idea I guess, as now I can't seem to unlock the bootloader again.

Here's the output from "fastboot getvar all":

(bootloader) version: 0.5
(bootloader) version-bootloader: 3.19.0.0000
(bootloader) version-baseband: 1.29.214500021.12G
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) version-main: 6.12.401.4
(bootloader) version-misc: PVT SHIP S-OFF
(bootloader) serialno:
(bootloader) imei:
(bootloader) imei2: Not Support
(bootloader) meid: 00000000000000
(bootloader) product: m8_ul
(bootloader) platform: hTCBmsm8974
(bootloader) modelid: 0P6B10000
(bootloader) cidnum: 11111111
(bootloader) battery-status: good
(bootloader) battery-voltage: 0mV
(bootloader) partition-layout: Generic
(bootloader) security: off
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: 76df2b54
(bootloader) hbootpreupdate: 11
(bootloader) gencheckpt: 0

Any ideas very very much appreciated!
 
Is your bootloader definitely locked? How did you try to install the RUU, as I'm assuming it wasn't successful? RUU itself looks OK but could be a bad download. Did you try the 0P6BIMG method as it definitely works - can point you to a previous post to cover this later.
 
Hiya, yeah the bootloader was definitely locked but managed to unlock it again via HTC dev so all OK there now. I tried to install the RUU first via fastboot, then via 0P6BIMG method on the sd card. Both appeared to work successfully, but when rebooting afterwards, same boot loop :(

I've tried the following 3 RUUs now via the 0P6BIMG method, all appear to work successfully but don't fix the problem:
0P6BIMG_M8_UL_K444_SENSE60_MR_HTC_Europe_3.28.401.9_R_Radio_1.22.21331147A1.29G_20.67.4196.01_release_402839_signed.zip
0P6BIMG_M8_UL_L50_SENSE60_MR_HTC_Europe_4.16.401.10_Radio_1.25.214500021.06G_20.68.4196t.01_F_release_417809_signed.zip
0P6BIMG_M8_UL_M60_SENSE70_MR_HTC_Europe_6.12.401.4_Radio_1.29.214500021.12G_20.72.4196t.01_release_464360_signed.zip

When they install they do say that the following are skipped:
sbl1 - bypass-S
tp - bypass
 
Hmm, have you tried taking the SD card out and then rebooting? Wonder if the bootloader is OK. Can you get the phone in to RUU mode:

fastboot oem rebootRUU

Maybe need to try a firmware only flash, then get TWRP back on and the restore a TWRP backup if you have one?
 
Yeah I've tried booting it with no SD card, same problem. It'll go into RUU mode no problem - how do I do a firmware-only flash? As it happens I do have a single TWRP backup I took just before updating it to latest android 6.0. Should I RUU back to android 5.0, then install TWRP and try the restore? Is there any particular version of TWRP I should use?
 
No need to try another RUU. I'd get latest TWRP back on, and then try a restore. Can point you to firmware and a good guide - but out tonight so be tomorrow.
 
Something not quite right as the 6.12.401.4 RUU definitely works installing via sd card and HBOOT (have pointed 3 others to this who confirmed they were successful using it). Did you download from here:

https://www.androidfilehost.com/?fid=24369303960687057

and check the MD5 in case it was a bad download?

Failing that, I think this guide is pretty good at setting out the steps for firmware flash:

http://forum.xda-developers.com/htc-one-m8/general/vomerguides-m8-bootldr-unlock-s-off-t2800727

you can jump down to Section 3 as you've covered the rest.

You can find firmware packages here:

https://docs.google.com/spreadsheets/d/1aNd_nm4Em1wamRLFT7qHM2c3O9_sg_H3ztBrGq1u9Ws/pubhtml

you want the Combined, No Wipe Zips (just in case your internal storage is still ok). These also include latest TWRP. I'd maybe be tempted to go back and flash 4.16.401.10, and then 4.16.401.13 and then the 6.12.401.4 just in case - you will need to reboot bootloader after flashing each package.

Do check the MD5 of each download before flashing anything (this is firmware after all so there's more risk).

Do check scroll back up and check the results of the flashing process in the command prompt window before rebooting the bootloader. You are looking for anything that says Failed during a (RW) process, there will be some elements that will get bypassed - this is normal as there are some elements that are model specific and so just not for your phone.

Mods: if any of you happen to drive by, this would be better moved to the HTC One M8 Root sub-forum thanks
 
That's the same 6.12.401.4 RUU I've been using, and the md5 checks out. Tried again via the 0P6BIMG method and same result, appears to complete successfully but the boot loop remains.

I've downloaded each of the firmwares you suggested and applied them in turn, rebooting to bootloader each time. MD5s were correct on all three files. I did notice while applying them that the following errors are shown during sig checking, not sure if these are normal?

(bootloader) start image[sbl1] unzipping & flushing...
(bootloader) [RUU]UZ,sbl1,0
(bootloader) [RUU]UZ,sbl1,100
(bootloader) signature checking...
(bootloader) verified fail
(bootloader) ..... Bypassed
(bootloader) current_image_number=4

(bootloader) start image[sbl1] unzipping & flushing...
(bootloader) [RUU]UZ,sbl1,0
(bootloader) [RUU]UZ,sbl1,100
(bootloader) signature checking...
(bootloader) verified fail
(bootloader) ..... Bypassed
(bootloader) current_image_number=5

(bootloader) start image[sbl1] unzipping & flushing...
(bootloader) [RUU]UZ,sbl1,0
(bootloader) [RUU]UZ,sbl1,100
(bootloader) signature checking...
(bootloader) verified fail
(bootloader) ..... Bypassed
(bootloader) current_image_number=7

The rest all appeared to install successfully or were just bypassed. Rebooting after the final one is installed - same boot loop.

Before I saw your reply this morning I was trying to restore my previous TWRP backup, but having problems. TWRP will either fail on md5 checks when in fact the files are fine (I've checked the md5s manually and checked against those it saved during the backup), or if I turn md5 checks off it'll crash with a garbled screen within a few seconds of starting the backup. This is with latest TWRP. With version 2.7.0.2 (I think the one I made the backup with), md5 still fails but ignoring that gives "unable to mount /data" errors.

Any ideas of what to check next?

Thanks so much for your help with this, really appreciate having some proper knowledge behind me!
 
No problem, this is strange though. It's almost as if one of the phone buttons is stuck. Those bypassed checks in the firmware flash are normal - there's only one sbl1 image for each phone model (I think). Yeah it looks like that TWRP backup you have is corrupt unfortunately, although it may just be the boot or system img - we might be able to try something with the data img later. I do recall one of the 2.7.x.x TWRP versions having problems but can't be sure it was that one or not.

So firmware should now be fine (I just flashed the second two of these recently so know they are ok).

Latest TWRP is on, or can be flashed again easily.

So next issue is getting a clean TWRP 6.12.401.4 backup - here's one I made earlier :) :

HTC One M8 unusable!

I know it's one of my posts from a different thread, but it'll save me re-typing it here. If you go through Step 1), 2), 3) if you're still on the old TWRP and 4) and see if it works. These steps cover downloading a stock TWRP backup, extracting the relevant backup image files to right folder on external SD card, booting TWRP, restoring and then hopefully a reboot. Maybe worth removing sim card for reboot this time just in case - you never know.

If the same reboot occurs, press and hold power + vol up to force a restart, once phone is off fully (totally black screen) press and hold vol down - this will at least get you back to bootloader screen, so you don't have to run battery down.

Oh yeah, don't do 5) or 6) - or at least not yet.
 
Hmmm I'm starting to think something may be seriously screwed here. Following your steps, flashed TWRP 2.8.7.0 just to be exact with your instructions, booted into recovery, TWRP loaded fine. Tried to restore the TWRP backup you pointed me to and the same thing happened as with mine, screen went garbled after a few seconds and now blank... Not sure whether to reboot it or wait?
 
Nope, not seen this TWRP problem before but it's not the recovery image itself since you've reflashed it a few times. What happens, can you catch a screen shot and post it?

Given what you've tried with the various RUUs, firmware flashes and a clean stock TWRP backup, I think this is pointing to a more serious hardware failure maybe with one of the system partitions. Would be consistent with the sudden shutdown as well I guess - rare but it does happen.

We're getting close to the limit of my knowledge here as well, so I'm going to give a couple of the other guys a shout and see what they think. How old is the phone, just wondering if it is still under warranty?
 
Here's a few photos of TWRP failing - tried it again this morning and it actually got slightly further, to about 28% restoring system before it failed with an ExtractTarFork() error 255. This same error happened a few times while trying to restore my own backup a few days ago as well. When it crashes it sometimes restarts itself it seems, but the TWRP screen then has artifacts all over it.

When TWRP appears to restart afterwards:
twrp-fail3.jpg


Sorry the pics are wrong orientation, the uploader on this site flips them around for some reason.

I should mention that I had basically this same behaviour with TWRP 3.0.0.1 trying to restore my own backup.

I bought the phone boxed and (advertised as) new from eBay on feb 23rd last year. How long is the warranty? Sucks if it's a year, as it'll be just out I guess.

Thanks again for your help!
 
Last edited:
Wow, ok. Ideally we need to see if we can get the TWRP log file but not sure if we can. First things first, can you reboot to bootloader, and connect to PC in FASTBOOT and type:

fastboot erase cache

(just in case). Then boot to TWRP and then in Advanced launch the ADB and try:

adb pull /tmp/recovery.log

In the meantime, the restore of the boot and data images looks to have completed far too quickly. This is a long shot but we should also try a complete reformat of the partitions in TWRP.

In TWRP if you go in to Wipe, then Advanced Wipe. Towards the bottom of the screen there should be an option to 'Repair or Change File System' press that. In the next screen work your way through the partitions selecting each in turn - system, data, cache - and try the Repair first making sure the format is set to ext4 (sorry I'm trying to remember this off the top of my head so the steps might not be exact but it should be fairly straightforward). If not try the Change File system but select ext4.

After the repair/reformat i'd reboot to bootloader, then back to TWRP and then try the stock restore again.
 
This defo looks bad :( "fastboot erase cache" seems to have worked OK but asked whether I meant to format rather than erase (is is not formatted perhaps?):

C:\Program Files (x86)\HTC\HTC Sync Manager\HTC Sync>fastboot erase cache
htc_fastboot v3.0.9.2 (2015-05-29)
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 0.284s]
finished. total time: 0.284s
htc_fastboot finished. total time: 0.398s

TWRP errored trying to repair /system (first partition I tried) with similar display artifacts. I didn't try actually reformatting it yet:

twrp_segfault.jpg



I pulled the recovery.log via ADB - I've uploaded the whole thing but the pertinent lines appear to show that it caused a seg fault:

I:checkpartitionlist list '/system;'
I:checkpartitionlist wipe_path '/system'
I:Set page: 'checkpartitionlist'
I:getpartitiondetails list '/system;'
I:getpartitiondetails wipe_path '/system'
I:Set page: 'partitionoptions'
I:Set page: 'confirm_action'
I:Set page: 'clear_vars'
I:Set page: 'partitionoptions'
I:Set page: 'confirm_action'
I:Set page: 'action_page'
I:eek:peration_start: 'Repair Partition'
Repairing System using e2fsck...
I:Repair command: /sbin/e2fsck -fp /dev/block/mmcblk0p45
Segmentation fault
E:/sbin/e2fsck -fp /dev/block/mmcblk0p45 process ended with ERROR=139
E:Unable to repair '/system'.
E:Error repairing file system.
I:Set page: 'action_complete'
I:eek:peration_end - status=1
I:Set page: 'clear_vars'
I:Set page: 'partitionoptions'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'advanced'
I:Set page: 'sideload'

Should I just try and go through reformatting each partition anyway? It can't break things any further than they already are I guess?
 
Last edited:
The 'fastboot erase cache' is fine. I was hoping to get the log of the failed restore, but good that the adb pull command worked at least.

Yep go through the format partitions - you can see from screenshot that TWRP has failed to mount the cache partition so something wrong with partition(s) level.
 
I managed to format cache, data, then system. Restoring the TWRP backup caused it to crash again though, and restart so I couldn't get the log file. Tried a few more times and eventually it failed without crashing, but the screen was screwed again. Managed to get the log file this time.

Log doesn't seem to show much other than failing during untar? By the looks of what's been going on on the screen, it fails at different points each time.
 
Last edited:
Did you have a TWRP theme loaded at all, that could be messing up the display?

Like you say the problem does look to be TWRP unable to extract the data img from the backup - for the stock TWRP backup you downloaded did you go for the one on androidfilehost? Could be a bad download so try downloading the AFH one and check the MD5, then a restore.

I admit I am clutching at some straws now though, you might have to contact the TWRP team through IRC ( https://twrp.me/about/ ) but I hope one of the more experienced guys I've PM'd will chime in (although they are in US so we'll need to wait and see).
 
Not using any themes that I know of, just the standard TWRP. I downloaded the TWRP backup linked to in the guide you pointed me at, hosted at mega.nz linked from XDA forums. I'll try one from AFH and report back :)
 
Could you perhaps point me in the direction of the correct TWRP backup from android file host? Can't seem to find one.

EDIT: Actually found it now, thanks!
 
Last edited:
Unfortunately, I got the same results with this one as well:
HTC_M8_twrp_DE_ota_6.12.401.4.zip

MD5s checked out fine.
Error happened during or after dd of /boot according to log file:
Restoring 3 partitions...
Total restore size is 2330MB
I:Restore filename is: boot.emmc.win
I:Restore file system is: 'emmc'.
Flashing Boot...
I:Flash command: 'dd bs=8388608 if='/external_sd/TWRP/BACKUPS/<serial>/6.12.401.4/boot.emmc.win' of=/dev/block/mmcblk0p42'
2+0 records in
2+0 records out
16777216 bytes (16.0MB) copied, 1.266766 seconds, 12.6MB/s
I:dd bs=8388608 if='/external_sd/TWRP/BACKUPS/<serial>/6.12.401.4/boot.emmc.win' of=/dev/block/mmcblk0p42 process ended with RC=0
E:twmtp_MtpServer::mtppipe_thread unexpected read_count 0

Going back to an earlier question, do you know how long the standard warranty is for the One M8? I guess it'd be void anyway due to the unlocked bootloader etc.

Thanks for asking the other guys as well btw :)
 
Last edited:
Are you in UK or W Europe at least? If bought new and you are the original purchaser then it's 2 years from date of purchase.

If it comes to it all I would do is flash stock recovery back on, then relock the bootloader before returning it to HTC. I wouldn't worry about the s-off element, but you could also revert back to s-on as well if you wanted to. After all you had a sudden failure and it just boot loops now, so you can't do anything with it.
 
Yeah I'm in Scotland as well :) It was bought off eBay and was advertised as new, but I couldn't really say I was the original purchaser I suppose. I guess they might be OK with that though if/when I contact them. As it appears to be a hardware problem it would seem fair enough for them to sort it under warranty.

Just waiting to see if the other guys you contacted weigh in now then?
 
Back
Top Bottom