FORUMS

Analysis & Opinion

Top Forum Discussions

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

2,580 posts
Thanks Meter: 1,035
 
By dansou901, Recognized Contributor on 1st January 2013, 01:47 PM
Post Reply Subscribe to Thread Email Thread
Credits go to @nlooooo for starting this thread!

Quote:

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
Quote:

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.

http://developer.android.com/tools/help/adb.html
http://android-dls.com/wiki/index.php?title=ADB
http://android-dls.com/wiki/index.php?title=Fastboot
http://wiki.cyanogenmod.org/wiki/fastboot
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

Quote:

- Go to this address:

http://forum.xda-developers.com/show....php?t=2502327
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:
http://download.chainfire.eu/370/SuperSU
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
Quote:

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

Quote:

- 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
Quote:

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:

http://forum.xda-developers.com/show...7#post35735267
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
Quote:

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:

http://forum.xda-developers.com/show....php?t=2630531
http://forum.xda-developers.com/show....php?t=2667156
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 .

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
Last edited by dansou901; 6th March 2014 at 09:58 AM.
The Following 56 Users Say Thank You to dansou901 For This Useful Post: [ View ]
 
 
1st January 2013, 01:48 PM |#2  
OP Recognized Contributor
Flag Aachen
Thanks Meter: 1,035
 
More
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

Quote:

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.

Quote:

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:

Get CID and RUU 1.18.401.1 Compatibility
RUU Download page
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

Quote:

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:

ICS nandroid backups
Follow the instructions in the above thread to restore your backup.


Credits:
- Cobje - stock recovery img from latest update (1.18.xx)
http://forum.xda-developers.com/show...3&postcount=25
- Ranalakshay36 and Bedroom for the intel.
Attached Files
File Type: img stock_recovery.img - [Click for QR Code] (4.17 MB, 2396 views)
Last edited by dansou901; 9th December 2013 at 06:42 AM.
The Following 22 Users Say Thank You to dansou901 For This Useful Post: [ View ]
1st January 2013, 01:48 PM |#3  
OP Recognized Contributor
Flag Aachen
Thanks Meter: 1,035
 
More
Reserved once more...
The Following 6 Users Say Thank You to dansou901 For This Useful Post: [ View ]
1st January 2013, 02:05 PM |#4  
MaartenXDA's Avatar
Senior Member
Flag Amsterdam
Thanks Meter: 1,122
 
Donate to Me
More
Nice on nlo, will hopefully stop alot of the questions
1st January 2013, 02:38 PM |#5  
Senior Member
Thanks Meter: 61
 
More
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.
The Following 2 Users Say Thank You to nightcrow For This Useful Post: [ View ]
1st January 2013, 02:42 PM |#6  
nlooooo's Avatar
Senior Member
Flag Nis
Thanks Meter: 655
 
More
Quote:
Originally Posted by nightcrow

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.

Thanks, forgot about that while I was writing all this stuff.
1st January 2013, 02:46 PM |#7  
Senior Member
Thanks Meter: 61
 
More
I can imagine it's quite a story

Anyway well done and it will definitely be useful to the ones that are about to dive into the rabbit-hole.
1st January 2013, 08:43 PM |#8  
Izzy Stinson's Avatar
Senior Member
Thanks Meter: 74
 
More
thanks for the tutorial! very easy to understand and very simple.
The Following User Says Thank You to Izzy Stinson For This Useful Post: [ View ]
2nd January 2013, 10:43 AM |#9  
rogio2's Avatar
Senior Member
Flag Poland
Thanks Meter: 19
 
More
thanks for the tutorial! nice Job men.
2nd January 2013, 12:12 PM |#10  
ayyu3m's Avatar
Senior Member
Flag System Error
Thanks Meter: 262
 
More
a very well written master piece tutorial. absolutely easy use of english as well without most technical jargon. keep up the good work.

here after m gonna redirect such noob questions to this page.
The Following User Says Thank You to ayyu3m For This Useful Post: [ View ]
2nd January 2013, 12:16 PM |#11  
nlooooo's Avatar
Senior Member
Flag Nis
Thanks Meter: 655
 
More
Quote:
Originally Posted by ayyu3m

a very well written master piece tutorial. absolutely easy use of english as well without most technical jargon. keep up the good work.

here after m gonna redirect such noob questions to this page.

When an English gentleman says that's an easy use of English I somehow get delighted...

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes