Restore European HTC One M8 to Stock


The Android network around the world is so connected that developers from various parts contribute to develop mods and ROMs for the devices. If the device you own is a 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 want 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


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.


  • 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

  1. Download the odexed stock ROM for your M8 and transfer it to SD card using an USB cable → Click Here to Download
  2. 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
  3. During the flash, if may prompt to apply root fix, deny it as we are going to install it now.

Root the Device

  1. Download the SuperSU package and transfer it to the device using an USB cable.
  2. 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
  3. Reboot the device

Reset Tampered and Unlocked Status Bits

  1. Now we will reset the unlock and tamper bits.
  2. Connect your M8 to the PC with an USB cable and make sure the device is detected.
  3. Open the command prompt in the ADB folder by holding Shift and Right clicking in the empty space of the folder.
  4. Make sure the device is detected by executing the following command:
    adb devices
  5. Now launch the adb shell from the CMD and get the root permissions using these commands one by one.
    adb shell
  6. The device may ask you for root permission, grant them.
  7. 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
  8. Now type exit in the command prompt to get out of adb shell. Enter the follow command to reboot to bootloader.
    adb reboot bootloader
  9. You should now notice that the Tampered label is vanished from the bootloader menu. Reboot the device.
  10. Now we will change the status of your Lock status flag to Unlocked. Repeat Step 2 to Step 6 once again.
  11. 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
  12. Check if the lock status is now changed to Locked from Unlocked by repeating the Step 8 to reboot to the bootloader.

Remove the Root

  1. Now you need to remove the SuperSU as we no longer require it. Download Unroot Package and transfer it to SD card.
  2. Flash the Zip file via recovery.
  3. Reboot the device and make sure that the root access is disabled and the SuperSU app is removed.

Restore Stock Recovery

  1. Now the final task is to get your recovery back to stock. This would complete reverting back to 100% stock.
  2. Download which should be flashed on your device using the fastboot method.
  3. Copy the downloaded file to the Fastboot folder on your PC.
  4. Reboot your device into fastboot mode and connect it to the PC using an USB cable.
  5. Rename file to
  6. Open the command prompt in the Fastboot folder by holding Shift and Right clicking in the empty space of the folder.
  7. Now enter the following command in the CMD and press Enter Key:
    fastboot oem rebootRUU
  8. Wait for device to reboot and then execute the following command in the CMD:
    fastboot flash zip
  9. Wait for the process to complete and then type the following command to reboot your device:
    fastboot reboot
  10. Your device will now reboot and the 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

  • Rajmond

    done but now stuck on htc logo

  • Okay, you have done well. Now try the above guide again and see if it works further.

  • Rajmond

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

  • We have a guide for it here:

    And it is advised in our guide above to have “HTC__001” as CID.

  • Rajmond

    Hi thanks for yoyour reply, how do I resolve that?

  • Rajmond

    Yes, how can I resolve this?

  • I presume you have changed your CID previously, am i right? The error simply shows a CID mismatch.

  • Rajmond

    everything went right to Restore Stock Recovery then i got this, any help?

  • j jena

    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.

  • Follow the tutorial. What help do you want?

  • j jena

    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.