Step 1: Unlock Bootloader

The first step in rooting your HTC One M9 is to ensure that the bootloader is unlocked. This will allow you to install a custom recovery on your device such as TWRP or CWM. In this example we will use TWRP.

First download Mini-SDK and extract this to your C: drive

Next create an account on the HTC Dev Website and confirm your registration through the verification email you will be sent.
Now, access this page and login with your account. From that page select the “Unlock bootloader” option and click on “Get Started”.

Select HTC One M9 on the right hand side then click ‘Unlock Bootloader’

Follow steps 1 – 4 provided by HTC Dev. When downloading the fastboot binary ensure you extract this to the same location as MiniSDK. Click ‘Proceed to Step 5’ Do not follow the instructions in Step 5 – 6 as we will be using MiniSDK.

Connect your HTC One M9 with your computer via USB cable. On your PC open a CMD window as administrator and run the following commands:

cd C:\mini-sdk
fastboot oem get_identifier_token

A long text of token will be displayed in the cmd window. Select and copy this token by right clicking on an empty space and select Mark. Now, highlight the block of text starting from <<<< Identifier Token Start >>>>  and ending with <<<< Identifier Token End >>>>

You will need to copy this token into the box on the bottom of the page on the HTC Dev website here.
HTC Dev  will now email you your own unique Unlock_code.bin package; download this package and transfer it to C:\Mini-SDK. In the cmd window, type the following command:
fastboot flash unlocktoken Unlock_code.bin
An alert will then be displayed on your phone which you will need to accept tto unlock the bootloader.

Once completed you can boot back into bootloader mode and check the message shown says ‘Unlocked’

Step 2: Install TWRP Recovery

Ensure your device is still connected in bootloader mode.

You will now need to download the latest TWRP .img file from teamw.in. This should be downloaded to C:\Mini-SDK.

Once downloaded you will need to flash this to your phone by using the command below: (Ensure the file name is identical to the one you have downloaded)

fastboot flash recovery twrp.img

TWRP recovery will now be installed. To check reboot your phone to download mode, while in download mode, select the option ‘reboot to bootlaoder’. When in bootloader mode, select the option ‘boot to recovery mode’. TWRP will now boot.

Once TWRP boots it is advisable to take a stock back up. To do this tap backup select all partitions then slide to backup. Ensure this is kept safe on your PC incase you ever need it in the future.

Step 3: Flash SuperSU to HTC One M9

Finally you are now able to root your device. First you will need to download the latest stable version of SuperSu here.  Once downloaded this will need transferring to your HTC One M9. Now all you need to do is boot into TWRP recovery again and flash SuperSU. Select Install and then select the SuperSu zip file. Once the zip has been flashed, look for the “SuperSU” app in the app drawer to confirm root.

 

Any questions, don’t be afraid to get in touch!

Share