Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,770,637 Members 39,027 Now Online
XDA Developers Android and Mobile Development Forum

[Tutorial] Root, Unlock, Recovery and flashing a Custom ROM

Tip us?
 
ixrs
Old
(Last edited by ixrs; 19th June 2013 at 05:32 PM.)
#1  
Member - OP
Thanks Meter 118
Posts: 78
Join Date: Aug 2011
Default [Tutorial] Root, Unlock, Recovery and flashing a Custom ROM

This is long, but it's nice for noobs because it's detailed. It's honestly kind of fun, I promise. I'm assuming you have WINDOWS. This is based off of the guide by torxx!. It's modified because some of the info is outdated (you don't have to flash the boot.mg separately, for example). If you are NOT a noob you can just look at the "overview" for each step.

UNLOCKING YOUR DEVICE WILL WIPE YOUR DEVICE. THIS IS A SECURITY FEATURE. BACKUP FIRST.

Part 1- gaining unlock token

Overview: go to htcdev.com and unlock bootloader

Be sure you've turned off fast boot option in power menu; usb debugging should be on (settings -> developer options).

Go to http://www.htc.com/www/software/htc-sync-manager/[1] and install HTC SYNC. Alternatively, if you know what you're doing, you can install these drivers:
x86 http://www.mediafire.com/?qabo1tue2v1ky75 x64 http://www.mediafire.com/?8dl8s3l9mr6ggr9

Go on http://www.htcdev.com[4] and create yourself an account on HTCDEV.

Download these adb/fastboot files: http://d-h.st/RvD

Make a new folder anywhere. We'll use C:/fastboot as an example.

Extract the zip downloaded to the new folder

Go Here http://www.htcdev.com/bootloader/[6] and select "All Other Supported Models" and "then begin unlock bootloader" (check the boxes, click proceed, all that good stuff). YOU CAN IGNORE THE DIRECTIONS THAT THEY TELL YOU (and follow this guide instead).

Power off your phone. Power your phone on by holding power and volume down.

Highlight 'Fastboot' the volume buttons then press power to "select".

Plug your phone into your PC and open a Command Prompt. (windows XP - Click Start > Run > type CMD in box then press OK; Windows 7 - Click Start > type CMD in search box then press Enter) Change directory to your folder where we put fastboot files by typing cd c:\fastboot for example.*

*Alternatively, you can just hold down shift and right click in the folder and select "open command window here". Neat huh?

Type this into your command prompt window: fastboot oem get_identifier_token

Select & copy the text as per step 9 on the HTCDev website

Paste your identifier token into the box at the bottom and submit

You Will Very Shortly Receive an email from HTCDev with a link to the second part of the instructions and your "Unlock_code.bin" attached

Download the "Unlock_code.bin" from the email and save it to the same folder that we extracted fastboot files

Type this into your command prompt window: fastboot flash unlocktoken Unlock_code.bin

The Display Will change on your phone, press Vol+ to accept and power to confirm.

Part 2

Overview: flash your recovery. Boot into recovery. Turn phone off if it boots into OS. Boot into back into recovery. You're done!


Download a recovery:

TWRP (the one I use): http://forum.xda-developers.com/show....php?t=2173870

CWM 2: http://forum.xda-developers.com/show....php?t=2172979

CWM: http://forum.xda-developers.com/show....php?t=2173863

Place the Recovery file to the folder where the fastboot.exe is.

Same thing as above- boot (volume down + power) into the bootloader and highlight 'Fastboot' the volume buttons then press power to "select".

Do the same thing as with the command prompt above. This time, however, you'll be typing:

fastboot flash recovery "name_of_the_recovery.img"

For example:

fastboot flash recovery openrecovery-twrp-2.5.0.0-m7.img

then type:

fastboot erase cache

From the menu, boot into recovery (use volume to move up and down, power to select). The phone might boot to the OS instead of recovery, don't worry!

Turn off phone then turn on (while holding volume down) to boot back into the bootloader.

TAMPERED shows up, boot into recovery and now your recovery should be working!

Part 3- obtaining root

Overview: flash a super tool


Download a super user tool for root:

SuperSU (I use this one): http://forum.xda-developers.com/show....php?t=1538053

SuperUser: http://download.clockworkmod.com/sup.../superuser.zip

Alternatively, download this: http://forum.xda-developers.com/show....php?t=2252959. This is a stock rooted rom for ATT. If you download and flash this instead of the super user tool, you're done. (This rom includes super user) Or you can download a custom rom such as this one: http://forum.xda-developers.com/show....php?t=2183023

Turn on your phone again (and disable usb debugging) and connect to computer, copy the .zip super user tool to a location you remember ON the phone.

Flash it with the Recovery: Power off your device and then hold the VOL DOWN + Power to boot into the Bootloader Navigate with VOL and Power to Recovery Now flash the .zip:

- install zip from sdcard
- choose zip from sdcard
- select the downloaded SuperSU/SuperUser zip file and flash it
- Reboot now

You're not out of the woods yet! The stock kernel is system write protected, so you still can't modify it (changes won't "stick"). You'll have to flash a custom rom or a kernel if you want stock instead.

I recommend these kernels: http://forum.xda-developers.com/show....php?t=2255900 or http://forum.xda-developers.com/show...highlight=menu

Download it.

Installing custom rom/kernel ("flashing a rom")

Overview: Download Rom, boot into recovery and wipe and then flash.

According to Shenye, even though your device is s-on, you can still flash boot now. So just do this:

Turn on your phone again (and disable usb debugging) and connect to computer, copy the .zip kernel/cutom rom to a location you remember ON the phone.

Flash it with the Recovery: Power off your device and then hold the VOL DOWN + Power to boot into the Bootloader Navigate with VOL and Power to Recovery Now flash the .zip:

- install zip from sdcard
- choose zip from sdcard
- select the downloaded SuperSU/SuperUser zip file and flash it
- Reboot now
The Following 59 Users Say Thank You to ixrs For This Useful Post: [ Click to Expand ]
 
dc/dc
Old
#2  
Senior Member
Thanks Meter 7
Posts: 110
Join Date: Dec 2006
Location: In the boot of a stolen police car
I feel like this title should be changed to clarify that it's unlocking the bootloader, not the SIM lock.
The Following User Says Thank You to dc/dc For This Useful Post: [ Click to Expand ]
 
nest75068
Old
#3  
nest75068's Avatar
Senior Member
Thanks Meter 116
Posts: 895
Join Date: Feb 2012
Location: Dallas
Just wanted to say this tutorial was 100% dead on and what I used to unlock bootloader and root/rom my One.
Mine
LG G3 rooted w/ Towelroot - running Xposed framework and G3 Tweaks

Wife's
The Following 2 Users Say Thank You to nest75068 For This Useful Post: [ Click to Expand ]
 
Hemotherapy
Old
(Last edited by Hemotherapy; 17th May 2013 at 01:41 AM.)
#4  
Senior Member
Thanks Meter 30
Posts: 184
Join Date: May 2011
Oddity - Did everything, I've got root but I -AM- out of the woods. Was installing bulletproof mod through recovery but it kept failing due to missing a MD5 file or something -- Trying to work that out through that thread atm but anyway, rebooted the phone a couple of times now and I still have root, Tit back up works OR are we talking about things like CPU clocking won't work since it can't rewrite?
 
orangekid
Old
#5  
orangekid's Avatar
Forum Moderator
Thanks Meter 3032
Posts: 10,106
Join Date: Apr 2009
Sticking this.
 
DannySmurf
Old
#6  
Junior Member
Thanks Meter 2
Posts: 25
Join Date: Dec 2010
Excellent tutorial. One thing to add:

If you flash the TWRP recovery you link to, after TWRP boots for the first time, if you reboot into System, TWRP will offer to install SuperSU for you; no need to find another to flash. Once the system reboots, you can launch the GUI installer to finish the SU install (it will boot into TWRP and back one more time to do the actual flash).
 
Viceroy_N
Old
#7  
Junior Member
Thanks Meter 0
Posts: 19
Join Date: Feb 2011
Does anyone know if this will work on the Rogers HTC One?
 
Ken4G
Old
#8  
Ken4G's Avatar
Senior Member
Thanks Meter 54
Posts: 194
Join Date: Sep 2011
Location: Buffalo, NY USA
Thank you. Followed this last night. Worked flawlessly. The only thing that threw me was rebooting into recovery. It took maybe 3 or 4 reboots for it to say "TAMPERED" at the top. When it didn't say tampered, it would not boot to recovery.
 
richnanaimo
Old
#9  
Junior Member
Thanks Meter 0
Posts: 13
Join Date: Feb 2008
Location: Calgary
Default TELUS?

Quote:
Originally Posted by DannySmurf View Post
Excellent tutorial. One thing to add:

If you flash the TWRP recovery you link to, after TWRP boots for the first time, if you reboot into System, TWRP will offer to install SuperSU for you; no need to find another to flash. Once the system reboots, you can launch the GUI installer to finish the SU install (it will boot into TWRP and back one more time to do the actual flash).
Did you happen do run this tutorial on a TELUS device?
 
DannySmurf
Old
#10  
Junior Member
Thanks Meter 2
Posts: 25
Join Date: Dec 2010
Quote:
Originally Posted by Viceroy_N View Post
Does anyone know if this will work on the Rogers HTC One?
Yes it does. I have a Rogers phone, and it worked perfectly.

Quote:
Originally Posted by richnanaimo View Post
Did you happen do run this tutorial on a TELUS device?
No, I have a Rogers device. But the procedure should not be any different.

The Following User Says Thank You to DannySmurf For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes