‘With great power comes great responsibility’:ย This is one of the most famous quotes from Stan Lee’s Spider-Man comics and probably it can be applied to any real-world scenario. Rooting is a powerful exploit for Android operating system which provides access to unlimited possibilities. However, with great flexibility and functionality comes great responsibility. Rooting costs your device warranty and in worst case scenarios you’ll have a bricked device in your hands. Luckily this is Android we are talking about, there is always a workaround for every misery.
HTC One M9 is the latest flagship from HTC which is faring well alongside other flagships in the battle. We’ve already seen how to root HTC One M9 and install TWRP recovery on it which gives the users access to many advanced features. Rooting helps you use advanced apps like Xposed framework, root explorer apps and other mods which will improve the performance and customizability of the device.ย However, if you feel like reverting back to stock, you’ll need a stock firmware, re-lock the bootloader, and restore S-ON. So, if you’re interested to restore your HTC One M9 WWE to stock, follow the below step-to-step guide carefully.
Before you begin, you need to have a rooted HTC One M9 with security status as S-OFF. Since you’re reading this tutorial, we firmly believe that you meet these requirements. However, if you haven’t meet any of the requirements follow the below links to root your device or S-OFF HTC One M9.
Prepare Your Device
- Charge your HTC One M9 above 60% battery level to avoid shutdowns during the process.
- Enable USB Debugging
- Install the required HTC USB drivers
- Set up ADB drivers on your PCย or download and extract the Minimal ADB and Fastboot tool on your PC
- Backup your device storage, Contacts, SMS etc. using Google Sync service or any third-party app.
How to Restore HTC One M9 to Stock
Follow the below process module by module to restore your HTC One M9 (WWE) to stock firmware version 1..32.401.8. So without any further ado, let’s get the show on the road.
Change your CID & MID
This method supports the follow CID and MID for HTC One M9, so you need to change them if you don’t have the following values:
Compatible MID:ย 0PJA10000
Compatible CID:
cidnum: HTC__001
cidnum: HTC__J15
cidnum: HTC__031
cidnum: HTC__102
cidnum: HTC__A07
cidnum: HTC__032
cidnum: HTC__M27
cidnum: HTC__016
cidnum: HTC__002
cidnum: HTC__Y13
If you’re not aware of how to change the CID and MID on your HTC One M9, follow our detailed guide on the same from the link below.
Lock the Bootloader
- Navigate to the folder where you’ve extracted the ADB andย Fastboot files and open a command prompt byย pressing Shift + Right-click on any empty space inside the folder and select Open command window hereย from the context menu.
- Connect your device to the PC using a USB cable and make sure the device is detected by the PC. If not, re-install the drivers on your device and try again.
- Enter the following commands in the command prompt one by one and press Enter. Grant root permissions if prompted.
adb shell su echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796 exit exit
- Reboot the device to the bootloader mode and verify the lock status. You should see a Lockedย status on your device.
Flash the Stock Firmware
- Download the RUU file: Download here
- Rename the zip file toย 0PJAIMG.zip and transfer it to the root of the SDcard.
- Reboot the device into download mode. To do this:
- Power off your device and wait for 5-10 seconds until the device is fully switched off.
- Press and hold โPower +ย Volume Downโย button until you see a black screen with red text. This is your Download mode.
โ In Download mode, use Volume buttons to navigate Up and Down between options and use the Power button to select an option.
- Now press the Volume Upย button to start flashing the firmware. This might take a while, so be patient till the flashing process is complete.
- Reboot the device once the flashing process is complete.
S-ON your Device
- Reboot the device into download mode. To do this:
- Power off your device and wait for 5-10 seconds until the device is fully switched off.
- Press and hold โPower +ย Volume Downโย button until you see a black screen with red text. This is your Download mode.
โ In Download mode, use Volume buttons to navigate Up and Down between options and use the Power button to select an option.
- Navigate to the folder where you’ve extracted the ADB andย Fastboot files and open a command prompt byย pressing Shift + Right-clickย on any empty space inside the folder and select Open command window hereย from the context menu.
- Connect your device to the PC using a USB cable and make sure the device is detected by the PC. If not, re-install the drivers on your device and try again.
- Enter the following command in the command prompt to S-ON your device:
fastboot oem writesecureflag 3
-
Once again reboot the device into bootloader mode to check the security bit status.
That’s it folks, your device is now back to stock again. Let us know of any issues in the comments section below.
If I S-ON and want to go back to S-OFF in the future, do I need to pay $25 on the same device once again, or is it a Sunshine license per device?