[TUTORIAL] Unlocking, rooting, custom roms installing, going back to stock

Search This thread

Izzy Stinson

Senior Member
Aug 12, 2011
702
73
Ok, first I take knowledge of DOS command as mandatory for this, so I don't want to make a new post "DOS commands". As I stated before if you manage to unlock bootloader you know all this and I don't need to explain how to get there. If you don't have success with bootloader do not proceed further.

To boot into fastboot you don't need to remove the battery, simply choose restart from power menu and when the screen comes off wait for the buttons to turn off and immediately push volume down, the phone will boot to bootloader.

The command from fastboot:
fastboot reboot-bootloader​
will reboot your phone to fastboot. Also the command:
adb reboot-bootloader​
when your phone is on or it is in recovery will take your phone to fastboot. If you red the tutorial more carefully you wold fine part with rebooting from fastboot to fastboot when you flash recovery. And ok, I'll add part with turning off with vol down.

One more thing, evade turning phone off removing the battery, Desire S had emmc chip that knew to burn out in that way, and we don't know if HTC decided to install the same crap again but now in our phone.

When you successfully root you phone install app Rom Toolbox Lite from Play Store, it has Rebooter tool which you can set as a shortcut to the screen of your phone. It has next options:
reboot
fast reboot
reboot recovery
reboot bootloader (will take you to fastboot not bootloader screen)
power off
restart system UI

use it to reboot the phone to this mods.

Anyway, Izzy thanks for the tip, cheers.

so i guess the removing battery part only happened to me i guess. because i have tried like 6 times i restart my phone and immediately push down volume button it reboots normally. and also i try turning off my phone, hold down volume button and press power button it boots normally too. then i try removing and reinsert my battery once then finally it works with a single try to enter fastboot. i dont know why its weird lol.

thanks for the rom toolbox lite, it would come really handy for me :laugh:

amd your welcome, just wanted to improve the guide to help noobs without getting any trouble :D
 
Last edited:

neXus PRIME

Senior Member
Nov 22, 2011
3,547
4,540
Lahore, Pakistan
hi

so i guess the removing battery part only happened to me i guess. because i have tried like 6 times i restart my phone and immediately push down volume button it reboots normally. and also i try turning off my phone, hold down volume button and press power button it boots normally too. then i try removing and reinsert my battery once then finally it works with a single try to enter fastboot. i dont know why its weird lol.

thanks for the rom toolbox lite, it would come really handy for me :laugh:

amd your welcome, just wanted to improve the guide to help noobs without getting any trouble :D

Go in Settings - > Power -> Uncheck fast boot(for Quick boot). Then restart,
Now you wont face the issue.
Regards
 
  • Like
Reactions: w1040
I'm not actually a new user. Just can't access my old account as the email address is no longer in use.

I did try RUU which of course failed. But also tried PM66IMG.zip as well from bootloader. Still failed.

Does anyone think goldcard fails because cid is reversed from internal card as opposed to the sd card?

Sent from my HTC Desire X using xda premium
 

nlooooo

Senior Member
Oct 29, 2011
2,432
817
Nis
I'm not actually a new user. Just can't access my old account as the email address is no longer in use.

I did try RUU which of course failed. But also tried PM66IMG.zip as well from bootloader. Still failed.

Does anyone think goldcard fails because cid is reversed from internal card as opposed to the sd card?

Sent from my HTC Desire X using xda premium

It could be, but you can try with the tool I attached, you can chose both mmc0 and mmc1, try with both.
 
Last edited:

swissly

Senior Member
Jul 10, 2008
138
20
Thanks for this wonderful tutorial! I have three questions though: :eek:
- will my phone still have root access when I go back to the original recovery?
- do I also need to relock the bootloader to be able to apply OTA updates or is the original recovery enough?
- will my phone not factory reset/loose all settings when flashing the original recovery only?
 

nlooooo

Senior Member
Oct 29, 2011
2,432
817
Nis
Thanks for this wonderful tutorial! I have three questions though: :eek:
- will my phone still have root access when I go back to the original recovery?
- do I also need to relock the bootloader to be able to apply OTA updates or is the original recovery enough?
- will my phone not factory reset/loose all settings when flashing the original recovery only?

Ok, in order you asked:
- Most likely yes, but that's not the hardest part, you've already did it once?
- As I explained, flash stock recovery and relock bootloader, it's mandatory.
- Phone will not reset with flashing of stock recovery, nor with relocking of bootloader, However it will reset it when you unlock your bootloader after applying of OTA update.
 

sunnysigara

Member
Oct 23, 2010
21
4
first install update then root?

Ok. Today i got a system update which contains a software update to 1.18.720.1(32.93 MB). I haven't rooted my phone yet. So can I first install the update & then root?
 

rogio2

Senior Member
Apr 3, 2011
188
29
Poland
Hi, I have phone from play is a system update, it gets but I have a problem with the installation of the phone is uploaded CWM zrotowany and therefore do not want to install because it comes after a reboot in CWM, this is my first HTC and all the time to teach him what to do to update came, unroot a hint??
 

nlooooo

Senior Member
Oct 29, 2011
2,432
817
Nis
Hi, I have phone from play is a system update, it gets but I have a problem with the installation of the phone is uploaded CWM zrotowany and therefore do not want to install because it comes after a reboot in CWM, this is my first HTC and all the time to teach him what to do to update came, unroot a hint??

Page 1, post #2.
 

umo4u

Senior Member
Jan 16, 2013
245
47
Redmi K20 Pro
video tutorial

Ok, there's a tool for almost all of that. However, some find it confusing (I don't see why, tool is really awesome) and some (like me :D) hate flasher tools and like to do it the good old way. So here we go.


1. UNLOCKING OF BOOTLOADER



2. CUSTOM RECOVERY INSTALLING AND ROOTING


3. CUSTOM ROMS INSTALLING[/COLOR][/SIZE]




Ok, I did what I had promised, all suggestions and corrections are more than welcome.

All this came as 2 years experience with HTC phones (had Desire and Incredible S before), unlocking, rooting and taking their guts out :D.

Sources and links posted:
- HTC Developers site
- HTC Desire X All-In-One Toolkit made by Hasoon2000
- Android Developers site
- Cyanogen Wiki site
- PROTOU ClockWorkMod 5 NON-TOUCH made by Lloir
- Clockworkmod v6.0.1.5 NON-TOUCH made by Claudyy
- Clockworkmod v6.0.2.7 TOUCH made by Yasir
- AndroidSU made by ChainsDD
- SuperSU made by Chainfire
- Thanks to Izzy Stinson for pointing me to things not explained enough

please mate can ya make video tutorial of this one :) because some things re confusing as i am new
 

Top Liked Posts

  • There are no posts matching your filters.
  • 56
    Credits go to @nlooooo for starting this thread!

    WARNING
    I’m not responsible for bricked devices, all you do is on your own responsibility. Most of the processes I’ll mention will work with some vital parts of your phone, so if you don’t have enough courage or until you don’t understand all the things you should do I recommend not to get involved with this.


    Ok, there's a tool for almost all of that. Tool is updated, but you need to be sure to click the button for the right recovery, explanation below.
    1. UNLOCKING OF BOOTLOADER
    Everything starts with this. Unlocking of bootloader will allow you to make changes to some critical partitions of your phone (boot, system and recovery) and will allow you to flash custom recovery that can be used for installing of custom roms, mods and all kind of flashable zips. However, it won't s-off your phone, and other critical partitions (bootloader, radio) remain inaccessible.

    So, I won't explain how to do that. Why? Because if you successfully unlock bootloader on your phone it means that you received enough knowledge for the rest of the process and you're qualified to go further.

    This process will factory reset your phone (erase data partition) so backup your stuff before you proceed.

    Ok, now go to htcdev.com, register your account, go to unlock bootloader section, for the device choose 'All other supported models' and follow the instructions carefully everything is explained in details. Pay attention to 'Required resources' on the first page after confirmation - you need Android SDK platform tools Java Runtime Environment and HTC Sync installed and there are all needed links. Files mentioned in step 5 you will find in Android Bundle zip you downloaded in folder adt-bundle-windows-x86_64\sdk\platform tools.
    Here are some useful links about Android SDK platform tools, you won’t be needing most of it but it won't be bad to read.

    Remark: once unlocked bootloader can be relocked but can never be locked again. This can be done issuing command from fastboot:
    fastboot oem lock​
    This means that on the top of you bootloader screen you’ll have a sign RELOCKED instead of LOCKED, which is a notice to HTC that you unlocked it once. Plus they have data about all users that requested unlock_code so they can deny your warranty whenever they want.

    If you’ve successfully unlocked your phone bootloader we can proceed to the next step.


    2. CUSTOM RECOVERY INSTALLING

    - Go to this address:
    There you can find custom recoveries for DesX. Some of them have a few bugs but they are generally functional. Download one of your choice, rename it to recovery.img and put it on the root of c: drive on your PC. Before downloading, read the thread linked to carefully, as it is important to check your hboot before installing a custom recovery.

    Remark: you can use recovery image provided in WindyCityRockr's tool.

    - Go here:
    download SuperSU, connect your phone to PC and put it somewhere on your phone sd card.

    - Do not disconnect your phone from PC, reboot phone to fastboot on one of this ways :
    1. choose restart from power menu and when the screen comes off wait for the buttons to turn off and immediately push volume down, the phone will boot to bootloader, then select fastboot from bootloader menu
    2. issuing command
    adb reboot-bootloader​
    from command prompt that will take you directly to fastboot

    - once you’re in fastboot mode open command prompt, lead it to folder where you installed adb and fastboot (remark: unlocking bootloader guide pointed you to make a folder c:\Android for this) and issue commands
    fastboot flash recovery c:\recovery.img
    fastboot reboot-bootloader
    fastboot erase cache​

    The second and third commands are not quite necessary but they don’t harm and leave your phone with no trails of previous recoveries. Now you can disconnect your phone from your PC.

    3. BACKING UP STOCK ROM
    Now it is really important to backup your stock ROM. Dependent on your CID and hboot version, you can't use RUU to get back to stock, especially if your phone is branded by your carrier. Also, RUUs are only available for ICS bootloader (hboot 1.24 and lower). For JB there are only nand backups for a few CIDs uploaded by some nice xda members. So if you definitely want to be able to get back to stock any time, you'll have to backup your current configuration first. That's done by:
    Reboot your phone to recovery
    Backup -> Select all partitions -> Swipe to Backup​
    That will take some time. After that's finished, you should make a copy of that backup somewhere safe (it's located on the sdcard in folder TWRP, just copy the whole folder somewhere).

    4. ROOTING YOUR PHONE

    - From fastboot menu choose bootloader and then recovery to reboot phone to recovery
    - If you successfully boot to recovery choose options:
    Install zip from sd card
    Choose zip from sd card​
    Navigate to UPDATE-SuperSU-vx.xx.zip you stored on sd card and choose it. Once the installation is finished reboot your phone. Now you should see SuperSU app in app drawer and your phone is rooted.



    5. CUSTOM ROMS INSTALLING
    There are already quite a few ROMs available for our device. But watch out... many of them are discontinued, mostly the CM ROMs as well as the ROMs based off CM. Go here for the index:
    That’s the Index thread I created for all user to track development for our device. There you’ll find roms that can be installed.

    I have to emphasize that every chef gives an instruction how to install his rom, so here I’ll just give you the basics for custom rom installing using custom recovery.

    - Download the rom of your choice and put it on the sd card of your device
    - Unpack boot.img from rom.zip and put it on the root of c: drive on your PC
    - Reboot phone to recovery
    - Choose option ‘wipe data/factory reset’
    - Choose option ‘wipe cache partition’
    - Choose option ‘advanced’ and in next menu choose ‘wipe dalvik cache’
    - Go back to main menu and choose ‘install zip from sd card’ and then ‘choose zip from sd card’
    - Navigate recovery to rom zip you put on sd card and choose it
    - Wait until the installation is finished
    - Reboot your phone to fastboot and connect it to your PC
    - Open command prompt, lead it to folder where you installed adb and fastboot (remark: unlocking bootloader guide pointed you to make a folder c:\Android for this) and issue commands
    fastboot flash boot c:\boot.img
    fastboot reboot-bootloader
    fastboot erase cache​
    - Reboot your phone

    The last few steps are needed since there is no way to s-off our device, so boot.img included in rom.zip has to be flashed separately via fastboot.


    Remark:
    don’t ever forget for the golden rule of flashing ‘Always make a nand backup before you flash something'.


    6. S-OFF
    As S-OFF makes your device vibrating 7 tmes on each boot, you should really think about if you need it. If you are not sure about it, then it's not for you. If you still want to do it, go here:
    Use the first link to get to the files needed to do your S-OFF. In the second link you'll find the things you can do after the S-OFF procedure including downgrading the hboot in order to install RUUs etc.


    Ok, I did what I had promised, all suggestions and corrections are more than welcome.

    All this came as 2 years experience with HTC phones (had Desire and Incredible S before), unlocking, rooting and taking their guts out :D.

    Sources and links posted:
    - HTC Developers site
    - WinDroid HTC Desire X Toolkit v2.1 made by WindyCityRockr
    - Android Developers site
    - Cyanogen Wiki site
    - SuperSU made by Chainfire
    - Thanks to ckpv5 for nand ICS backup thread
    - Thanks to Izzy Stinson for pointing me to things not explained enough
    - Sources for recoveries can be found in my recovery thread
    - Thanks to GtrCraft for the idea to include the backup of stockrom
    - Thanks to nightwalkerkg and the rumrunners team for getting us the S-OFF
    - Again thanks to ckpv5 for the S-OFF tutorial
    23
    Going back to stock for official update

    Now to say more about a reverse part. The point of this is to make your phone available for official updates, and make it possible to do. Thanks to Ranalakshay36 and Bedroom we have information that you can apply OTA without need to relock bootloader on the phone. However, relocking is still mandatory if you want to install a fresh new rom using RUU.

    The first important thing for this is: PEOPLE, MAKE A NAND BACKUP OF STOCK ROM BEFORE REMOVING OF ANY APP FROM SYSTEM OR INSTALLING A CUSTOM ROM!!! This will make this process much easier to do.

    RECEIVING AND OFFICIAL UPDATES INSTALLING

    Part one:

    Ok, you just unlocked bootloader and rooted your phone (no custom rom installed), but you received a notification that you have an official update available and you want to install it. No problem at all if you didn't touch the apps on system partition (some of them are necessary for official support), and all you have to do are these 2 things:

    1. Reinstall stock recovery - I attached it. Remember the part about custom recovery? The process for this is the same:
    - download recovery I attached, rename it to recovery.img and put it on the root of c: drive on your PC
    - reboot phone to fastboot
    - connect it to a PC
    - open command prompt and guide it to the folder where you have adb platform tools installed
    - issue commands
    fastboot flash recovery c:\recovery.img
    fastboot reboot-bootloader
    fastboot erase cache​

    Now your phone should be ready to apply official update.

    Part two:
    1. You installed a custom rom, however you made a nand backup of your intact stock rooted, so all you need is to restore your nand backup and go to "Part one", that will do a thing.

    2. You installed a custom rom, however you didn't make a nand backup of your intact stock rooted, or you deleted some important files from system partiton. So, you're almost scre**d. I said almost because you can ask some of your geeky friends to borrow you his nand backup that you can use for restore.

    The best option is to revert back to stock using RUU, but that's currently limited only for devices with Europe based firmware. Here is the thread I made where you can find info about 1.18.401.1 RUU and CID compatibility and a way to check CID of your phone to make sure you can use it:


    To run RUU you need to relock your bootloader. This is how you can do it:
    - reboot phone to fastboot
    - connect it to a PC
    - open command prompt and guide it to the folder where you have adb platform tools installed
    - issue command
    fastboot oem lock​
    - the phone should restart automatically and you'll have a sign RELOCKED on the top of bootloader screen.

    After you successfully relock bootloader you can run RUU directly from fastboot. With earlier HTC models there was I a way to bypass CID checking and use any RUU to revert back to stock using a GoldCard, but someone told me that it's not possible with Desire X.

    Remark: once you relock bootloader it can be unlocked again in the same way you did it for the first time, and, of course, it will factory reset you phone. Also, going in this order is mandatory, cause if you relock bootloader before you flash stock recovery, you won't be able to do that with relocked bootloader

    If you can't run a RUU because of incompatible CID, you have to have a nand backup ready for restoring or else to find one in the forums. Here is a thread with different nand backups incompatible from the RUUs:

    Follow the instructions in the above thread to restore your backup.


    Credits:
    - Cobje - stock recovery img from latest update (1.18.xx)
    http://xdaforums.com/showpost.php?p=35031493&postcount=25
    - Ranalakshay36 and Bedroom for the intel.
    6
    Reserved once more...
    2
    Good job writing this tutorial!

    One small remark: unlocking bootloader via htcdev will hard-reset the device so all data on the phone will be lost. Might be useful to mention this so users can back-up as much as possible on an un-rooted device.
    2
    i finally unlocked my bootloader and rooted my phone with this method :good:

    i think you should update the command in this "- once you’re in fastboot mode open command prompt, lead it to folder where you installed adb and fastboot (remark: unlocking bootloader guide pointed you to make a folder "c:\Android)" TO "cd c:\Android"

    and also you should also mention that everytime if wish to enter fastboot, you need to remove and reinsert battery. if you go fastboot reboot, then go to fastboot again with voldown + power keys it will not work. you need to remove and reinsert battery then retry then it will work. at least thats what happened to me.

    and also i want you to update this "- Do not disconnect your phone from PC, reboot phone to fastboot on one of this ways :
    1. power it on holding power+vol down then select fastboot from bootloader menu
    2. issuing command" TO "disconnect phone from pc, turn off phone, then remove and reinsert battery then enter fastboot, then connect phone to pc again".

    other than it works smooth and my phone now rooted.