[GUIDE] [NOOB Friendly] Root and Install TWRP on HTC One M9

Status
Not open for further replies.
Search This thread
K

KingInTheNorth

Guest
Mod information 2018-07-29
This method described below is outdated and following the guide might end in a bootloop if users are currently using the latest firmware.

This is a guide on how to root the HTC One M9.

Your M9 must have an unlocked bootloader. There is currently not a way to unlock the bootloader, so unless your phone comes with an unlocked bootloader, you will need to wait until HTC updates www.htcdev.com to unlock the M9 bootloader.

Video Guide: Video
Link to the correct TWRP to use thread by Captain_Throwback READ DISCLAIMERS!: http://xdaforums.com/one-m9/orig-development/recovery-twrp-touch-recovery-t3066720
Link to TWRP page in general: http://twrp.me/devices/htconem9.html
Link to correct SuperSU to flash: http://xdaforums.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133

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 download
  • 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.
  • Power off your device. Now, to boot into recovery mode.
    Press and hold Volume Down button, then press the Power button to switch on your phone and release it, but keep holding the Volume Down button.
    Select boot to recovery on the screen that appears(bootloader)
  • 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!

If this helped you, feel free to click Thanks below.
 
Last edited by a moderator:
  • Like
Reactions: will734

Captain_Throwback

Recognized Developer
FYI I'm pretty sure you can't root with the version of TWRP that's currently uploaded. It doesn't have writing to the system partition enabled. If you look in the recovery fstab, system is mounted as emmc.

You'll have to wait until an alternate version is uploaded for this to work. Someone will need to confirm whether rooting will completely break the ability to take an OTA too.

EDIT: There's also this disclaimer on the device page: "NOTE: Installing TWRP can break your ability to receive updates from HTC."

EDIT 2: The other question is whether unlocking the device will allow system to be written to at all in the OS, or only while in recovery. I think once some people have the device in their hands, some of these questions can finally be answered.
 
Last edited:
FYI I'm pretty sure you can't root with the version of TWRP that's currently uploaded. It doesn't have writing to the system partition enabled. If you look in the recovery fstab, system is mounted as emmc.

You'll have to wait until an alternate version is uploaded for this to work. Someone will need to confirm whether rooting will completely break the ability to take an OTA too.

EDIT: There's also this disclaimer on the device page: "NOTE: Installing TWRP can break your ability to receive updates from HTC."

EDIT 2: The other question is whether unlocking the device will allow system to be written to at all in the OS, or only while in recovery. I think once some people have the device in their hands, some of these questions can finally be answered.

Test devices are S-OFF.....but bootloader locked. Go figure. :confused:
 

-markus-

Member
Jun 24, 2009
11
19
Menden
Worked for me :)
But to flash successfull recovery you have to boot to "htc download mode", the black background!
If you see white background you are on bootloader, here you are not able to flash TWRP Recovery, you will get the message "FAILED (remote: cannot flash this partition in s-on state)"
So boot to "download mode" an it work
 
trying this tomorrow.
Is there any way to virginize the device if I don't want it to be rooted anymore ?
Pull the stock recovery image before you flash TWRP. I neglected to do so (but I do have my Verizon device rooted with TWRP.

One problem, TWRP can't read or write to encrypted sdcards, either internal or removable.

My name is Harold and I'm a flashaholic.....
 
  • Like
Reactions: rtoledo2002

k1moe

Senior Member
Jun 19, 2014
133
55
Worked for me :)
But to flash successfull recovery you have to boot to "htc download mode", the black background!
If you see white background you are on bootloader, here you are not able to flash TWRP Recovery, you will get the message "FAILED (remote: cannot flash this partition in s-on state)"
So boot to "download mode" an it work

Markus, what device do you have.. international, verizon?
 
  • Like
Reactions: freelockuk

Slusho

Senior Member
Apr 24, 2012
130
11
Three questions:

1. Do I really have to buy an SD card to do this?
2. How do you boot to download mode?
3. Should the bootloader be unlocked before or after installing TWRP and rooting, or does it not matter?
 

jauhien

Senior Member
Mar 25, 2006
1,192
584
Dubai
1. Every XDA developer has one..
2. Choose REBOOT from the shut down menu, then when display turns black - press and hold hardware button volume - ..
3. That will save you from frustration..
 

xda23

Senior Member
Sep 13, 2013
2,327
173
This will work on the u.s. m9 versions? Thanks ;)

Sent from my SM-N910T using XDA Free mobile app
 

-markus-

Member
Jun 24, 2009
11
19
Menden
Um.. how do you have unlocked your bootloader? I got my M9 from Vodafone Germany (retail unit) and via HTCdev im not able to unlock BL :(

- Login into HTCdev
- Unlock Bootloader
- Get Started
- on "Select Your Device" i used "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
- thats it :)

I hope i could help you
 

jbm76

Senior Member
Unlocked the bootloader and flashed TWRP...

SuperSU 2.46 isn't getting root...

When flashing it appears to be successful...
But then when the phone reboots there is no root access...
SuperSU - gives this error
If you just upgraded to Android 5.0, you need to manually re-root - consult the relevant forums for your device!

Anyone else have this problem or know a workaround.
 

-markus-

Member
Jun 24, 2009
11
19
Menden
Unlocked the bootloader and flashed TWRP...

SuperSU 2.46 isn't getting root...

When flashing it appears to be successful...
But then when the phone reboots there is no root access...
SuperSU - gives this error
If you just upgraded to Android 5.0, you need to manually re-root - consult the relevant forums for your device!

Anyone else have this problem or know a workaround.

How did you install SuperSU?
I put the Zip-File on internal Storage and boot from recovery and installed it.
I did not use the way about "adb push SuperSU-v2.46.zip /sdcard" because i don't have an SD-Card at moment.
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    Worked for me :)
    But to flash successfull recovery you have to boot to "htc download mode", the black background!
    If you see white background you are on bootloader, here you are not able to flash TWRP Recovery, you will get the message "FAILED (remote: cannot flash this partition in s-on state)"
    So boot to "download mode" an it work
    6
    FYI I'm pretty sure you can't root with the version of TWRP that's currently uploaded. It doesn't have writing to the system partition enabled. If you look in the recovery fstab, system is mounted as emmc.

    You'll have to wait until an alternate version is uploaded for this to work. Someone will need to confirm whether rooting will completely break the ability to take an OTA too.

    EDIT: There's also this disclaimer on the device page: "NOTE: Installing TWRP can break your ability to receive updates from HTC."

    EDIT 2: The other question is whether unlocking the device will allow system to be written to at all in the OS, or only while in recovery. I think once some people have the device in their hands, some of these questions can finally be answered.
    6
    Well, there's no way to get SU without modifying /system. However, in the past I've been able to unroot and apply OTA without reflashing stock system, but I still had to use stock recovery. Either way, manually mounting /system through TWRP won't impact anything, you'll just have to unroot and maybe reflash stock recovery before OTA, but there shouldn't be anything that permanently disables OTA. Even if there is, you could back up, RUU, OTA, restore data.
    You REALLY need to read the TWRP thread and stop giving out bad advice. In fact, your "solution" is completely unnecessary if you follow the instructions in that thread.

    Don't you think there's a reason TWRP mounts system read-only in the first place?
    5
    So after a couple hours of stumbling around I now have a rooted T-Mobile M9 running a custom ROM. If you're having issues, give this a read. See my comments in BOLD. Just make sure your backup as described below.

    Unlocking the bootloader.
    - 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)
    - SELECT DOWNLOAD MODE (BLACK SCREEN)
    - 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
    - Reboot (Enable USB DEBUGGING AGAIN)

    Once my bootloader was unlocked, I flashed the BETA Recovery Below:
    - On Phone pressing Volume Down + press Power to boot in "HTC download mode" (black Background)
    - SELECT DOWNLOAD MODE (BLACK SCREEN)
    - Beta Recovery LINK

    Make Stock Backup:
    - Boot to Recovery, Backup

    Flash SuperSU:
    - If you already have a stock backup, proceed
    - Boot to Recovery
    - Under Advanced, choose Terminal, press the select button to start it in the root folder

    Mount System (this part is hard to find in the forums)
    - Type this command in the line:
    mount -t ext4 /dev/block/bootdevice/by-name/system /system
    - Once done, hit back
    - Then flash the SuperSU installer zip.

    * Get yourself a glass of wine or beer, then profit by rebooting and testing root. Hope this helps, let me know with a "Thanks!"
    3
    Awesome! Thanks, I'll get a quick tutorial video up once I get my hands on an M9