All HTC phones come with locked bootloaders that needs to be unlocked before involving into any custom development activity. If you got a brand new HTC device with locked bootloader, just press and hold the Volume Down + Power keys to get into the bootloader mode on your phone and you would see *** LOCKED *** banner at the top the screen.
Once you unlock the bootloader of your HTC device via HTC Dev portal or gain S-OFF using Firewater method, the *** LOCKED *** flag disappears and your device status begins to show as *** UNLOCKED *** and *** TAMPERED ***. These flags are deliberately put by HTC to show that you have done something that the OEM does not want its users to do. If there occurs some problem with your phone and you submit it to the service center, your phone is likely to be rejected the HTC guys notice 3 things:
- Red development text on the bootscreen.
- And, the *** TAMPERED *** flag.
- The *** UNLOCKED *** status of the device.
The customary way of regaining the stock *** LOCKED *** status, you will have to unroot your HTC phone and relock the bootloader. Luckily Android is an open source platform and fortunately we have so many talented developers with itching palms who won’t sit calmly at the state of things.
If you own a brand new HTC One M8 with an unlocked bootloader or S-OFF, you can easily get rid of all 3 signs of having a tampered device we mentioned above. Just a few days ago, we covered two hacks to remove the TAMPERED flag and the red development message on the boot screen of the One M8:
XDA senior member scotty1223 is back again with another hack method to reset UNLOCKED status to LOCKED on HTC One M8. To get the job done, all you need is to issue a few ADB commands. So, let’s see how we can do it.
The procedure described in this tutorial is considered risky and making even a single mistake in typing the command lined might brick your device. Play it carefully and safe at your own responsibility.
- HTC One M8 with S-OFF. If you have not S-OFF’ed your phone, jump to 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.
- Also, enable USB Debugging on your HTC One M8. If you do not know how to do it, we have laid down the steps to enable USB Debugging on this tutorial.
Reset UNLOCKED Status to LOCKED on HTC One M8
- 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.
- Just to make sure that you have setup the ADB properly, type the following command in the cmd and press a key on the keyboard:
- If you see the serial number of your device on the cmd, all’s fine and you can proceed with the next step.
- Now issue the following commands on the cmd (we strongly recommend that you copy/paste the commands as they are:
adb shell su echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796 exit exit
- By now, the UNLOCKED Status of your HTC One M8 should have turned to to LOCKED. Just to make sure that the magic has been done successfully, reboot your M8 into the Bootloader Mode by using the following command:
adb reboot bootloader
Your phone’s bootloader screen should show as shown below:
It’s time to revel at your success! To revert back to the UNLOCKED status, you can use the following commands:
adb shell su echo -ne "HTCU" | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796 exit exit adb reboot bootloader