How to Unroot the HTC One M8 (Complete Guide) (Video)
It seems that a lot of people keep asking me for a how to unroot for the HTC One M8. A surprising amount actually. A quick Google search answered why; there is no complete guide for the process. Instead, there are pieces of the unrooting process scattered across the web making for a confusing and labor-intensive hunt to just get the device back to stock. After seeing that, I figured I’d try and bring it all together in one, more cohesive step by step how to and even do a video on it.
There are a few things to keep in mind, however, before doing this procedure. The main thing being that if you used the HTC method to unlock your bootloader (like I did) that doing this will get you back to stock, BUT will still show in bootloader mode that you were rooted at some point (indicated by the “relocked” message at the top) so technically your warranty will still be voided. Honestly, in my experience however, I’ve never had HTC deny my warranty for a rooted device as long as the issue wasn’t directly caused by rooting (i.e. the volume button falls of the device or the sim card tray melts). The voiding of the warranty is simply to stop you from messing up your phone’s software and then trying to get HTC to fix it for you.
With that said this procedure will unroot the device, flash the stock firmware and recovery image, and get it back to an out of box state (minus that flag saying you have altered the software previously) so any software issues you were having will be solved and would negate needing to send the device in for warranty if that was your reason for doing so. Make sense?
Ok, good. Without further ado, here we go.
In this procedure we’ll be using Hasoon’s All-in-One toolkit to help automate the process of relocking the bootloader of the HTC One M8, unrooting the device, and some other aspects where it makes things a bit quicker.
I. Before You Begin
1. This will work on all models of the HTC One M8 (AT&T, T-Mobile, Sprint, Verizon, and International Models).
2. Make sure your battery is over 75% charged to ensure it doesn’t die unexpectedly during this process.
3. This will erase all the information on your device, so be sure to save anything you want to keep to your computer before continuing.
4. This only works for PCs.
5. On the HTC One M8, go to Settings > Battery Manager > Turn OFF Fastboot.
II. Download and Install the Toolkit
1. Head to the developer’s page here and download the latest version of the toolkit you see on that page and save it to your desktop.
2. Download WinRar and install that so you can extract his toolkit if you don’t have a way to extract .rar files already.
3. After installing WinRar, right-click the toolkit .rar file you downloaded earlier and select extract all.
III. Get your CID and Version Number
1. Open the toolkit.
2. Click on Getvar All under Commands and click Do Command.
3. After the device reboots into bootloader mode, close the first command prompt and you will see a new command prompt with a bunch of info. Write down the “version-main” and the “cidnum”.
IV. Flash the Stock Nandroid Backup for your HTC One M8
1. Head to this helpful post on XDA, find the nandroid backup for your CID, and save it to your desktop.
2. On the device, using the volume buttons, select reboot and tap power to choose it to boot into regular Android so we can transfer files to the phone.
3. Extract the Nandroid backup on your desktop.
4. Copy the new Nandroid folder into the correct folder on your device’s internal storage:
/clockwordmod/backups/
or
/TWRP/backups/
5. Unplug the device.
6. Turn off the phone.
7. Turn it back on by holding down volume down and power.
8. Using the volume keys to navigate and power to select, select recovery.
9. Tap on Restore in recovery then choose the backup we just placed on the device. and let it restore it.
V. Unroot the HTC One M8
Some backups are not rooted and so you can skip this section, but once in a while they are. To unroot them after flashing them do the following:
*If TWRP ever asks you if you want to root the device, say no.
1. Download this file and save it to your desktop (do NOT extract it, leave it as a .zip).
2. Plug in your phone via USB.
3. Transfer the .zip file to your device’s internal storage.
4. Unplug the device.
5. Turn off the phone.
6. Turn it back on by holding down volume down and power.
7. Using the volume keys to navigate and power to select, select recovery.
8. Tap Install zip.
9. Choose the unroot .zip file and install it.
10. Tap reboot system now.
VI. Flash the Stock Recovery
1. Go back to the XDA thread from above and find the latest recovery with your same first two numbers in the ID (see video for details) and download it to your desktop.
2. Rename it to recovery.img (make sure it’s not recovery.img.img).
3. In the toolkit, select Your Own Recovery under the Flash a Recovery section and click Flash Recovery.
4. Wait for the device to reboot into bootloader, then close the first command prompt window.
5. Select the recovery.img and click OK.
6. Wait for it to flash.
VII. Remove Tampered (Optional)
You can also remove the tampered flag from the device according to this post here. Do that procedure before if you want to do it as it requires S-Off to do.
VIII. Return to S-On
1. Select reboot on the device with it still plugged in using the volume buttons and power to select it.
2. Select Return to S-On in the toolkit under Commands and click Do Command.
3. Wait for the device to reboot into bootloader, then close the first command prompt window.
4. Then your device should say S-On on the device now.
IX. Relock the Bootloader
1. With the device still plugged in, select Relock the Bootloader under Commands and click Do Command.
2. Wait for the device to reboot into bootloader, then close the first command prompt window.
3. When the device reboots, turn it off.
4. Turn it back on by holding down volume down and power until you get to the bootloader screen.
5. It should say relocked at the top of the device.
All done!
this doesnt get rid of tampered :/. ive now spent over 6 hours on this damn unrooting thing. so frustrating
Damn, reading the intro of this article would have saved you a lot of time then.
Unfortunately, there is no surefire way to remove the tampered, but also in the intro, it’s not necessary. HTC is usually pretty good about fixing any non-software issues even if the device is tampered.
What exactly is the reason you are trying to unroot? Maybe I can help you with the end goal instead of just trying to remove tampered?
thank you for your reply. what im trying to accomplish is to just send in my phone. as stock as possible. I cracked my screen. am going to send it in. I just dont want much proof that it has been messed with. the gentleman over the phone did tell me that they would do some diagnostic tests.
If the screen is cracked that shouldn’t be effected by having root so I’d assume you’d be fine. Let me know what happens!
I’m pretty curious how this went. I’ve got the same situation with the cracked screen and I’m about to send it in….
Did they give you any trouble?
I havent sent it yet. if you do before me. please let me know. I also have a camera defect so im gonna take it to att and if its covered
Thank you for this.
By the way on step V number 1(1. Download this file) you didn’t include the link.
I tried to do the steps by reading but had to see the video to know where to find the file.
Nevertheless great video and thank you.
Thanks for that! Adding it shortly.
Excuse me but they don’t have my cidnum and version-main right now, can I follow you some other way or do I need to wait? My is cidnum : VZW__001, Version-main: 1.55.605.2
Hey thanks for making the video but I’m also having a problem. I have a rooted htc one m8 (TWRP) on sprint and there has recently been a OTA update that come out. I would like to install it and I really don’t mind if data or root are wiped, I just want to be able to update. Only problem is, when I try to install it, TWRP blocks it by just taking me to its menu. I did some google searches and found that I could unroot and flash stock rom, which lead me here. I saw some of the other guides and frankly, I am failry new to the whole rooting processes and all of the different terminoligy and can’t figure out how to get this update. I don’t necessarily need to unroot, I just want to be able to have the OTA updates. My final question is, is there any possible way to get this OTA update? I got stuck on #4 where I couldn’t find my CIDNUM of SPCS_001. Any ideas on what I could do?
@carsontuttrup:disqus Firstly, thanks for ending up on my site. To answer your questions, you need to unroot to get OTA’s from Sprint, but if all you want is the latest version of Android or whatever they are pushing out, you are better off just flashing a custom ROM that is based on that version (you can even find ones that are essentially stock ROMs just with root enabled). I suggest you do that instead. The only reason you would want to unroot is if you had a warranty issue or just were done with root and ROMs, etc.
Okay, thanks for responding! So essentially I should just flash any ROM I want with the updates applied to it? Like in your video with the flashing custom roms tutorial, but there is only one ROM. Also, where would I find these types of roms? I’ve only seen google play, The harmen/kardman, and the viper one on your website archive list, does this mean the ROMs do not exist yet? Also, due to my devices’ CIDNUM, does that mean unroot is unavailable at this time for me? Thanks for all the help, I really appreciate it!
Correct. There should be a few of them here on XDA (http://forum.xda-developers.com/htc-one-m8/development) or you can wait and we’ll be doing a big update to our ROM repository over the next week :/
As for the unrooting, that is correct. You can send a message to the thread’s creator and see if he can locate it for you though.
Happy to help! Good luck!
Alright! Thank you!
My CID Number is SPCS_001 and its not up there. What should I do to unroot my phone? I’ve Tried everything
Reach out to the guy running the thread via reply on the thread or PMing him and see if he can find it for you.
Please help!
It writes this^
Thats all.
What I must to do?
Means your device isn’t in the proper mode or you don’t have he proper drivers installed. Use the toolkit to install the drivers and try again.
Everything was working great, but I got to the step where you flash the stock Nandroid kernel and it’s not showing up at all. I created a folder under TWRP called “backups”, and put the downloaded folder in there. Nothing. Any ideas?
Boot into recovery and perform a backup. Then when its done look on the device’s storage from the computer and put the folder for the stock backup in that folder instead of creating your own backup folder.
Just to add another thing.. when you perform a backup in TWRP to create the folder.. look if it’s creating that backup in “Internal Storage” instead of SD Card..mine was creating by default in SD (looks like a dumb statement..but someone might forget to look that).
Best regards
Ok so Im having some problems getting my CID number. All the info seems to appear except the version main. See screenshot. Any ideas why this is happening and how to resolve the issue?
That’s very odd honestly. I’m not sure why it would show blank. You can try running the command manually via adb from the toolkit.
I’m having the same issue. Where under “settings – about” would i find “version-main”
Well I sorted it out. My version main is viewable in the settings/about and that seems to work.
Perfect thanks for reporting the alternative.
How doI get to settings/about
for those who cant find it in about. About -> software information -> more, in more its the number under build number.
what to do if there is no about under build number
Your website is pretty awesome, very helpful i have rooted my cousin’s htc m8 using your website and now he wants it unrooted i will be unrooting it easily i believe since your guide is so freakin easy to understand Big thumbs up mate ,Cool guy keep up the good work. 🙂
Thanks! Really appreciate it! Happy to help!
PLEASE I NEED SOME HELP!
I JUST HAVE UNLOCKED THE BOOTLOADER ONLY, i didnt root the phone. In the bootlaoder just say i have only “UNLOCKED”
if i wanna relock the bootloaderi, i have to make all the steps or i just follow the step ” IX”
Just do the last section and relock the bootloader.
I have done,thank you very much!
Now relocked its the same like locked?
Now i will able to recive the android updates right?
Correct.
Sorry im getting nervus and i still have some doubts.
In the tutorial of “how ot root htc one m8” of this website i just have arrived in the step to “unlock bootloader”.I dindt install any custom recovery,i didnt install any custom rom and i didnt root it.
then i saw that it is coming the now firmware update and i wanna recive it.
So i just relock the bootloader following the step “IX” on this tutorial.
Im from spain and i have the internacional version of htc one m8
i will recive the update like if i didnt unlock the bootlader in the beggining?
Sorry from my bad engilsh and thanks for youre help 😀
My phone has been bugging out! tried to do a factory reset and it made it worse. so now im trying to follow this guide. I used your guide for rooting the phone. but when i try to do Getvar all. the cmd window says the AIO kit is not recognized as an internal or external comand,operable program or batch file..
Means you aren’t in the right folder and it can’t find the file to run the command. Make sure you follow the steps exactly when extracting and copying files etc.
I rooted my htcone m8 using a mac pro (there’s a video on youtube for mac users). So, I don’t know if its because I rooted my phone in a different way or what.. but when I connect my phone to the pc and press ‘gevtar all’ do command, and the command prompt window opens, it says ‘”c:users…” is not recognized as an internal or external command, operable program or batch file’
PLEASE HELP. This is really frustrating >_<
Means you are in the wrong folder and it can’t find the command. Carefully go back in the procedure and make sure everything is in the right place.
But I did try with the folder in the desktop, like you did in the tutorial.
Oh, sorry didn’t realize you were in the toolkit when it gave that error. Try uninstalling and reinstalling the toolkit.
Otherwise, if that doesn’t work, reach out to the toolkit developer on Twitter or on the xda thread to see if he is aware of the issue and how to fix it.
Thanks for replying 🙂
Thank you very much for your guide..I’ve used it and it worked like a charm.
Best regards
PLEASE I NEED SOME HELP!
I JUST HAVE UNLOCKED THE BOOTLOADER ONLY, i didnt root the phone. In the bootlaoder just say i have only “UNLOCKED”
if i wanna relock the bootloaderi, i have to make all the steps or i just follow the step ” IX”
Is if possible to set the bootloader to locked instead of relocked
Thank you so much for guide!! It’s the best I found for rooting and S-off my HTC one. I have sim unlocked it too (it was Sprint). But I have a question : if I unroot my phone (I need to unroot for security reasons to install BES 10 at work) will it remain sim unlocked?
Thx again
fe
You are welcome! This shouldn’t effect a SIM unlock. Just keep the code you used to unlock it and reuse it if it does relock (but again it shouldn’t).
Pardon me sir in.
– I no find version main. i find that number of software is that the same !!!! 1.54.771.9
– BUT i dont find it in : HTC One M8 Stock Nandroids !!!!! i cant change with another !!!!! plzzzzz help i want unroot
Can you post a screenshot of what you do see?
David Cogen screen shot
Ok, check out Ottar’s comment below and see his solution. Good luck
yes I have done the same thing. I have found 1.54.771.9 and I found nothing on the XDA link you give. ! I chose the 1.54.771.5 and I tried to restore In the CWD and I have not succeeded. he tell me: failed
Is there any ways to unroot KM edition M8?
I cant find same cid number in xda website. (CID is spcs_004)
i meant sprint HTC One M8 Harman Kardon Edition
Sorry, if it’s not listed there, they might not have the firmware for it.
Hope you can help. I have a custom rom and superCID and when i try revert to the orange nandroid (it was originally orange uk) it completes in TWRP but then boots back to my custom rom. I cant seem to get any further and need to send it back to orange to exchange for a seperate issue. Please help!
Do you get any errors in TWRP when it finished restoring the backup?
PLEASE HELP! I made it to section III but my CID is showing as 11111111. What do I do?
Sorry, not sure why it would do that. Check in Settings > About for your CID instead.
It says the same thing there
Sorry then check with the Toolkit developer and see if he has a solution.
The CID number is given to me,but the version main information is not given to me,what can i do???I hope i hear from someone soon to see how i can find this info!!!!
Check in settings for it.
Step 4 is the step im encountering some problems!i have downloaded the nandroid backup,and i have succesfully put the files onto my M8,but when i go to the restore settings no files come up!Any tips or tricks???need to fix ASAP pleaseeee.
Means its in the wrong folder. Make one of your own backups and then see where that is and how its saved and then make sure the restore file you downloaded matches that. Good luck!
Hi David, my M8 is running a rooted 4.4.3 with S-On. Will this method still work?
Because I know unrooting requires S-Off and devices with OTA to 4.4.3, there’s no method to S-Off on this version yet as far as I’m aware.
In going to look into new routing methods for the HTC one m8 asap.
If you wanna S-off with 4.4.3 you have to spend 25$ using Sunshine and it 100% work for me.
ok so when i transfer the stock nandroid backup onto my phone and try to use recovery on Twrp ,it says failed.i also noticed that the files in my nandroid backup were different to the ones in the video.my cid is HTC_J15. can anyone help thanks
need help
i am not getting into bootloader mode
its saying device not found on first pop up window
den on second pop up its showing waiting for the device please i am in problem
Means the drivers are not installed properly. Try this – https://theunlockr.com/2009/10/06/how-to-set-up-adb-usb-drivers-for-android-devices/
Ok done to this method
Now my CID no. Is htc____038
And its not available
Now what to do ? 🙁
Check the other comments. You can find the CID in settings.
i m not getting you
can u please simplify
or you can give me steps how can i have my HTC One M8 Stock Nandroids
hey. David.
i just want to check with you. I want to update from OTA I cant do that it seems.
and i decide to flash a new rom i have to root it first?
Thanks!
You cannot update using HTCs OTA when rooted but you can flash a custom ROM and a lot of them will send you updates via OTA and they’re usually much faster at sending them than HTC.
So if you’re only reason is to get an OTA, don’t unroot, just flash a custom ROM based on it. Its easier will be faster better performing and you’ll get it sooner.
If you unroot and get an OTA from HTC then you’ll have to root it again (and there’s a chance they patched the root exploit in the new OTA and then you won’t be able to reroot).
Bottom line, don’t unroot for an OTA. Just flash a custom ROM based on it.
Hey, the mega link for my nandroid comes up with temporary error. I have what I believe to be stock firmware, I flashed the stock recovery and un rooted. Yet I still can’t fully complete the my OTA. It failed 1/4 way through. Please help 🙂
What’s the error it gives when it fails?
When i try restoring the backup it always says failed. It may be becuase the check boxes that were there for you dont come up for me before i start the restoration. The error is: ‘no partitions selected for restore’. THIS IS URGENT, PLEEEEAASSSEEE ANSWER 🙂
This is the screen that shown before i start the restore. Notice how none of the checkboxes are there. This is why it doesnt work. Can you please tell me how to fix it.
Thanks David
Redownload the restore file and try again.
Same problem sorry David 🙁 Can you suggest any other way i could fix this problem?
Unfortunately, not sure. If it isn’t showing those check boxes it isn’t recognizing them from the backup file. Is there any other backup files listed for your device you can try instead?
No, this is the only one listed for my CID unfortunately 🙁
hei Your website is awesome.. i have a question what should i do if i cannot find this HTC__Y13
and i have 1.54.401.10
Thank you but why no deleting “tempered” and “relocked”? Orginal “Locked” and no”tempered”
i am from india david
the link i am opening for stock nandroid backup recovery its not opening
please help !
Double check that you have it in the right folder on the device.
Im having the same problem as some of you i have a blank version main however in settings it shows as 1.54.771.9 on the stock roms list there is 1.54.771.5 i dont know if i can use this and update or if i have to wait. Help please.
You need to pick the firmware based on the main version, not the firmware version. Look for the main version in settings (as someone else demonstrated here in the comments). Use that number to decide what firmware to flash.
same here HTC__E11 and main = 2.22.401.5
(last one is not listed in HTC__E11 but in HTC__001, what should i pick? a random in HTC__E11 or just pick my main in HTC__001. Thx for this post and thx for your help ! 😉
I tried to post already but dont think it worked i appologise if it does and it seems iv asked twice. I too have no version main when using the tool however when i use ottars method i find version 1.54.771.9 but on xda i only find 1.54.771.5 can i use this software and update to the later version or do i have to wait for someone to post the exact one i need? Please help.
my CID is HTC__044…. which version should i download?
Check the list of firmwares for it.
after i have downloaded the firmware why cant i find it in the restore section when recovering?
ive put it in twrp file and also titanium backup file…please help….im in my last few steps of unrooting
Actually make a backup in Nandroid so that that makes the folder for you, then go in and put the backup you downloaded in there next to the one you just made (that way you are guaranteed it’s in the right place).
I tried exactly what you said…maybe i made something wrong…how do i make a backup in nandriod
If you still have a custom recovery, boot into recovery then select backup.
Please help
If I have never installed a custom ROM do I need to flash to a stock ROM or can I begin the process with the unrooting step, 5?
Correct. You can skip to Section V.
ANY HELP PLEASE. I have rooted SPRINT m8 one with s-on im trying to unroot the phone for the most part your videos are helpful where im stuck is I did find my cidnum:SPCS_001 i did some digging and saw that I should use 1.54.651.8.didn’t find the main number on my screen its blank. I have never made a backup before so in my TWRP folder there is no stored backup already. I created a folder within that file(twrp) name back.when I rebooted into twrp the file was there. My goal is to unroot the phone back to stock so I can get the OTA updates and Im also have the notorious data issue with the sprint service so I will have to get my phone serviced. any help will be greatly appreciated!!!
Sorry, you need that firmware to get it to work so you’ll have to wait until it exists (unless you did a backup of the device as soon as you installed a custom recovery, you could use that possibly).
I have the Sprint M8 and cannot find my software version of 2.16.651.4. I tried flashing back to an older version and then update it but the updates failed. So I had to reroot. Now while I was still unable to find a backup of the Sprint One M8 to 2.16.61.4 I did find 2 stock rooted odexed and deodexed. Can I just use one of these and then use the unsuperzip to unroot?
No you need to find the correct stock format as the Stock Deodexed Custom ROM will most likely still be a custom ROM (and show as such in the settings which Sprint can see).
Okay thanks. As of now I have had zero luck finding the stock rom.
Do you have and idea where I can find a stock backup for 2.16.651.4? I have looked everywhere and all I can find is 1.54 which I tried using but then the update failed to get back to 2.16. I found the RUU but I don’t know if it will work using this method. Or if I have to use a different method to use the RUU.
There is no cid for the verizon backup!!!
It keeps failing when I try to do the restore. MD5 error or something. Can I just flash the backup as a zip and the proceed?
Cannot find a backup for my main version but I found a stock rooted rom. Can I just flash that and then unroot?
I have a HTC one m8 Developer edition so it comes with an unlocked bootloader. Could I skip that step and still be able to go back to stock recovery from a custom recovery using this method/kit?
I have now in a silly situation. My ATT phone was unlocked before and s-off. I followed the steps here and turned s-on. Now I tried to s-off my phone again using firewater but it said firewater cannot work on my phone. Do you happen to know what is the problem? Anything related to s-on step here?
Hi daviid, My only reason to follow this procedure is to just update my firmware so i could flash the updated ROMs. Can i skip the other parts? do i need to unroot it? and also flash stock recovery image?
Not sure why you need to do any of this for that. Just flash a new custom ROM that is based on the latest update and you’re good to go. No need to really do all of this above unless you are sending in for warranty etc.
The problem with just flashing the updated ROMs is that it doesnt boot properly. It will be stuck on the htc red text screen. Because the new roms have the latest firmware. Thats why i figure i need to just update the firmware. Now i just found a solution by updating usig RUU and now ny firmware is updated, it booted up properly(currently just installed viper 2.5.0. I realy did follow your guide i could have a fresh phone. Thank you great guide
Will this work for HTC E8?
i have unlocked bootloader and rooted my device using TWRP , i have not installed any custom rom now i have to unroot it again and lock my bootloader. Also i want to get rid off ‘ tampered ‘ unfortunately firewater didn’t worked on my handset can u help me how to proceed ?
Thanks in advance
If any body can help I would be obliged.
I am unable to gain S_off with firewater & sunshine .
Any other method which can serve my purpose ?
Hey mate really important question. I can’t find the backup for my software version but have found an Odex Rom. I was told I can just use the Odex rom and unroot that but wanted to double check to make sure. If you can help me out mate it would be greatly appreciated.
Depends on what you are unrooting for. If you are just doing it to start over that will work fine (but you have to find that backup yourself). If you are trying to send it in for warranty, however, that won’t be enough. You need to flash the stock firmware not a custom deodexed ROM (and means you need to do the steps above). Good luck!
It’s not a custom deodexed rom. It is a stock Odex rom. And I just want to unroot and be completely stock and take OTAs. Nothing with warranty, Will a stock Odex rom work for that?
Ah, gotcha. Yes, that should work.
hi , my version-main does not appear so i checked the build number , when i went to xda-developpers to download the stock nandroid’s backup , the cid num did not match the build number , i found the same build number with a different cid . any help?
Hi,
I am trying to unroot. But when I go into recovery and search for files, it says internal storage empty and in the text area it says unable to mouont data. Any clue what I need to do?
Sorry not sure what you did. Try again and see if the same error occurs. Also make sure you are saving the recovery in the right folder.
Hi,
what if my HTC is still S-on ? will this work ? i just unrooted it and now cant get OTA updates. i would like to return it to stock. will this process work for me as well ?
I have a super cid set on my phone. i am told this means i can flash any rom on my phone. does that include these stock nandroid back ups?
No. Nandroid is different than a custom ROM. Don’t try and flash a nandroid backup that isn’t meant for your phone, flash a custom ROM instead.
great guide , only my phone has a blank for version_main ! is there another way to find it ? there is two files under my phone’s CID in the forum , and i don’t have my version main to be sure !!!! and i’m S-on btw . . .
The comments on this article disappeared since I switched the site to HTTPS. Check the original comments here for help with that issue – https://disqus.com/home/discussion/theunlockr/how_to_unroot_the_htc_one_m8_video/