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

Root How to stop HTC One M8 rebooting into recovery mode

Hezza1506

Lurker
I rooted my Dad's HTC One M8 a few weeks ago (following the instructions at http://htconeroot.com/htc-one-root/how-to-root-htc-one-m8/) in order to try and recover a file that he had accidentally deleted (all the recovery software seems to require the phone to be rooted). Afterwards, I couldn't get SuperSU to unroot the phone - it just kept sitting there saying "Uninstalling, please wait…", but I know that some people keep their phones rooted so I figured it would be okay to leave it like that and gave him his phone back.

This week he brought it back to me because it is asking to do the update to Lollipop 5.0 but whenever he tells it to update it reboots and comes up in recovery mode, meaning that it won't do the update.

I tried SuperSU again but it was still doing the same thing (I left it twice for over four hours each time) so I then tried going into recovery mode and using the file explorer to delete the SuperSU apk and any other files I could find. For some reason the SuperSU folder keeps reappearing in the file explorer but the app has disappeared from the app list. I have tried reinstalling it but when I go to run it, I get a message saying "There is no SU binary installed, and SuperSU cannot install it. This is a problem!"

I've seen someone with the same problem and people telling them to flash a stock recovery onto their device but I don't know how to do this. I tried downloading a recovery .img file and typing fastboot flash recovery blah blah into it but I get a message saying that 'fastboot' is not recognised as an internal or external command. I don't know if this means that I need to root the phone again but it took me ages to get all the files and everything back onto it for Dad last time, so I really don't want to clear it down again if I don't have to.

I am a total Android novice so any help will have to be step-by-step and spoken like you're dealing with a three year old! PCs I can do but I have no clue about Android.

Any help or advice much appreciated.

Thanks
 
Yes, the problem is indeed that you have a custom recovery, which will not install the official update.

According to the instructions in that guide you linked you used fastboot to root the phone in the first place. So you just need to "cd" to whatever directory you installed it in then use it as you used it before, only to flash your stock recovery image (assuming you have the right one). That message you got was saying that your PC didn't recognise the command, which means you were running it in the wrong place so it couldn't find the fastboot command you installed when rooting.

However, while you could do that, personally I'd recommend backing up the phone and using a ROM Upgrade Utility to return the phone cleanly to stock software, rather than "was rooted and then some of the files removed by hand". The Over The Air update is a patch, which assumes that you have completely stock software rather than software that's been modified and might still have some extras left behind. It would probably work ok, but it's also possible that you'd be left with some odd bug. The drawback of this is that it would indeed wipe the phone, and require setting up again.

The best thing in this case is to get advice from people who are familiar with the particular device. I know HTCs in general, but don't own an M8, so I'm going to move this thread to our M8 All Things Root section, since that's where you'll find people familiar with the files and procedures for this device.

Meanwhile, if you could tell us the current software version and whether it was bought from a particular carrier (i.e. might have carrier-modified software) that would be helpful. The information from the bootloader screen (hboot) could help with this.
 
Sorry for taking a while to respond - I've been away on business. Hadron, thanks for moving my query to a better location!

The bootloader screen says:

*** Software status: Modified ***
*** UNLOCKED ***
M8_UL PVT SHIP S-ON
HBOOT-3.19.0.0000
RADIO-1.22.21331147A1.29G
OpenDSP-v46.2.2-00564-M8974_FO.0811
OS-
eMMC-boot 2048MB
Oct 30 2014,18:12:36.2465

Does the phone need to be rooted in order for the stock recovery image to be flashed to it? If not, I'll have another go at following the steps I followed last time but with the stock image.

Alternatively, can anyone tell me the best way to ensure that everything gets backed up? Last time I lost the divert icon Dad had on his home screen (his car has a built-in hands-free kit for his old car so he had an icon on his screen that he clicked and it would then divert calls to his old phone) and have no idea how to recreate it, which is one of the reasons why I'm nervous of starting from scratch again.

What is a ROM Upgrade Facility and how would I use one?

Sorry for being an Android dunce!
 
Just spotted this. I'm guessing you installed the TWRP recovery from the htconeroot site, as that particular version (2.7.x.x) seems to wipe the OS version that should appear in the bootloader info you posted. Did you do anything else apart from root the phone, or is it still running the stock ROM/kernel?

There are a couple of bits of info it will be useful to know. Firstly, can you check Settings > About > Software information and post the software number, and then press More and post the build number - hopefully there will be something in one of the two entries.

The other bit of info that will be useful if we need to go further is your Dad's cid number. Is it a branded phone eg direct from Vodafone, or non-branded from somewhere like Carphone Warehouse? If you get hold of the phone can you boot the phone into the bootloader by powering off the phone, then press and hold power + vol down buttons - you should boot to the HBOOT screen. Then use vol down to select FASTBOOT in menu below where it says hboot - selection will be highlighted in blue - and press power button to select. You should be in FASTBOOT, then plug phone into PC and you should see FASTBOOT USB shown.

From where you downloaded and unzipped fastboot before on your PC - is it a Windows PC you have? - open a command prompt window, and type:

fastboot getvar all

and post what your cidnum is from the list of info that is returned in the cmd prompt window.

We can use both of these bits of info to find what we need to get the phone back to stock if the unroot process has messed things up a bit, and probably without having to wipe any data but only if all you did was install SuperSU.


Meantime for a backup option, first you can copy photos and other media to keep from the phone's internal storage across to a PC. Then try Helium backup (in Play store) and use it to backup as much as you can of apps etc - not sure if you can save the backup to micro sdcard but probably has that option, if it just goes to the phone's internal storage then copy that over to PC as well just in case.
 
Once again, sorry for the lengthy delay in getting back on here. I've been away so much with work that I haven't had time to take another look at Dad's phone, but it's still bugging him.

All I did was follow the instructions on that 'how to root' link. The recovery software I used was installed on my PC and I connected the phone to the PC and turned on USB Debugging so that I could try to recover the lost file. I'd previously used the same series of instructions to root my Samsung S5 and once I'd finished what I was doing, I simply used the unroot options within SuperSU, so I assumed I'd be able to do the same thing with Dad's phone, except that it didn't work, so I would assume it's still running whatever it was that I downloaded during the root process (sorry, I really am clueless!).

The software version is 3.29.161.9
The build number is 3.29.161.9 and then it says 'CL392065' release-keys after that

The phone isn't Vodafone branded on the outside but it did come direct from Vodafone and it's their logo that comes up on the screen when the phone is switched off or on.

The cidnum is VODAP001.

I should be able to check back again tomorrow so if you've replied before then, then it won't be so long before I next reply. If not, I'm out of the office Thursday and part of Friday so I'll try and get back on here Friday afternoon but it could be Monday before I have a chance to reply again. I promise I won't leave it too long, though!

Thanks again for your help.

Heather
 
Last edited:
Think we've got what you need. Some prep first, plus the downloads you need.

Edit: If you haven't done so already, backup/copy as much as possible from the phone onto PC.

As I'm not sure what version of fastboot the htconeroot provides, I'd recommend getting the mini sdktools download from this post:

ADB Guide (updated 2014/11/11)

which also has instructions for set up. Only saying this as the version of TWRP recovery they appear to use is out of date, so fastboot might also be.


1) Download the TWRP backup files you need from here:

https://mega.co.nz/#!bFNHGIxQ!PcbrsWiMGCdpPWsAcGYcadzFbVVQgD6Q_BvrrwrWtGg

plus the stock recovery image from here:

https://mega.co.nz/#!nZkCWZAL!djqZnzAlVfHslzWJxUxvW5cLKHdI9BIhr_uxzjFxbng


2) Next, do you have a micro sd card in the phone? If so I'd tend to save the TWRP backup files you downloaded to the micro sd card rather than internal storage. The main point to note is that you need to place the extracted files from the rar file in a folder, on internal or micro sd card, with the following name:

TWRP\BACKUPS\<your Dad's phone serial number>\<backup folder name>

Where:
You can find the phone's serial number with phone booted normally, in About > Phone identity. The <your Dad's phone serial number> folder you create needs to match this exactly.

For <backup folder name> give it a name you'll recognise eg Stock_Backup - this can be can be whatever you like, I tend to avoid using spaces just in case.

The key point is to make sure you have placed the extracted backup files in the above folder, so once we get TWRP flashed (see below), it will pick up the files for the restore. When you extract the .rar file I suspect you'll find a folder extracted with a name that ends in "... release-keys" it is the files in this folder that you need. You can just use this folder if you like, but as this will appear in TWRP as the backup name I think something called "Stock_Backup" is easier to recognise and deal with.

If you do this before the next steps, it'll save a bit of time.


3) Then download latest version of TWRP recovery from here, and save to folder on PC where you have the fastboot.exe:

http://dl.twrp.me/m8/

Check the md5sum for your downloaded file matches - the md5sum link is at the top of the website download page, and the mini sdk zip file includes a md5sum checker in it if you haven't got one.

If md5 checks out, reboot phone to bootloader and plug in to PC (so you see FASTBOOT USB on bootloader screen). Open a command prompt window in the adb/fastboot folder on your PC - if in Explorer hold shift + right click, and pick "Open command window here" from context menu.

Then type:

fastboot devices (to check fastboot connects to phone ok, it should return the phone serial number)

If it does, then type:

fastboot flash recovery twrp-2.8.6.0-m8.img (assuming you downloaded the latest TWRP)


4) Then we need to check you can get in to TWRP ok, on phone bootloader screen use vol down to highlight HBOOT from the menu and press power button to select. Wait until HBOOT finishes check (some green text appearing on screen), then select RECOVERY from menu using vol down and pressing power to select.

This should load TWRP. Then you want to do the restore of the backup you downloaded, so select Restore to get into the restore screen. Now if you created the backup folder with the downloaded files to Internal Storage you should see a backup listed here with the name that matches the <backup folder name> you gave it earlier. If you saved this to micro sd card, look for the line of text in restore screen that will say something like Internal Storage, press on it and then select External SD Card (or might be Micro sd card, can't recall off the top of my head) - it should be obvious which to select. You should then see the backup listed.

IMPORTANT STEP: When you Press on backup name, you should then see a screen with various partitions to restore selected (ticked), there should at least be Boot, System and Data. If you want to try and keep the phone set-up as it was for your Dad, make sure that Data is Unticked. Then at the bottom swipe the slider left to right to start the restore.

At this point, once restore has completed successfully, I would reboot phone and check it boots ok and you see the same set-up on the phone as before, before moving on to the stock recovery step. If something goes awry, you might have to go back in to TWRP and repeat this but include the Data partition as well.


5) On PC, copy the stock recovery image you downloaded to your fastboot folder, reboot phone to bootloader and plug in to PC (so you see FASTBOOT USB on bootloader screen). Open a command prompt window in the adb/fastboot folder on your PC - if in Explorer hold shift + right click, and pick "Open command window here" from context menu.

Then type:

fastboot devices (again just to check fastboot connects to phone ok, it should return phone serial number)

If it does, then type:

fastboot flash recovery recovery_3.29.161.9.img

This should be you back to 100% stock rom/kernel and recovery i.e. unrooted.


6) Then if you want to, the last part is just a case of relocking the bootloader and the phone should be set for OTA updates. Command for this from PC is:

fastboot oem lock


Let us know how you get on.
 
Last edited:
Wow! Lots to work on there. I'm not sure if I'll have time to get to that today because I'm now flying down to London at 1:30 but I've seen your message and I'll certainly look at this on Friday if I don't get onto it today.

I'll let you know how I get on.

Sincerest thanks,

Heather
 
It looks like a lot but you'll find you can rattle through it pretty quickly. No rush, it'll still be here.
 
Right, all done. Thanks a million.

I just want to check whether I should be concerned about the couple of places during the oem lock where it says it failed? This is what is says in the command prompt:

C:\Users\gmsuser\Downloads\fastboot\fastboot oem lock
...
<bootloader> [PGFS] partition_update_pgfs: pg1fs_security
<bootloader> TZ_HTC_SVC_ENC ret = 0
<bootloader> [PGFS} partition_update_pgfs: pg2fs_sec_recovery
<bootloader> Lock successfully...
<bootloader> deinit_lcd
<bootloader> mipi display off
<bootloader> mdp_clock_off
<bootloader> turn off fd8c2308 failed 1 times. Try again...
<bootloader> disable_mmss_clk done
<bootloader> pll1_disable done
<bootloader> TZ_HTC_SVC_DISABLE ret = -1610744452 (0x9FFDFD7C)
<bootloader> [CRITICAL] SPMI write command failure: cmd_id = 0, error
<bootloader> = 4
<bootloader> [CRITICAL} SPMI write command failure: cmd_id = 0, error
<bootloader> = 4
<bootloader> [INFO] Rebooting device
FAILED (status read failed (Too many links))
finished. total time: 1.191s

There are four failures in that: turn off fd8c2308, SPMI write command x 2 and the last one about too many links. Are any of those something I need to be concerned about?

Other than that, it seems to have worked. I've told the phone to go ahead and do its software update and instead of returning to the bootloader screen as it has been doing since the root, it seems to be actually installing the update. I'll know for sure in a few minutes but it's looking good.

Many, many, many sincere thanks. You are amazing.

Heather
 
np - I'm really not amazing - but thanks anyway :)

The errors I didn't expect, and I won't pretend to know for certain but they usually indicate either that phone was already relocked anyway, or can sometimes be caused by PC drivers, or something else. I'd need to do some searching.

Before accepting the update, think I probably know the answer but do you know if the bootloader screen had "Relocked" at the top? Found a few threads with similar errors on other forums, and they have successfully run an RUU - basically the same as the OTA update you're applying now. I might live to regret saying this but I think you'll probably be ok with the OTA. Let us know if it updated successfully, and all is ok.
 
Back
Top Bottom