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:
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.