The Android network around the world is so connected that developers from various parts contribute to developing mods and ROMs for the devices. If the device you own is an HTC M8, then there is no need to tell how confused you are in choosing between various spectacular mods. But what if your device is damaged and wants to pay a visit to the customer support center? Your device will lose the warranty once you perform unauthorized operations, so you need to revert back to stock to avail the warranty again.
Reverting to stock involves more than just flashing a firmware, you need to reset the tamper and unlock bits that will be set during any unauthorized flashes. Luckily we have many folks who will help to do these, all you need to do is follow this simple guide to revert back to 100% stock.
This guide is only for theย European One M8, not for any other variant and you need to be S-OFF to get through the guide without any hassle. This guide will get you back toย 2.22.401.4 firmware and it would be better if you’re onย HTC__001 CID, even though other CID were also working.
So let’s get on with the guide toย Restore European HTC One M8 to Stock
Warning
This Guide is intended only for the European HTC M8, not for any other variant of M8. Be extra cautious when you choose the firmwaresย as flashing the wrong onesย might result in a bricked device. You alone are responsible for any consequences that might occur during the process. DroidViews or any of its community members shall not be held responsible for any damage to your device.
Preperations
- Charge your HTC M8ย above 60% battery level to avoid shutdowns during the process.
- Make sure yourย Verizon HTC One M8 is S-OFFโd. If you have not done this yet, you can easily S-OFF your VZW M8 using Firewater method.
- Install HTC Sync or HTC USB Drivers on your computer: Download here
- Enable USB Debugging on your phone from Settings> Developer options. If you do not find Developer option under device settings, read the instructionsย given here.
- Download and setup Android SDK on your computer so that you have a working ADB and Fastboot. ย If you new to such things, you can refer to our guides on the topic: Guide 1,ย Guide 2
- A custom recovery to flash theย Stock ROM.
Restore European HTC One M8 to Stock
This guide involves several parts so make sure to follow the guide carefully.
Restore to Stock Firmware
- Download the odexed stock ROM for your M8 and transfer it to SD card using a USB cable.
- Flash the ROM using any recovery. Follow this guide to flash the ROM on your device and make sure to perform a clean wipeย โย Click Here
- During the flash, if may prompt to apply root fix, deny it as we are going to install it now.
Root the Device
- Download the SuperSU packageย and transfer it to the device using a USB cable.
- Install it using the recovery.ย Follow this guide to flash the zipย on your device and make sure to perform a clean wipeย โย Click Here
- Reboot the device
Reset Tampered and Unlocked Status Bits
- Now we will reset the unlock and tamper bits.
- Connect your M8 to the PC with a USB cable and make sure the device is detected.
- Open the command prompt in the ADB folder by holding Shift and Right-clicking in the empty space of the folder.
- Make sure the device is detected by executing the following command:
adb devices
- Now launch the adb shell from the CMD and get the root permissionsย using these commands one by one.
adb shell su
- The device may ask you for root permission, grant them.
- Now we will reset the tamper bit, enter the following command carefully and press enter. (Copy paste this command)
echo -ne '\x00' | dd of=/dev/block/mmcblk0p6 bs=1 seek=5314564
- Now type exit in the command prompt to get out of adb shell. Enter the following command to reboot to bootloader.
adb reboot bootloader
- You should now notice that the Tampered label has vanished from the bootloader menu. Reboot the device.
- Now we will change the status of your Lock status flag to Unlocked. Repeat Step 2ย to Step 6ย once again.
- Enter the following command to reset the lock status flag and press enter key to execute.
echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796
- Check if the lock status is now changed to Locked from Unlocked by repeating the Step 8ย to reboot to the bootloader.
Restore Stock Recovery
- Now the final task is to get your recovery back to stock. This would complete reverting back to 100% stock.
- Downloadย 2.22.401.4_firmware.zipย which should be flashed on your device using the fastboot method.
- Copy the downloaded file to the Fastboot folder on your PC.
- Reboot your device into fastboot mode and connect it to the PC using a USB cable.
- Rename 2.22.401.4_firmware.zip file toย firmware.zip.
- Open the command prompt in the Fastbootย folder by holding Shift and Right-clicking in the empty space of the folder.
- Now enter the following command in the CMD and press Enter Key:
fastboot oem rebootRUU
- Wait for the device to reboot and then execute the following command in the CMD:
fastboot flash zip firmware.zip
- Wait for the process to complete and then type the following command to reboot your device:
fastboot reboot
- Your device will now reboot and you will see the stock ROM running on your device.
That’s it, you are now seeing 100% stock device in your hand except for the S-OFF which is left for any other operations to be done in the future.
Leave your feedback in the comments section below.
Doesnt flash the firmware zip it says failed
why?
everything went right to Restore Stock Recovery then i got this, any help?
I presume you have changed your CID previously, am i right? The error simply shows a CID mismatch.
Yes, how can I resolve this?
Hi thanks for yoyour reply, how do I resolve that?
We have a guide for it here: https://www.droidviews.com/change-cid-mid-htc-one-devices/
And it is advised in our guide above to have “HTC__001” as CID.
i done what it says on the guide and i’m getting this, do i need to have suppersu installed and device rooter to perform this? I have s-off..
Okay, you have done well. Now try the above guide again and see if it works further.
done but now stuck on htc logo
hello mate… I’m new to android rooting flashing unlocking. I bought a second hand htc one m8 in UK which has OS 4.2.2 with locked bootloader, s-off and CID 11111111. I want to restore to stock htc sense. As I’m completely new I get confused with so many blogs all around. Really appreciate if you could help.
Thanks
Follow the tutorial. What help do you want?
I don’t know if your tutorial can be followed for my phone. If you could let me know from the screenshot I have attached which tutorial to follow that would help a lot.