How to return HTC One M8 (Verizon) to stock – S-On – Relock Bootloader – Unroot/Uninstall SuperSu

There are many reasons of why you might want to return your HTC One M8 back to out of the box stock state. Some reasons might include if you are trading or selling the device. Another reason is if you need to turn the phone in for warranty situations. Whatever the reason, this post will help you get back to stock.

First of all, this is the Verizon variant I am using so be sure to use files that pertain to your specific device. Remember, you are responsible for your own actions. With that said let’s get going.

Flash the RUU file – 

  • Run the RUU found Here or HERE
  • Place on external sd card (this method should automatically recognize the file, then follow the prompts)
  • Boot into bootloader and let it run (power off then hold volume down + power buttons)
  • or place in fastboot dir open cmd window > fastboot oem rebootRUU >fastboot flash zip 0P6BIMG.zip
  • Reboot

The phone is back to stock now, will be rooted, but that is the last step to remove root.

Relock Bootloader –

Prerequisites 

  • HTC One M8 with S-OFF. Firewater’s official page to gain it.
  • Download and install HTC USB Drivers on your computer. If you have installed HTC Sync, uninstall it temporarily to avoid any problem.
  • You must have ADB (Android Debug Bridge) installed and setup on your computer: Refer to this or this guide to setup ADB.
  • Enable USB Debugging on your HTC One M8. (Settings > About > Software Info > More > tap Build # several times until you see “You are now a developer” > back to Settings page > Developer Options > Select On > Check on Allow USB Debugging)

Now you’re ready – 

  • Navigate to the directory where you have setup the Android SDK. Open the folder the platform-tools directory where ADB and Fastboot files are found.
  • Press the Shift key and then do a right-click on the mouse at an empty space in the platform-tools folder. Select Open command window here option to launch cmd prompt.
  • Connect your phone to the computer using USB cable.
  • Double check to make sure the phone is recognized by adb by typing in the command:
    adb devices
  • If you see the serial number of the device and says attached, you are good to go.
  • Type or copy/paste the commands on the cmd line –
    adb shell
    su
    echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796 
    exit
    exit
  • You should see the bootloader as LOCKED. To check, reboot your M8 into the Bootloader Mode by using the command:
    adb reboot bootloader

Get S-On –

Return to S-ON

  • Reboot into bootloader
  • Open cmd window in fastboot dir and type or copy/paste –

fastboot oem writesecureflag 3

  • Reboot to bootloader and verify S-On

Unroot/ Uninstall SuperSu – 

  • Go to SuperSu app > Settings > Full unroot option > Reboot

If you are having trouble getting SuperSu to stay off use the Universal Unroot App to remove root.

 

You should be in fully unrooted, back to stock, relocked bootloader and S-On. My biggest hickup was SuperSu sticking and not being removed. But when I used the Universal Unroot app it worked like a charm.

Source | XDA

Josh
Follow me

Josh

Editor & Chief at Bane Tech
Addicted to tech, smartphones, & gadgets! I share my experience about them!
Reviews, guides, & more!
Techies - Geeks - Nerds!
Be sure to subscribe to my YouTube channel: http://www.youtube.com/JoshuaBane
Josh
Follow me