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:

  1. Red development text on the bootscreen.
  2. And, the *** TAMPERED *** flag.
  3. 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

  1. 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.
  2. 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.
  3. Connect your phone to the computer using USB cable.
  4. 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:
    adb devices
  5. If you see the serial number of your device on the cmd, all’s fine and you can proceed with the next step.
  6. Now issue the following commands on the cmd (we strongly recommend that you copy/paste the commands as they are:
    adb shell
    echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796 
  7. 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
echo -ne "HTCU" | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796 
adb reboot bootloader


  1. Do I need SU installed on the phone? Doesn’t work with my S-off M8 with stock 4.4.2 ROM. ADB recognizes the phone and accepts “adb shell” command, but when i type SU after that it gives me “/system/bin/sh: su: not found” ???

This site uses Akismet to reduce spam. Learn how your comment data is processed.