[HOW TO] Unlock bootloader, Root, Flash Custom ROM, Flash Kernel And More!

Search This thread

Xerro-Five

Senior Member
Apr 16, 2013
243
90
Vancouver
Firstly thank you very much for your helpful post, that's the first time I've seen it explained so nicely! :D Also apologies for the late reply, I've been researching. So from the friends I've spoken to who have rooted without unlocking as well the posts I've read (in more detail now) have used scripts that utilize security holes in the stock software to get things like superuser on. For example one such approach exploited a short delay in accessing the stock recovery to redirect it to a custom recovery first. I can now confirm that this works because I physically held an Xperia ZL in my hand that said "bootloader: locked" but confirmed as rooted.

Now I haven't seen a lot of mention of these approaches for the One specifically (perhaps because this excellent all in one tool exists :)) but I'm curious if one method would be better that the other? That is, is it better (safer, more stable, more reliable, more complete, etc.) to unlock first as as done here, vs using security exploits?

Sent from my HTC One using xda app-developers app

EDIT: sorry for some reason the quote didn't work. I was referring to vin4yak 's post on page 22 http://xdaforums.com/showthread.php?p=41245977
 
Last edited:
May 19, 2013
10
0
york
help lol

Thanks.. Worked perfect.. Anyone having trouble with unresponsive recovery screen will need to download 2.4.0.0 version of twrp :)
 
Last edited:

Flashy1272

Member
Jan 4, 2013
47
5
Heanor, Derby
hi any one know why i cant connect via usb to pc to swap files works on viper rom but not ice cold jelly or xenonhd tried updating driver but wont have it ............thx
 

bk73w

Senior Member
Dec 21, 2012
241
36
trying it now will lent you know how it goes. Should add Holo backup to your instructions so people can keep their stuff.
 

fx.lagwagon

Member
Jan 26, 2012
18
0
Louvain-la-Neuve
I've to sent my htc One X to htc for repair.
I want to put it back to stock before, to be sure they are not rejecting the warranty repair.

Currently I am using a SkyDragon Rom with JB 4.0.4, HBTOO 1.31.0000 Clockwork v5.8.0.4.
I've got no nandroid backup, is it still possible to revert to stock ?
 

vin4yak

Senior Member
Mar 10, 2013
4,351
2,423
31
Mumbai
vinu.info
I've to sent my htc One X to htc for repair.
I want to put it back to stock before, to be sure they are not rejecting the warranty repair.

Currently I am using a SkyDragon Rom with JB 4.0.4, HBTOO 1.31.0000 Clockwork v5.8.0.4.
I've got no nandroid backup, is it still possible to revert to stock ?

Post of the result of this here:
Code:
fastboot getvar version-main

We will find a nandroid backup for you or a RUU so that you can get back to full stock! :good:
 

bk73w

Senior Member
Dec 21, 2012
241
36
Worked nice n easy with an HTC One on sprint, only downside is I cannot install busybox and when I try to do certain things my phone crashes

Sent from my HTCONE using XDA Premium HD app
 

MrAli_87

Member
Nov 27, 2012
5
0
Holywood
Bootloop - Bricked? Please help

I get as far as flashing the rom. I have tried sentinel rom and pure cm10.1. both flash fine but do not load up fully as I cannot install the kernel. It seems that once i move away from a htc sense based rom, the htc drivers become redundant and my phone no longer remains connected to the pc which means I am unable to flash the kernel. I hope this makes some sense. I have no idea how to fix this issue? i have played about downloading google drivers and trying to set them manually for the device but to no avail. Any advice would be greatly appreciated.
 
Last edited:

leFunk

New member
May 24, 2013
1
0
45
Bucharest
TWRP touch screen issue fix

Thanks.. Worked perfect.. Anyone having trouble with unresponsive recovery screen will need to download 2.4.0.0 version of twrp :)
When I found your post I had already managed to get past that, but here it is again for the other that will have this issue:

Code:
[COLOR="Blue"]Go to Backup and back up your boot and system partition[/COLOR]. Always have a back up before you flash or do anything.

So I got this far in the tutorial, but when I entered TWRP I can see the screen, but the touch doesn't seem to work - tried all buttons also, and only 'Power' works - and it just locks the screen, you cannot unlock or do anything as the touch screen is useless.

So here's the fix:
-> Go to the 'TWRP 2.5 - HTC One X (International / Tegra 3 / EndeavorU) page' [cannot post the url as I'm not allowed by the forum, but I'm sure everyone can find it by name] and follow the instructions provided there - briefly:
- download the .img file that ends in -JB.img from their servers
- reboot to -> FASTBOOT USB
- run the following command via the command line: fastboot flash recovery recoveryfilename.img

-> That worked for me - went to Recovery and I could use the touch screen and back-up my boot and system partition!
Then I was able to continue the steps and install SuperSu.

Thanks for the great tutorial, it's very much appreciated! :victory:
 

MrAli_87

Member
Nov 27, 2012
5
0
Holywood
Please help, this is really frustrating me!

Thank you Hasoon for this guide. I get as far as flashing the kernel and then it all falls apart. Throughout all of this every time I load up the bootloader it says USB master mode failed to connect - I don't know why this is the case but I assume it should connect and my problem would be fixed.

I can use your toolkit throughout using the htc drivers you give as step 1 but once the rom has been flashed and i leave recovery to bootloader i lose my connection to the pc and cannot get it back no matter what i try. This means i cannot flash a kernel and without this, everytime my phone loads up it does manage to load cyanogen rom and it does seem to work ok but every 1/4 of a second an error message pops up on my device about android.phone stopped working - something to that effect.

Anyone have any ideas about what I can do to progress?

Losing hope that i will ever enjoy romming fun, even though i am enjoying learning about it. Thank you everyone in advance for any replies.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 150
    Post 1: How to unlock your bootloader, flash a recovery and root
    Post 2: How to flash a custom ROM and kernel (boot.img)
    Post 3: How to reverse everything and go back to stock
    Post 4: How to ADB Sideload a ROM



    Alright. This is for everyone who wants to root their phone. I've seen MULTIPLE threads of the same question "Can I root my phone and How do I do it". So I hope I never have to see it again! In this tutorial, I use use my toolkit as the way to root. Doing it manually takes forever and that is why I made my toolkit.

    Requirements:
    HTC One X (charged to at least 70%)
    Windows XP,Vista,7 (8 is not officially supported since I don't have the drivers)
    USB cable
    Ability to read and follow step-by-step
    Understanding that I am no way guaranteeing anything. If you screw up your phone, you probably didn't follow my steps and made a foolish mistake.

    Let's begin.

    Download my toolkit from here.

    Link 1 and Link 2

    Extract the FOLDER to your C: drive or to your desktop.

    MAKE SURE YOUR DIRECTORY DOES NOT HAVE A PERIOD OR SPACE.

    Open One X.exe

    So now you have my program open. Great.

    On your phone, go to Settings -> Developer Options and Enable USB Debugging.

    From my toolkit, Click 1. Install HTC Drivers.

    After the drivers install, restart your computer.

    After your computer loads up, open my toolkit and connect your phone to the computer. Your phone should now be recognized.

    Now, click 2. Register at HTCDev. Register with a VALID email address and LEAVE the web browser open.

    Now, under the commands section of my toolkit, press Boot into Bootloader.

    You should have a nice, white, shiny screen that says FASTBOOT USB.

    Click 3. Get Token ID. Look at the pop up and it will tell you how to get the Token ID.

    Highlight where it says < < < < Identifier Token Start > > > > all the way to < < < < < Identifier Token End > > > > > and right click and it will automatically copy it.

    Now, click Submit Token ID. Your web browser should now open a new tab. Scroll down and in the empty box, paste your Token ID. Press submit. HTCDev now emailed you your unlock token.

    Your phone should still be in the bootloader. Now, go to the email address you registered to HTCDev and DOWNLOAD your unlock_code.bin. Press 5. Unlock Bootloader. Locate your unlock_code.bin and it will flash it to your phone.

    READ the warning. THIS WILL WIPE ALL YOUR DATA FROM THE PHONE.

    When you agree to it, press the volume up button and press the power button to accept it. Your phone will now restart.

    When your phone loads up, go through the set up wizard. Then, on your phone, go to Settings -> Developer Options and Enable USB Debugging.

    Under the Extras section, press Perm Root. It will push SuperSU.zip to your phone.

    Under commands, press Boot into Bootloader once again.

    Now, it is time to flash a recovery.

    TWRP (Team Win Recovery Project) is a custom recovery that will allow you to flash custom ROMs, Mods, etc.

    CWM (ClockWorkMod) is a custom recovery that will allow you to flash custom ROMs, Mods, etc.

    I recommend TWRP and we will use it for this tutorial,

    Select TWRP and press Flash Recovery.

    After it flashes, remove the USB cable and have HBOOT selected in bootloader. Press the power button and it will reload to another screen. Press the Volume Down button until you get to Recovery. Press the power button to select it.

    Go to Backup and back up your boot and system partition. Always have a back up before you flash or do anything.

    After that, go to Install and locate SuperSU.zip. Click it and slide the screen on the bottom to flash it. After it flashes, reboot the phone.

    In your app drawer (your menu with all the apps), open SuperSU. If it says the binary needs to be updated, then update it. If it doesn't, then you are fully rooted!
    66
    Post 2: How to flash a custom ROM and kernel (boot.img)

    The fun part! Now, I will teach you how to flash a ROM and boot.img

    Find a ROM you like, the first thing you should do is make sure it is COMPATIBLE with your phone. If you find a ROM that is for AT&T (Evita) and you have the International model (Tegra3), don't be an idiot and flash it. I will not help you with that since you already agreed to my warning from the first post.

    International models won't work on an AT&T HOX and Vice Versa.

    Also, DO NOT ASK IF YOU CAN FLASH A ROM FROM ANOTHER DEVICE!

    Will it work? NO! Will it ever work? NO! Can I flash it anyways? Brick your device, I don't care. I warned you.

    Let's get back on task. So you found the ROM you want to try, so go ahead and download it. KEEP THE THREAD OPEN! MAKE SURE YOU READ EVERYTHING AND REREAD IT AGAIN! READ WHAT USERS SAID ABOUT IT AND ABOUT BUGS! GO AHEAD AND READ THE WHOLE ENTIRE THREAD! GAIN KNOWLEDGE!!

    Connect your USB cable to your phone. View the folders on your phone. I like to make a folder called ROMs on my phone and transfer it in there.

    After you transfer it, open my toolkit and press Boot into Recovery. When you are in TWRP, MAKE A BACKUP!!!

    After you make a backup AKA a Nandroid, click Wipe. Wipe Cache, Dalvik, Factory Reset and System. NOTHING ELSE! If you click anything else, IT WILL WIPE YOUR SD CARD AND YOU WILL HAVE MORE ISSUES ON YOUR HEAD!

    So you wiped everything. Great. Your phone is ROMless, Yay!

    Now go back and press install. Go to the folder where the ROM you downloaded, is located in. Select the ROM and slide the screen to flash it. After it flashes, press the back button. Press Reboot and Reboot into bootloader. Open the ROM you downloaded from your computer. You should see boot.img. Extract it to your computer. Open my toolkit and press Flash a Kernel. Locate the boot.img and it will flash it.

    After it flashes, press reboot from the phone.

    Congrats! Enjoy your fully working or borked ROM! Remember, DO NOT ASK FOR ETAs, DO NOT BUG/PM A DEV ABOUT UPDATES, and BE RESPECTFUL TO THE DEVELOPERS!
    39
    Post 3: How to reverse everything and go back to stock

    Now, let's talk about getting back to stock. There are 2 ways to do this.

    1. Flash the stock RUU (If available) (Recommended)
    2. Restore your Nandroid (backup that I told you to make earlier)

    1. I'll talk about flashing the stock RUU first.

    Go here and download the RUU.

    http://xdaforums.com/showthread.php?t=1543604

    Download the correct RUU for your phone.

    Now, back up all your data (pictures, contacts, etc) since this will put your phone back to complete stock.

    Connect the USB cable to your phone. Press Boot into Bootloader.

    It should now say FASTBOOT USB on your screen.

    Press Relock bootloader. It may give you a security warning error or it may say failed. Who cares, ignore it. It's normal.

    Your phone will boot up normally.

    When the phone is fully loaded. Unplug and replug the USB cable back in the phone. Now,run the RUU you downloaded and follow the instructions.

    Your phone will be back to stock.

    2. Now, we will talk about restoring your nandroid backup.

    Connect your phone to the computer. Open up the folder to view the files on your phone.

    From your computer, Go to TWRP -> BACKUPS -> (Your hardware Serial Number) -> (Folder you wish to restore to) -> and copy boot.emmc.win to your computer. Rename boot..emmc.win to boot.img

    Open my toolkit and press boot into recovery.

    Click Wipe. Wipe Cache, Dalvik, Factory Reset and System. NOTHING ELSE! If you click anything else, IT WILL WIPE YOUR SD CARD AND YOU WILL HAVE MORE ISSUES ON YOUR HEAD!

    Press back and press Restore. Choose the backup to restore to.

    After it finishes, press the back button. Press Reboot and select bootloader.

    Open my toolkit and press Flash a Kernel. Locate the boot.img and it will flash it.

    You are now back to your stock Nandroid.
    38
    4. How to use ADB Sideload

    You may have seen what ADB Sideload around the forums but have no idea what it is. Since the HOX does not have an SD card, it makes things harder when you have to flash a ROM.

    Here's a scenario when we need to use ADB Sideload.
    1. You accidentally wiped your internal SD and have no ROM on your phone
    2. You wiped your ROM and forgot to transfer a custom ROM/have no backups(Nandroid) available.
    3, You have none of the above and there is no available RUU for your phone. <----- This is a real bummer.

    Here are the steps to load on a ROM
    I placed TWRP in my toolkit for a reason. CWM does not support ADB Sideload (as far as I know) and TWRP does.

    Boot into recovery manually. Turn your device off and hold the VOLUME DOWN + POWER button together until the BOOTLOADER pops up. Press the VOLUME DOWN button until you have selected RECOVERY. Press the POWER button to get into RECOVERY.

    Connect the USB Cable to your phone and computer.

    In TWRP, click "Advanced" and select ADB Sideload.

    Download a ROM to your computer (if you haven't already done so). Rename it as one word. For example CM10.zip, QX.zip, ARHD.zip, etc.

    In my toolkit, under the extras section, press ADB Sideload a ROM. Press "Yes" when it asks you if you are in recovery. Then select the ROM you want to install. It will then sideload it to your phone and flash it.

    After it finishes, press the back button. Press Reboot and select bootloader.

    Pull the boot.img from the zip file and extract it.

    Open my toolkit and press Flash a Kernel. Locate the boot.img and it will flash it.

    You now have a ROM on your phone!
    10
    1 more, just in case.