Have you just got your hands on the latest HTC beast? Yes, I am talking about the HTC One M9, the one brilliant masterpiece which was released just a month back during 2015. Now that you have it, you must be thinking of exploring it beyond its limit, but to do that you must unlock the device. The process of unlocking has been made easy by the OEM itself through HTCDev, But it does have its own limitations and inconvenience, which makes the process a bit lengthy to carry out.
But, our friend scotty1223 at XDA has bought up a method to lock/unlock HTC One M9 without HTCDev using simple adb commands. The process makes it very easy for you to lock or unlock your M9, but it does require your device to be Rooted and S-Off. Both of which you can perform easily by following the links below.
Now once you’re done with this, you can go forward and follow the instructions. The commands not only lets you lock and unlock, but it also helps you to change the HBOOT watermark from relocked or locked, back to stock. Some other advantages are no more use of tokens or personal information, no HBOOT downgrades and no unlock codes, and that saves you a lot of time and work.
S-Off, locking, unlocking or Rooting could be a risky process if done wrong. You can restore to stock by using the device RUU. DroidViews or any of its members shall not be held responsible for any damage to your device.
- Download and Install HTC drivers.
- Setup Android SDK or download the ADB tools package.
- Charge your device to a sufficient battery level, so that the device doesn’t get stuck during the process.
- Backup everything on your device.
- Enable USB debugging. If you still haven’t, follow our short guide.
Steps To Lock/Unlock HTC One M9
- Connect your device to the PC via USB cable.
- Open a CMD window and start by enterring the following commands:
- The above command will return a device ID, confirming that the device has been connected successfully and available for ADB access. If you don’t get an ID, make sure to reinstall the drivers properly.
- Start the locking process now:
- After entering the above command, you will be prompted to allow root access, allow it.
- To lock your device:
echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796
- To unlock your device:
echo -ne "HTCU" | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796
- Time to exit the shell.
- Reboot your bootloader
adb reboot bootloader
Now, in the bootloader mode, you can verify that the device has now changed its status to locked or unlocked, as per your procedure. The process was easy and did save your time, let us know if you’re stuck anywhere between the process, we will definitely provide an helping hand.
Visit the original XDA thread for more information on the process and its working.