How to restore your HTC One M8 back to stock? Flashing stock firmware on an Android device is a good idea when you want to send your phone to the service shop. If you have rooted it, the warranty is avoided but if you restore it back to stock, the warranty is again available because the phone gets unrooted.
This round is time for the HTC One M8 to get back to stock. The process is somewhat complicated but if you carefully follow the rules everything will go fine. If you don’t follow the guide currently you might break your phone and even brick it, which will turn your M8 into a paperweight.
Here are a few notes to take before following the guide below:
1) You should have the latest TWRP Recovery installed on your device.
2) You should be S-OFF in order for the process to work. It will also work if the device is S-ON but it will not reset the tamper flags.
3) The guide will work with all the following CIDs:
HTC__101 & 102
1. Download the odexed package here and flash it through TWRP Recovery and don’t accept the request to root it.
3. Because you reseted the tamper flag, you won’t need SuperSU anymore. To remove it, download this file here and again, flash it through Recovery. This will completely remove SuperSU from the device.
4. The last thing to do is to flash the stock firmware (link). To flash it, boot your phone into fastboot and rename the firmware file to “firmware”. Then type the following code:
fastboot oem rebootRUU
Once your device has rebooted, type the following code:
fastboot flash zip firmware.zip
and after that type:
That is it. Now your HTC One M8 is back to stock, unrooted and with official stock firmware. (Thread)