How To Root and Install Custom Recovery On HTC One M9



Link to TWRP page in general: http://twrp.me/devices/htconem9.html

Unlocking the bootloader. (Thanks -markus-)
- Login into HTCdev
- Unlock Bootloader
- Get Started
- On "Select Your Device" Select "All Other Supported Models"
- Begin Unlock Bootloader
- Legal Terms "Proceed to Unlock Instructions
- On Phone pressing Volume Down + press Power to boot in "HTC download mode" (black Background)
- Connect Phone via USB
- CMD: fastboot oem get_identifier_token
- Copy and paste the token in Textfield "My Device Identifier Token:"
- You will receive an Email with "Unlock_code.bin
- CMD: fastboot flash unlocktoken Unlock_code.bin
- Press Volume Button to secelt Yes for Unlock bootloader


If your bootloader is unlocked, follow these steps.

  • Download and install ADB/Fastboot using 15 second ADB/Fastboot installer.
  • Plug in the One M9, enable USB debugging.
  • Open up command prompt, type
    Code:
    adb devices
  • Code:
    adb reboot bootloader
    fastboot devices
  • Download TWRP.
  • Code:
     fastboot flash recovery C:\Users\XDADev\Downloads\TWRP.img
    Replace C:\Users\XDADev\Downloads\TWRP.img with the path where the twrp.img is located for you.
  • Select Recovery in the bootloader using the volume buttons, and then press Power.
  • Download SuperSU.zip
  • Make sure you have an SD Card in your phone, then do
    Code:
    adb push C:\Users\XDADev\Downloads\UPDATE-SuperSU-v2.46.zip /sdcard
    Once again, replace C:\Users\XDADev\Downloads\UPDATE-SuperSU-v2.46.zip with your path.
  • On your device, click Install, then at the top of the screen it should say Internal Storage or SDCard. If it does not say SD Card, click it and change it to SD Card.
  • Now find SuperSU.zip, click on it, and swipe to flash it.
  • Once SuperSU is done flashing reboot the phone, and open up SuperSU. You are now rooted!
Thanks for your comment