[One (M9) General] sishirbaid:
**** if you are looking for rooting your one m9 with android 6.0 , follow this simple guide of mine (http://xdaforums.com/one-m9/general/best-unlocking-bootloader-rooting-guide-t3087354 ) ****

:cool::cowboy:HELLO EVERYONE WITH A ONE M9:cool::cowboy:

heres what you've got to do to unlock the monster in your device

1)unlock the bootloader

2)use a custom, more powerful recovery

3)root your phone

4)use a custom rom

you must have working adb and fastboot and htc drivers, if you dont know how to get these files, pls leave a reply.

Now We Will Learn 1,2,3,4

STEP 1:

NOTE:- YOU WILL LOSE YOUR DATA(Unless you have a dev edition htc onem9 , if u have one , skip step 1)

follow these steps:-

A]create a htc dev account here-https://www.htcdev.com/register/

B]go here , make sure ur logged in on htc dev website! -http://www.htcdev.com/bootloader/unlock-instructions/page-2

C] dont download anything ! from htc dev website.

D]connect ur phone to pc and enter download mode :- adb reboot download

E] type the following in cmd< fastboot oem get_identifier_token > look at the pictures on the web page, link in step B, as to how to mark and copy your token identifier code , then paste it in the space provided bellow.

you will get an email from htc dev with a file called Unlock_Code.bin

download it and in cmd type < fastboot flash unlocktoken Unlock_Code.bin>

now, use ur volume buttons to select unlock bootloader and press power button.

FACTORY RESET !

NOTE:- if you have problems following these steps , check out this bootloader unlocking video. im sure it will help you.

https://www.youtube.com/watch?v=Stl4A-ue5IE&app=desktop

DONE! bootloader unlocked

STEP 2:

Note: HTC one m9 is different from previous generation htc ones as it has a block based ota update system. in brief, any modification done to the system will result in an ota update faliure. keeping that in mind, follow my steps as it is

A] download the recovery.img here we are using a beta version of twrp.

http://xdaforums.com/devdb/project/dl/?id=11987

after downloading, rename this file to twrp.img

Also download su bineries+ supersu (required for rooting later)

http://download.chainfire.eu/735/SuperSU/BETA-SuperSU-v2.48.zip?retrieve_file=1

put this file on ur sd card now!

B]go to download mode

type this adb command: adb reboot download

C]go to the directory where you have downloaded the recovery image

type in this fastboot command as soon as the phone is in download mode: fastboot flash recovery twrp.img

DONE!

STEP 3:

A]enter bootloader

B]enter recovery

C] TAKE A BACKUP. A COMPLETE BACKUP . MOST IMPORTANTLY <<<<SYSTEM>>>> DO NOT SKIP THIS STEP. THIS IS VVVVVVV IMP. IF U WANT TO TAKE AN OTA UPDATE EVER WITHOUT RUNNING ANY SORT OF RUU.

D]once thats done, go to advance->terminal and type this as it is:-

mount -t ext4 /dev/block/bootdevice/by-name/system /system

once this is done, go to mount and make sure system is selected.

now install the zip file i had asked you to download in the previous step.

DONE! You are rooted!

if You have forgotten to take a system backup, dont worry, you can find it here, you can flash it at the time of an ota,

https://www.androidfilehost.com/?fid=95916177934550813

STEP 4:

A]For a custom rom , download the customrom.zip file

browse the zip file and extract the file called boot.img

now , put the zip file on ur phone storage or sd-card.

boot to recovery and install the zip file. make sure to wipe cache,dalvik cache, system, and-secure before installing for a clean install, leave data as it is .

IF YOU ARE S-OFF, SKIP THIS STEP:-

B] reboot to download mode and type this fastboot command from the directory you unzipped your rom or extraced the boot.img:-

< fastboot flash boot boot.img>

reboot and enjoy your custom rom !

EXTRA SECTION (VVVVVV IMP)(TO TAKE AN OTA update)

if ever you get an ota update heres what you have to do . do not download it now. first follow these steps.

A)download stock recovery from here:-

https://www.androidfilehost.com/?fid=95916177934554373

rename it as recovery.img

B) download system.img from here ( only if you have not taken the system backup from twrp when in r/o state)

https://www.androidfilehost.com/?fid=95916177934550813

take only the system.emmc.win file from the twrp backup of the original system i had asked you to make before rooting your phone. if you dont have it? you will have to hunt for an ruu, well dont ask me how to do that .

put the system file and recovery.img and put the same folder. run cmd from that folder (right shift+right mouse click ->run command window here)

and type in

adb reboot download

fastboot flash system system.emmc.win / fastboot flash system system.img (depends if you are using a twrp backup or the system image you have downloaded from above)

fastboot flash recovery recovery.img

fastboot reboot

thats it. now download the ota update and once the installation is done, you will need to re-root. follow from step 2 again.

if you get a boot-loop, return to download mode, flash the twrp beta recovery and wipe cache and dalvik-cache. and then reboot , then go back to download mode and re-flash stock recovery.

hope ive helped you :)