How to Restore AT&T HTC One M8 to Stock with RUU


We are all fond of installing new ROMs now and then. Moreover, many of us root our devices the very day it comes out-of-the-box, probably in a haste, without realizing its consequences. While some of us like the  Custom experience, others don’t. And therefore there is a need to Restore to Stock Firmware. Rolling back to stock in devices like Nexus is pretty easy and takes least amount of time as compared to Samsung or HTC. We have covered a lot of guides about moving back to stock condition from as many devices as possible.

And here we’re today with the AT&T HTC One M8. This guide beholds the complete procedure to Restore AT&T HTC One M8 to stock condition. This involves, relocking the bootloader, RUU installation, removing TAMPERED banner and finally relocking the  bootloader.


The procedure if performed wrong, may damage your device. Read and understand the instructions carefully before proceeding. DroidViews or any of its members shall not be held responsible for any damage to your device.


Update: Firewater method has been discontinued by the developer now!

  • We assume your device is already S-OFF. If its not, use Firewater and do it.
  • Install HTC Sync USB drivers: Download here
  • Charge your M8 to at least 60% battery level to avoid any uncertain shutdowns during the process.
  • Gain S-Off on your AT&T HTC One M8
  • Setup Android SDK: View guide
  • Enable USB Debugging: View guide

Download AT&T M8 RUU

AT&T HTC One M8 Stock RUU: Click to download

Restore AT&T HTC One M8 to Stock

Change the CID

Since we’re going to use the RUU executable to restore, we need to confirm that the device CID is CWS__001, which is the AT&T HTC One M8’s stock CID. It could be changed easily using the steps below.

  1. Connect your device to the PC via USB cable, while its booted in OS already.
  2. Open a Command Prompt window and enter the command to boot into bootloader mode:
    adb reboot bootloader
  3. Once in bootloader mode, use the volume keys to highlight FASTBOOT and select it by pressing the power button.
  4. When the M8 has entered fastboot mode, enter the commands below:
    fastboot oem writecid CWS__001
  5. And finally reboot the device back to normal:
    fastboot reboot

Okay, we have been successful in changing back the CID, so the device is now eligible for restoring to Stock using RUU.

Relock your device’s bootloader and Restore RUU

Note: It might be a case that the RUU restore won’t work if your device has an unlocked bootloader. So, to overcome this issue, it is advised to relock the device bootloader using fastboot commands.

  1. Connect your M8 to the PC via USB cable
  2. Open a CMD window and type in the command below to reboot the device into Fastboot mode.
    adb reboot bootloader
  3. It will boot into Bootloader (HBOOT) mode. Now select highlight the FASTBOOT option using the volume down keys and then press the power button to get into Fastboot Mode (see below):htc-one-m8-bootloader
  4. Enter this command to relock the device’s bootloader:
    fastboot oem lock
  5. The bootloader will now display a relocked banner.
  6. Do not exit the Fastboot mode yet.
  7. Download the AT&T HTC One M8 Stock RUU from the downloads section (filename: RUU_M8_UL_K44_SENSE60_ATT_SECURITY_Cingular_US_1.58.502.1_Radio_1.16.21331931.LA11G_20.31A.4145.02L_release_368350_signed_2.exe)
  8. Double-click the file and run it as any other executable program. Follow the instructions by the program.
  9. The procedure will take sufficiently required time to complete and once done the device will reboot.

Install TWRP And SuperSU

You will need TWRP recovery to be flashed and SuperSU to be installed again for adb shell commands to work. Click the link below for our guide.

How to Root AT&T HTC One M8 and Install TWRP on It

Remove TAMPERED Banner

  1. Removing the TAMPERED flag from the bootloader mode is just a matter of a minute using some simple Command lines.
  2. Enter the commands below to get it done. When you will enter the shell, the device will prompt for Superuser access, press on GRANT.
    adb devices
    adb shell
    echo -ne ‘\x00′ | dd of=/dev/block/mmcblk0p6 bs=1 seek=5314564
    adb reboot bootloader

Restore Bootloader to Locked state

Since the flag has been removed, the last thing left to do is to reset the bootloader state from ***RELOCKED*** to ***LOCKED***. A bunch of commands will do this for you, enter the list of commands below:

adb devices
adb shell
echo -ne ‘\x00\x00\x00\x00′ | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796
adb reboot bootloader

Your M8 will now boot into bootloader mode and display ***LOCKED*** status.

Completely Unroot

The last step is to unroot using the SuperSU interface itself. Open the SuperSU app, swipe to the SETTINGS tab. Scroll down and press on Full unroot. When prompted, tap on CONTINUE. The app will remove root from your AT&T HTC One and reboot the device automatically when done.

Congratulations! You’ve been successfully able to restore AT&T HTC One M8 to stock firmware. If you have queries regarding the process, post the comment below and we shall get our best hands on it. Stick with us, put some feedback and wait until we get back with more stuff on the HTC One M8.