[International] The HTC One root thread

this thread is intended to be a "one stop shop" for rooting any variation of the HTC One.

currently,the known method of rooting is to unlock the bootloader via htcdev,then use a custom recovery to install superuser root files. htcdev's directions can be a lil confusing,so hopefully this will clear it up if youve never rooted a phone,worked with the command window,or are just confused about how to set things up with your PC/mac/linux machine.

for your convenience,a general index of this thread:
-brief explanation of what you're going to do and what your options are post #1
-tips and tricks to backup data pre-root post #5
-unlock and install recovery with windows post #2
-unlock and install recovery with linux post #3
-unlock and install recovery with a mac post #4
-tips and tricks to backup data post root post #6

before you start download a couple of files
-miniadb
-supersu from this thread (the download link you want is about halfway down the page,and labled UPDATE-SuperSU-v1.25.zip)
-go to HTCdev - Unlock Bootloader and register an account

-install drivers: if you have htc sync installed,you should allready have drivers. if not,you can install htc sync,or install these modified htc drivers from revolutionary (driver mirror)
-unzip your miniadb_v1031.zip file. this is native funtionality in windows 7. you otherwise may need a utility such as "7-zip" to extract,or unzip it. place the unzipped folder onto the root of your C drive on your PC. root means the top level,not inside any folders. so just copy and paste,or drag and drop the folder onto C with everything else that is there. you may want to rename it to "miniadb_m7" since youll be putting some device specific files in here.
-open a command window. on windows 7,click the start bubble in the lower left and type "command" in the search box. xp i believe is similar or the same. doing this should open a small black command window.
-change to your miniadb_m7 directory. type the following at the prompt in your cmd window:

cd c:\miniadb_m7

your command promt should change to "c:miniadb_m7>" provided you: 1)unzipped the miniadb_v1031 zip file,and 2)put the folder on your c drive,and 3)entered the name of the folder correctly ("miniadb_m7" in this case)

-now make sure usb debugging is checked in developer options(you will need to turn it on first),and plug your phone into your PC with a usb cable
-make sure your phone is being recognized- type:

adb devices

if your drivers are installed correctly,this should return your phones serial number. you should hear the "found device" noises when you plug your phone in. if it starts installing drivers,wait for it to finish before typing the adb devices command.

if you get your serial number back,then enter this command:adb reboot bootloader

this should take your phone to the "fastboot" screen,wich is white with colored letters. this is one mode of your bootloaders interactive modes. at the top youll see fastboot devices as confirmation youre in fastboot.

now enter:fastboot devices
again,this should return your phones serial number. you should hear the "found device" noises when you plug your phone in. if it starts installing drivers,wait for it to finish before typing the adb devices command.

if you get your serial number back,you can enter the following to boot back to the phones OS:fastboot reboot

and now,youve installed adb/fastboot and tested youre phones drivers. if at either spot,you have trouble and dont get your serial number back,there is some sort of connection issue. use these steps to troubleshoot:

troubleshooting connectivity issues:
-try a reboot of the PC
-try different usb cables and ports
-dont use a usb hub
-dont use usb 3.0
-make sure nothing capable of comunicating with the phone is enabled and running. htc sync,pdanet,easy tether,and even itunes have all been known to cause issues.
-windows 8 has been known to have issues. try a windows 7 or older machine

failing that,try manually updating the drivers in the following manner:
-put the phone in fastboot mode(select fastboot from the hboot menu)
-open device manager on the PC
-plug in phone,watch for it to pop up in device manager.
-update drivers with device manager,pointing the wizard to the extracted
driver download folder from above

note that you can check the connectivity of the phone,and make sure drivers are working by in the following manner:
-open cmd window. change to directory containing adb/fastboot utilities

-adb with the phone in the booted OS,usb debug enabled,enter:adb devices in a cmd window

-fastboot with phone in fastboot,enter:fastboot devices in cmd window

in either case,a properly connected phone with working drivers installed should report back the phones serial number.

Click to expand...

this process,in your cmd window,should look something like this:

Code (Text):

Microsoft Windows [Version 6.1.7601]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Scott>[COLOR="red"]cd c:\miniadb_m7[/COLOR]

c:\miniadb_m7>adb devices

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

List of devices attached

FAxxxxxxxxxx device

c:\miniadb_m7>[COLOR="red"]adb reboot bootloader[/COLOR]

c:\miniadb_m7>[COLOR="red"]fastboot devices[/COLOR]

FAxxxxxxxxxx fastboot

c:\miniadb_m7>[COLOR="red"]fastboot reboot[/COLOR]

rebooting...

finished. total time: 0.037s

c:\miniadb_m7>

you are now ready to unlock your bootloader!

1)unlock using htcdev

*note if you were fortunate enuff to grab a developer edition htc One,it came with an ***unlocked*** bootloader allready,so skip to step 2 to install a recovery

-open a cmd window,change to miniadb_m7 directory,and plug in your phone as described above.
-go to HTCdev - Unlock Bootloader and sign in to your account.chose "All Other Supported Models" from the

-----select your device-----

Click to expand...

box,and click the green "begin unlock bootloader" button underneath.
-click yes to procede,then read the warnings before checking the boxes and clicking yes to continue,as they are basically explaining that your warranty is now void,and any repairs that your phone needs that may have been a result of unlocking your bootloader and messing with your phones operating system may no longer be covered under mfgr warranty
- have the htcdev site open,as you follow this guide,youll need to interact with it to submit your token.

-steps 1-4 are describing how to get your phone into bootloader mode and connect it to your PC. ignore these steps and simply type in your cmd window:

adb reboot bootloader
your phone will boot to fastboot.

fastboot devices
to make sure its connected

-click the green procede to step 5 bubble.
-steps 5-7 are telling you how to find the files and utilities inside your mini-adb folder. you have them,so ignore steps 5-7.
-click the green procede to step 8 bubble.
-heres where steps are important,steps 8-10 are telling you how to get your unlock token,and send it to htc. its phone specific(so they prolly know your serial number,meid,etc) so no,you cant use your buddys unlock token and not have htc know that youve unlocked your bootloader. copy this line either from below,or from step 8,and paste it into the prompt in your cmd window. you have to right click to paste in cmd,you cannot control/v :

fastboot oem get_identifier_token

-after you hit enter,you will get a bunch of letters that are your identifier token. not much i can say,other than follow the directions in steps 9 and 10 to copy and submit your identifier token to HTC. make sure you get the characters as shown in the pic,with no extra lines or letters. note that you can also hit the "enter" key on your PC to copy,as well as right clicking.
-click the green submit button. wait patiently for an email containing your unlock code. (dont worry,it should come pretty fast )
-save the unlock_code.bin that htc sends you directly to your miniadb_m7 folder(if your PC automatically downloads somewhere else,no biggie. just move the unlock code to miniadb_m7 folder)
-click the link in your email to get the rest of the unlock instructions
-step 12 is where them magic happens copy from below,or from htc dev:

fastboot flash unlocktoken Unlock_code.bin

-youll see the purdy screen pictured in step 13. use the vol rocker to chose "yes unlock bootloader" and select it with the power button. your phone will reboot,performaing a factory data reset in the process. your data is gone,sorry this boot may take a bit longer than they normally do,dont freak out this is normal

question: what is the difference between temporary and permanent recovery?

the temporary recovery is just that. it is NOT permantly installed on your phone,it is just booted directly into the phones memory so you can use it. the stock recovery is still in place,in your phones recovery partition. as soon as you reboot from the temporary recovery,its gone. you wont see it again until you launch it again.

a permanent recovery is just that. it is permantly installed on your phone,in place of the stock recovery. it is always there,and you can boot to it at any time,wether connected to a PC or not

question: wich option should i pick?

*important note: the temporary recovery is only working with 1.44.0000 hboots. so if your device is running a newer hboot,your decision is easy,you must permantly install recovery. in most cases,a stock recovery can be re-installed later if you wish to recieve OTAs. please ask about this if there are further quewstions.

if youre still on hboot 1.44.0000:

if all you need is root access to run a couple of root-requiring apps,consider leaving the stock recovery in place. in some cases,this will allow OTAs to occur naturally. YES,the OTA will break root. its no big deal. one good thing about htcdev is that you will always be able to reroot after,simply by following steps 2 and 3 again to launch recovery,flash superser.

if you want to flash roms,or mod your stock rom heavily,the most common option is to go ahead and permantly install your recovery. that way you wont always have to hook it to a PC to boot to it,and do some things.

if you want to mod your device,and/or flash custom roms,a good option is to do both permantly install recovcery on your phone. however,if you need to restore a backup or flash a rom,launch the temporary recovery instead of booting to your permanent one

however,there are disadvantages to the permant recovery. most notably, it CANNOT INSTALL KERNELS. therefore,restoring backups and flashing roms will require a seperate flash of the kernel,aka the boot image.

first thing youll need to do is download a recovery image for your particular variation:

*important note:DO NOT use sprint recovery on other models,or vice versa

once youve either skipped past all the setup,or have re-set up and are ready to root,chose either of the following options to either permantly or termporarily install a recovery:

1)temporary recovery:

-move the recovery image file from the zip file you downloaded above and place it into the miniadb_m7 folder. rename the image to simply "recovery" if its is something else.
-put the superuser zip file onto your phones sd card
-enable usb debugging once again,as above. open a cmd window,if its not still open from unlocking.
-if you had to re-open a cmd window,dont forget to change back to your miniadb_m7 directory:

cd c:\miniadb_m7

-make sure youre connected by typing:

adb devices

-should return serial number
-check the md5 of your recovery image:

md5sums recovery.img

**make sure the resulting md5 matches the one listed for your device**

-move the recovery image file from the zip file you downloaded above and place it into the miniadb_m7 folder. rename the image to simply "recovery" if its is something else.
-put the superuser zip file onto your phones sd card
-enable usb debugging once again,as above. open a cmd window,if its not still open from unlocking.
-if you had to re-open a cmd window,dont forget to change back to your miniadb_m7 directory:

cd c:\miniadb_m7

-make sure youre connected by typing:

adb devices

-should return serial number
-check the md5 of your recovery image:

md5sums recovery.img

**make sure the resulting md5 matches the one listed for your device**

-youll see a (really fast) green status bar on the top right as your PC sends the recovery to your phone,then a (really,really fast) red bar as it flashes it. your recovery is now permanently on your phone when you need it.
-reboot your phone with:fastboot reboot

be aware that you can no longer accept OTAs

-after the phone reboots,you can access recovery from the booted phone with this command:adb reboot recovery

-youll then see the HTC splash screen,then your recovery.

*note that you can still launch recovery by using the command from scenario 1 above.

there is not much to explain with this one. if booted to recovery from above,use the recovery menu on your phone to:
*make a backup of your stock,unrooted rom. this is NOT an option! please... do it.
-wipe cache
-wipe dalvik cache
-install zip from sd card(chose your superuser file)
-reboot

*congratulations,youre rooted

*special notes on superuser i know that the link for supersu says the best way to install superSU is to download from the market. it is refering to rooted devices ALLREADY RUNNING SUPER SU.

an extremely common error is to not follow the above directions to flash the zip file in recovery,but to attempt to download and and install from the market.

THIS WILL NOT WORK

you will need to download the newest superSU from the thread as i describeb in the download section,and use the recovery menus to flash it.

Many thanks for your extremely detailed and comprehensive outline of rooting. You mention sources for image recoveries for Sprint and international. Do you have any idea where to look for other recoveries? I guess I would need one for Telus (Canada).

Many thanks for your extremely detailed and comprehensive outline of rooting. You mention sources for image recoveries for Sprint and international. Do you have any idea where to look for other recoveries? I guess I would need one for Telus (Canada).

I'm with Virgin Mobile (AKA Bell Canada).
Can get into bootloader and see UNLOCKED.
Attempting temporary recovery.

Upon running fastboot boot recovery.img my One just restarts and boots up like normal. MD5 sum on image checked out. I tried a few different recovery images as well - can't actually boot into any of them.

IHave you tried the sprint image? Virgin mobile I believe a cdma carrier,so the gsm images will not likely work. Sorry if the Canada comment above was.confusing(telus is gsm)

A word of warning,some folks(myself included) have had issues flashing superuser from the temporary recovery. The flash appears fine,but upon reboot,no Su in app drawer and root access.

If you have this same issue,don't beat yourself up trying to get it to work,just go ahead and permantly install it. Here's what I did to have a copy of my stock recovery:
-fastboot boot clockwork(not twrp)
-make a backup. your stock recovery will be in the nandroid
-reboot to bootloader
-install recovery of choice permantly
-reboot
-reboot to recovery
-install superuser
-reboot and have root acess

First off, great guide. I am, however, running into a bit of an issue that lordemporer seems to be having as well. When I attempt to flash the recovery image I get the small green line at the top right hand side of the screen and the return is very similar to what you posted. The problem is, that after I reboot the phone normally and attempt to reboot the phone into recovery the phone simply reboots normally.

Here's a copy and paste of what I did. Also, I renamed the recovery file name to twrp.img.

I tried a few more things this morning including trying to use a temporary recovery and the permanent recovery. Each and every time the phone reboots it reboots as normal. I also attempted to reboot the phone while in fastboot using the selection option of loading the recovery. That too, did not work. At one point I remember seeing the little red letters at the top of the screen saying the phone was booting into recovery but that flashed very quickly then the normal green HTC logo showed back up again and the phone booted normally.

I've also tried with Fast Booting option on and off in the power settings menu. Neither way worked.

Ok, I got it figured out, finally! When you reboot the phone after you flash the recovery image you want to make sure you HOLD DOWN the power button. Otherwise the phone will reboot as normal. If you HOLD DOWN the power button it'll stick to it's recovery reboot. Luckily this is something I had to do with my old Galaxy S3 so I thought to give it a try.

hi chooched! sorry for my late response,i was going to suggest some basic connectivity checks,as alot of times bad usb cables,things running on the PC,and other small issues can interfere with the image flash,even tho it may look successful.

thanks for sharing your finding,as ive never experienced that on an htc phone before and would not have thot to have you try it im sure lots of folks may find it useful

So I went ahead and tried the permanent recovery option + holding the power button and that worked. I was nervous about this option given the difficulties with temporary recovery but decided to go ahead with it anyway.