[How To] Unlock Bootloader, Install Recovery and Root - HTC One X

Everytime I have to unlock,flash recovery and root I can't remember how to do it....
So I'm writing this very easy guide.
First off get the One X drivers from here:
https://forum.xda-developers.com/showthread.php?t=2217384
These are old drivers as HTC have stopped including them in HTC Sync.
Download Android SDK Slim from here:
https://mega.nz/#!8tETTbga!iVOYHGwT7SYV9s9AKqT6hukX-odb7PNuQCrX6zJxpwQ
Unzip it anywhere you like, desktop's easy but it can be anywhere...
Go to https://www.htcdev.com log in click on Get Started then Unlock Bootloader and choose All Other Supported Models from the dropdown.
Click Yes and Tick the two boxes for all the legal stuff.
Now go into your One X Phone Developer Settings and switch on USB debugging.
Next go to Power settings and switch off Fastboot.
Then connect the phone to your PC via USB cable.
Allow your PC to recognise it and download any stuff it wants to.....
Go make a cup of Tea while this is happening.
Next go to your SDK folder, wherever you ended up putting it, click through to the Platform Tools folder where you will see ADB and Fastboot.
Hold down Shift and Right Click anywhere in the folder, choose Open Command Window Here.
In Command Window Type: adb reboot bootloader
Your Phone will boot into Bootloader
Keep the Command Window open...from now until the very end!!
That has just skipped all the 4 Steps on the HTC Dev site!!!
Proceed to Step 5
Now in the Command Windows Type: fastboot oem get_identifier_token
You will see a long block of text. Copy and paste this text into the the token field on the HTC Dev site. Right Click choose Mark and highlight the square bit of code then press Enter to copy.
Paste that into the My Device Identifier Token
HTC will email you a little Unlock_code.bin file within seconds (Check your Junk folder)
Then copy or move the token to the Platform Tools folder.
Back to your Command Window which should still be open!!
Type: fastboot flash unlocktoken Unlock_code.bin
Now follow the instructions on the Phone....
The phone will Unlock the bootloader....
And Reboot your phone....
You need to go back to settings and switch on USB Debugging and switch off Fastboot (See start of tutorial)
Make sure you are still plugged into your PC
In Command Window Type: adb reboot bootloader and your phone will go back into the Bootloader screen.
Next go here: https://twrp.me/Devices/HTC/
Choose your One X and download an early version of TWRP as the newer ones need the old ones to be installed!!
The One X comes in different flavours so make sure you get the right one for your model....
For sake of argument say I downloaded this file: twrp-2.4.4.0-endeavoru.img
Place that file in the Platform Tools folder
Then in Command Window type: fastboot flash recovery twrp-2.4.4.0-endeavoru.img
This will install your TWRP Recovery!!!
Excellent...now you can unplug from your PC and boot into Recovery.
In TWRP select Reboot and it will ask you if you want to install SuperSU.
You do, swipe the screen and your phone will Reboot into the Operating System.
From there open the Super SU app and update your Super User Binaries...
And that's how to Unlock the Bootloader, Install TWRP Recovery and Root....
EASILY!!!!
:silly::silly::silly:
Hit Thanks if its Helped You!!

Related

Please help,,questions after Rooting...

Hello,first of all I apologize if posting in wrong section..I have a Acer iconia tablet A100..have to say love it..well other day did some reading and searching and decided to root it,I followed the following proceed( http://forum.xda-developers.com/showthread.php?t=1531646).worked perfect with no issues..thanks xda for making it simple. My question is what's the best way to install recovery and what are some of the good roms recommended I can use...I appreciate for the help..thank you..
Check this thread out http://forum.xda-developers.com/showthread.php?t=1711125 it has recovery and rom info plus alot more
OK do I download the unlock boot loader n extract files.and run it..just a lil confused bout the codes on the thread..
Cheony81 said:
OK do I download the unlock boot loader n extract files.and run it..just a lil confused bout the codes on the thread..
Click to expand...
Click to collapse
Go in order you'll be fine.
Root, which you already did.
Install the boot loader, just extract the files and run the script with it connected on USB.
After that, and only after, install a recovery and you can turn install custom ROMs. That guide covers it all if you spend some time reading before jumping in, always a good idea.
Sent from my HTC DNA
thank you..when it says volume up and volume down to pick,what happens if you hit the wrong one..( i hit wrong key and said cancelled or time out..hit the reset button and then started over and picked correctly this time and hit power buttom to restart tablet..Am i doing ok now..
pio_masaki said:
Go in order you'll be fine.
Root, which you already did.
Install the boot loader, just extract the files and run the script with it connected on USB.
After that, and only after, install a recovery and you can turn install custom ROMs. That guide covers it all if you spend some time reading before jumping in, always a good idea.
Sent from my HTC DNA
Click to expand...
Click to collapse
1- Open a command prompt in your working folder (usually in your platform tools, mine is C:\android-sdk-windows\platform-tools) make sure you are administrator.
2- Connect Tablet to pc and get excited.
3- Type: adb devices (verify your Tab is connected and listed)
4- Type: adb reboot bootloader
5- Once bootloader is in fastboot type: fastboot flash recovery recovery.img
You will see writing recovery, flashing recovery, etc.
6- Once flashed Type: fastboot reboot
7- Profit
im a lil confused on this part..i downloaded the image just confused on the steps and adb? command promt? and do i put debug on or off?
ok i found on how to open cmd. i follow instructions when i type adb devices it tells me adb is not recognized as internal or external command ?am i missing a step or doing something wrong.. 1- Open a command prompt in your working folder (usually in your platform tools, mine is C:\android-sdk-windows\platform-tools) make sure you are administrator.
2- Connect Tablet to pc and get excited.
3- Type: adb devices (verify your Tab is connected and listed)
4- Type: adb reboot bootloader
5- Once bootloader is in fastboot type: fastboot flash recovery recovery.img
You will see writing recovery, flashing recovery, etc.
6- Once flashed Type: fastboot reboot
7- Profit
Cheony81 said:
1- Open a command prompt in your working folder (usually in your platform tools, mine is C:\android-sdk-windows\platform-tools) make sure you are administrator.
2- Connect Tablet to pc and get excited.
3- Type: adb devices (verify your Tab is connected and listed)
4- Type: adb reboot bootloader
5- Once bootloader is in fastboot type: fastboot flash recovery recovery.img
You will see writing recovery, flashing recovery, etc.
6- Once flashed Type: fastboot reboot
7- Profit
im a lil confused on this part..i downloaded the image just confused on the steps and adb? command promt? and do i put debug on or off?
Click to expand...
Click to collapse
Cheony81 said:
ok i found on how to open cmd. i follow instructions when i type adb devices it tells me adb is not recognized as internal or external command ?am i missing a step or doing something wrong.. 1- Open a command prompt in your working folder (usually in your platform tools, mine is C:\android-sdk-windows\platform-tools) make sure you are administrator.
2- Connect Tablet to pc and get excited.
3- Type: adb devices (verify your Tab is connected and listed)
4- Type: adb reboot bootloader
5- Once bootloader is in fastboot type: fastboot flash recovery recovery.img
You will see writing recovery, flashing recovery, etc.
6- Once flashed Type: fastboot reboot
7- Profit
Click to expand...
Click to collapse
That means you aren't in the folder where your adb.exe is. It'll be in with your rooting files usually.
Sent from my HTC DNA
ok the files i have downloaded so far are(ICS_rooting_A10x_A5xx) used this one to root device. (fastboot recovery) which i used to unlock bootloader..what steps do i have to do now and do i need to have debug on?
pio_masaki said:
That means you aren't in the folder where your adb.exe is. It'll be in with your rooting files usually.
Sent from my HTC DNA
Click to expand...
Click to collapse
Cheony81 said:
ok the files i have downloaded so far are(ICS_rooting_A10x_A5xx) used this one to root device. (fastboot recovery) which i used to unlock bootloader..what steps do i have to do now and do i need to have debug on?
Click to expand...
Click to collapse
Debugging should be on.
Copy your chosen recovery.img to the folder where your adb.exe is, if its in the rooting folder, put them there.
For ease I would make a folder called root so its like this
c:\root
Place the adb and fastboot files in there with the recovery image.
Open a command prompt and type
cd c:\root
Type
adb devices
Should now work properly and list some numbers
Then do
adb reboot bootloader
Then
fastboot flash recovery recovery.img
Where recovery.img is the name of the recovery image you downloaded and copied to the folder with adb.exe
Sent from my HTC DNA
ok i open the ics rotting folder,in there i have a folder that says tools, adb image,fastboot image, fastboot, runit-win/ is the adb image the adb.exe you talking bout? honest;y i am lost.. i have rooted phones before but this cmd got me confused sorry..
pio_masaki said:
Debugging should be on.
Copy your chosen recovery.img to the folder where your adb.exe is, if its in the rooting folder, put them there.
For ease I would make a folder called root so its like this
c:\root
Place the adb and fastboot files in there with the recovery image.
Open a command prompt and type
cd c:\root
Type
adb devices
Should now work properly and list some numbers
Then do
adb reboot bootloader
Then
fastboot flash recovery recovery.img
Where recovery.img is the name of the recovery image you downloaded and copied to the folder with adb.exe
Sent from my HTC DNA
Click to expand...
Click to collapse
i did a lil more reading can i use A100 TWRP recovery (TeamWin Recovery Project) 2.2.0+..seems a lil more easier to be honest instead of cwm?
Cheony81 said:
ok i open the ics rotting folder,in there i have a folder that says tools, adb image,fastboot image, fastboot, runit-win/ is the adb image the adb.exe you talking bout? honest;y i am lost.. i have rooted phones before but this cmd got me confused sorry..
Click to expand...
Click to collapse
Cheony81 said:
ok i open the ics rotting folder,in there i have a folder that says tools, adb image,fastboot image, fastboot, runit-win/ is the adb image the adb.exe you talking bout? honest;y i am lost.. i have rooted phones before but this cmd got me confused sorry..
Click to expand...
Click to collapse
Once again, the folder that has adb.exe is where you need to be working from. Open a command prompt, cd to wherever that folder is, then do the commands. You can also hold shift and right click in the folder and choose command prompt to open it right there.
Sent from my HTC DNA
ok something is not right...you talking bout adb.exe.but when i look in the files that i mentioned earlier the only thing there is adb image and adb command window icon which if i click on it it runs for a sec and closes//
pio_masaki said:
Once again, the folder that has adb.exe is where you need to be working from. Open a command prompt, cd to wherever that folder is, then do the commands. You can also hold shift and right click in the folder and choose command prompt to open it right there.
Sent from my HTC DNA
Click to expand...
Click to collapse
Cheony81 said:
ok something is not right...you talking bout adb.exe.but when i look in the files that i mentioned earlier the only thing there is adb image and adb command window icon which if i click on it it runs for a sec and closes//
Click to expand...
Click to collapse
Your show extensions are off. The one that opened the prompt was it. Its not run directly, its used in a command prompt with a command. Open your prompt there or change its directory to where it is, then carry on with the instructions.
I take it all your other rooted devices had one click setups, this is a very basic device to work on, it just doesn't have a program doing it for you. This seriously should take as long as it took me to write this post to do from start to finish.
Sent from my HTC DNA
ok figured it out now i put all files together now..should i leave it in my documents or put it in my c folder..
is it power+vol up or down
I think its power on with the volume closest to the power button for fast boot, its been awhile though it may be the other one.
Sent from my HTC DNA
i just did it and showed android guy then showed him laying down with a red triangle simble coming out his stomach
Cheony81 said:
i just did it and showed android guy then showed him laying down with a red triangle simble coming out his stomach
Click to expand...
Click to collapse
Then try the other one.
Sent from my HTC DNA

[Q] Trouble with flashing new recovery

Hey everyone,
Alright so I have been trying to root my phone for the past 4 hours. I have unlocked it and flashed a custom recovery using adb. Or at least I thought I did. I tried flashing the clockworks recovery and when I would reboot it into the recovery, I would get an icon of a phone and an exclimation point. I assumed a bricked the phone and freaked out. A minute later the phone rebooted out of recovery and works fine afterwards. So I assume that the problem is the recovery. Something went wrong and I am not sure what.
Here are the steps I followed:
I was fine up until step four when I was trying to flash superuser.
No idea what to do from here.
HTC Unlocked = Bootloader is unlocked?
Not to take away from the OP, but i created a guide for a guy here at work and thought others might benefit from it.
Unlock Bootloader and Root
Unlocking your bootloader will wipe all data from your phone. Meaning you will loose everything make a backup.
Step 1: ADB Installation Instructions. NOTE:You must have ADB installed on your PC even if you use method 2b to unlock the bootloader. You will need adb to install recovery in Step 4.
1. Go to http://developer.android.com/sdk/index.html and download the sdk.
2. Follow installation instructions found here. Note: This is not a forum for this device DO NOT do anything but the adb installation on your system.
Step 2a: Download software from HTC to allow your bootloader to be unlocked.
1. Go to http://www.htcdev.com/
2. Login to the website. NOTE: Register for an account if you haven’t already. You must provide a valid email address.
3. Select “All Other Supported Models” from the drop down list and click “Begin Unlock Bootloader”
4. Follow online instructions.
1. SuperUser http://androidfiles.org/securekey.ph.../superuser.zip - Copy this file you phone. Special thanks to jmztaylor his link.
2. Recovery of your choice TWRP Recovery http://forum.xda-developers.com/show....php?t=2161702 or CWM Recovery http://forum.xda-developers.com/show....php?t=2161706. Put this file in the ADB Tools folder. NOTE: You must type the name of this file perfectly when using adb to flash it in step 4.
Step 4: Using ADB to install recovery
1. Open command prompt ( shift + right click, then choose “Open command window here”) and type “ADB devices” you should see you phone listed, if you do not start over at Step 1. NOTE: Phone must be plugged in and USB Debugging must be checked in settings.
2. Type “ADB flash recovery recovery.img” without the quotes. NOTE: the red is actually the title of the recovery file that you copied in step 3. If it’s different substitute your files name instead.
3. Once complete type “ABD reboot recovery”.
4. You should at this point backup your device
5. Once you create a backup, Choose install and navigate to the SuperUser file you put on your phone in Step 3.
6. If all goes well you are now rooted. Select reboot system to restart phone.
There is some very good information here but its spread out pretty thin. Guides IMHO are very usefull to fill the gap between devs/powerusers and the newbs.Most people that come here have a hard time with the things we take for granted such as adb commands, or adb its self (most will be setting it up for the first time). I tried my best to put it in a knowledge base that everyone can understand if for some reason you do not understand what i was trying to say please ask. I don't own this phone, just helped a friend root his, but if you need to get ahold of me pm me. I'll get back to you as soon as possible.
Any help? Just trying to get rid of the bloatware -_-
Did you copy superuser to your phone? And are you sure you are using the correct file location for adb in the command prompt? You must make sure you are and that all files you want to flash are also in the same folder as adb. Please respond if you have superuser on your phone and if you are positive you are using the correct adb folder location for the command prompt. I'm not the best at this however, I read up a lot on it just to root my phone. Took me 4 hours about as well, but that was before the recoverys came out. I suggest trying to flash twrp recovery, it's a bit buggy (for me) but I find it easier to use.
Sent from my HTC One VX using xda app-developers app
Code:
ADB flash recovery recovery.img
that is your problem to start with its not "ADB flash"
boot your phone into bootloader with usb connected to PC, Phone should read "fastboot"
Go the your adb directory in command prompt.
ex.
Code:
C:\PcUser\Master\Androidsdk\adb\
Make sure all drivers are installed, from CMD prompt window type "fastboot devices" to check your phone is showing.
if you see your device then you can type
fastboot flash recovery [drag your recovery image into cmd window] and hit enter and it should flash
once recovery is flashed you can either "fastboot Reboot" or on the phone use the Vol rockers to navigate to menu and hit bootloader then from there choose recovery
Hi,
I have the same issue about 2 days, I install TWRP Recovery and all it's ok, and flash in fastboot mode with adb like ilostchild tolds You.
It seems that I met the same problem.
My issue is the phone only boot into CMW mode, although I tried to restart it many times. When connect to usb cable, lappy did not recognize the phone so I can use adb command.
Please help me.
I can't make ADB recognize the device, I already installed the SDK the HTC Sync program but the device appears either as "My HTC" or "Android 1.0" and won't appear under "adb devices", any help? I have been googling for 3 days for a solution but I haven't found anything so far.
zeratos said:
I can't make ADB recognize the device, I already installed the SDK the HTC Sync program but the device appears either as "My HTC" or "Android 1.0" and won't appear under "adb devices", any help? I have been googling for 3 days for a solution but I haven't found anything so far.
Click to expand...
Click to collapse
Try using another computer!!! Install all neded drivers, searxh google and let windows automaticly install some. Connect via fastboot and it should say
Fastboot usb.
Also....dont search for adb devices, just enter commands starting with fastboot like... Fastboot install recovery cwmrecovery.img
spooky_ghosty said:
Try using another computer!!! Install all neded drivers, searxh google and let windows automaticly install some. Connect via fastboot and it should say
Fastboot usb.
Also....dont search for adb devices, just enter commands starting with fastboot like... Fastboot install recovery cwmrecovery.img
Click to expand...
Click to collapse
I already tried all those things you mentioned, I have been looking for 3 days for a solution for this problem on google without any luck, the device doesn't recognize any command either and I already set up a virtual machine and tried on that machine as well. u_u
Uninstall HTC sync then try adb devices be possitive you are using the correct location for adb. Usb debugging MUST be on as well. Copy paste the commands into the prompt to make sure you are entering them right. Be sure you have the downloaded files in the same folder you are using with adb.
Johann12911 said:
Uninstall HTC sync then try adb devices be possitive you are using the correct location for adb. Usb debugging MUST be on as well. Copy paste the commands into the prompt to make sure you are entering them right. Be sure you have the downloaded files in the same folder you are using with adb.
Click to expand...
Click to collapse
Already tried uninstalling HTC Sync, after that I deleted every trace of it. USB Debugging WAS ON before the phone crashed but I can't activate it now because the phone keeps looping between reboots.
Try to flash it via htc sync. Download the update and rewrite everything!
Sent from my HTC One VX using xda app-developers app

Verizon HTC One stuck In boot mode, in relock state and S-on, PLEASE HELP

I have been trolling various threads here at XDA to no avail. I successfully rooted my phone usinf clockwork mod, cyanogen 11. I needed to return it to its stock factory state. I found a very good article that instructed me to do the following:
How To Restore The HTC One Back To Stock Firmware
Let’s face it. At one point or another some of us root our Android devices, and in doing so we may realize that we either want the default experience back on our device or we have to take our devices in for repair, and we obviously cannot take them back rooted, so I’m going to show you how to unroot your phone and put it back to stock. Let’s get started.
DISCLAIMER: YOU ARE RESPONSIBLE FOR YOUR ACTIONS. NEITHER GEARPOP NOR I WILL BE HELD RESPONSIBLE FOR YOUR ACTIONS, YOU ARE DOING THIS AT YOUR OWN DISCRETION.
If you need help or this does not work feel free to reply below in the comments section, and I will do my best to help you.
Prerequisites:
HTC One
A Micro-USB cable, I recommend use of the OEM cable.
A Windows computer
HTC Stock Rom (For Sprint: http://www.androidfilehost.com/?fid=23203820527945238), Other Models: http://htconeroot.com/htc-one-stock...for-htc-one-attt-mobileunlockedinternational/).
ADB and Fastboot (http://forum.xda-developers.com/showthread.php?t=2317790).
HTC ADB and Fastboot Drivers: (For Windoows 8: http://forum.xda-developers.com/showthread.php?t=2232799, For Windows 7: The Windows 8 drivers should suffice since the folder says Win7 in it’s title). 64-bit only. If you need 32-bit please try looking elsewhere by googling “HTC One 32-bit drivers for Windows (insert version name here).”
Steps:
1. Connect the HTC One to your PC via Micro-USB.
2. Enable USB Debugging by going to your Settings app, tapping “About phone,” and then tap “Build Number” repeatedly, until it says (“You are now a developer!”).
3. Install the HTC ADB and Fastboot drivers listed above in the prerequisites section.
4. Install Minimal ADB and Fastboot, which is listed above. To install, just keep clicking “Next” until it’s done (if you want a shortcut created, make sure you have “Shortcut on Desktop” checked).
4. Download the rom zip for your device as listed above in the prerequisites.
5. Open Minimal ADB and Fastboot, and you should see a command prompt window open, with your device connected type “adb devices”, and your phone’s serial number should appear along with the word fastboot.
6. Next type “adb reboot-bootloader” to boot into the bootloader of the device.
7. Extract the rom.zip file from the zip file download above and place it in the location in which adb and fastboot are stored.
8. Now type “fastboot oem lock,” followed by “fastboot oem rebootRUU,” (enter the second command after it reboots to the bootloader) and you should be presented with a black HTC screen.
9. Type “fastboot flash zip rom.zip,” and you should be presented with an error code, that’s fine. Just enter the command again and hit enter, and it should flash. Make sure the phone is in RUU mode (black screen) each time you enter the command.
10. When it says “SUCCESS” and the green bar appears stuck, simply enter “fastboot reboot” in the command prompt. Your phone should reboot and you will be presented with the HTC setup screen!
It locked up at step 9, and now it will not do anything but boot in fast mode. I cannot get minimal adb and fast boot to recognize my phone ant more. Please help, I am completely at a loss.
Thanks in advance
Ronnie

[GUIDE]Unlock Bootloader [Mini FAQ] - Moto G 2015

UNLOCK YOUR BOOTLOADER​
WARNING: UNLOCKING YOUR BOOTLOADER VOIDS YOUR WARRANTY.PROCEED AT YOUR OWN RISK. EXCEPT If You Live In The EU
NOTE: Unlocking the bootloader will Wipe/ factory reset your device, and will delete all personal data from your device such as apps, photos, messages, and settings.
Prepare Your Moto G for Bootloader Unlock
Code:
Your device must be charged up to 70% before going completely through the process mentioned below.
These firmwares are only for the Moto G 2015 variant.
Make sure that you have installed proper device drivers on your computer.
INSTRUCTIONS:
Make sure to take a backup of your entire device data.
Download the Android SDK OR Download the Minimal ADB and Fastboot
Install the latest Motorola USB Drivers on your desktop. Download here.
Go To Settings -> Dev Settings, And Select "Allow OEM Unlock"
Put your device in fastboot mode (power off, then press the power and volume down buttons simultaneously).
Open Command Prompt on androidsdk/platform-tools/ (Hold Shift and right click and press open command window here)
[*]If you have downloaded Minimal ADB and Fastboot Go to C://Program Files/Minimal ADB and Fastboot and open Command Prompt from there.
Connect your Phone to PC
Type this in the CMD prompt window - fastboot oem get_unlock_data
You will get a return string. Copy it. [Right Click-Mark- Mark the text by pressing the shift key-Now press Ctrl+C]
Paste all the lines together in a notepad. Remove the empty spaces.
Now go to the Motorola Site.Sign in using your Google account or Motorola ID. Scroll down the page and paste the copied string in the field at step #6. Then click on ‘Can my device be unlocked?’, after which a "REQUEST UNLOCK KEY" button will appear at the bottom of page.
To get your unlock key, select the ‘I Agree’ option. Note: You will receive an email with your Unlock Key at the email address you used to log in there.
Important – Copy the 20-character key that Motorola sent you via email. Make sure your device is connected.
Then in CMD type: fastboot devices (To check your device is connected)
Then type: fastboot oem unlock UNIQUE_KEY
NOTE: In above command, replace the word ‘UNIQUE_KEY’ with the unlock code that you got via email. Then hit enter and the unlocking process should begin. Wait for a while and soon you’ll see ‘Bootloader Unlocked’ warning on your Moto G.
To relock the bootloader:
Go to Fastboot and give the command fastboot oem lock
You can always appreciate my work by pressing the Thanks Button.:good:
Good Day
Want to Get OTA updates even after Rooting your Device? Here's how.
Use the full unroot option from the Super Su
Flash the stock recovery Use Code : mfastboot flash recovery recovery.img
Now you'll be able to get OTA updates as before
RESERVED
Lucas Eugene said:
Want to Get OTA updates even after Rooting your Device? Here's how.
Use the full unroot option from the Super Su
Flash the stock recovery Use Code : mfastboot flash recovery recovery.img
Now you'll be able to get OTA updates as before
Click to expand...
Click to collapse
So this preserves apps/data?
Thanks
Lucas Eugene said:
UNLOCK YOUR BOOTLOADER​
Click to expand...
Click to collapse
Sorry but I think you´re in the wrong section here. this is the Moto G 2014 (titan) thread. So it should be moved to the Moto G 2015 section. Or, as the process is similar, the thread could be renamed.
Also it should be posted in Q&A, Help & Troubleshooting not in Andoid Development.

HTC 10 - OEM Unlocked - TWRP Recovery - SuperSU Rooted - Sunshine S-OFF

I had the hardest time figuring out the whole unlock, root and install ROM on my HTC 10. The biggest issue was that I encrypted my phone, and most guides did not take that into consideration. After consolidating all my notes from multiple sources on the interweb, here's what I have.
GOAL: To have an HTC 10 that is OEM unlocked, custom recovery on board, rooted and has S-OFF setting. This will allow for most flexible customization of software and ROM choices. This may affect your warranty, so proceed with caution.
ASSUMPTIONS: This guide is for an American stock T-Mobile HTC 10 phone with a separate microSD card. It may work with other carriers or countries, but I honestly don't know for sure. This is also written for a Windows PC with access to microSD. You have time and $25 to spare. Money is for a certain unlocking app; not for me. You understand the meaning of bootloader unlocked, custom recovery, rooted, S-OFF and custom ROM. Please look elsewhere for what these mean. They are not synonymous.
GENERAL STEPS:
Prepare stock phone for unlocking and rooting
OEM unlock the phone
Install custom recovery software
Backup stock phone image
Install root access software
Install S-OFF software
Install custom ROM
Download required software
Create folder C:\android
Download and install HTC Hotsync Manager to recognize the device by USB.
Download Google's Android Platform Tools. Unzip and place files in C:\android. Unless you want to waste 4GB of time and storage, you can also download the full Android Studio.
HTC's custom fastboot.exe will be downloaded later on.
Download latest TWRP for HTC 10. Copy file into C:\android
Download latest SuperSU. Copy file into C:\android then copy it to the microSD card.
Download latest Sunshine. Copy file into C:\android then copy it to the microSD card.
Download ROM zip file
Pick a ROM to download. Can get custom ones as listed in xda forums page. Copy ROM zip file into C:\android. If you pick a custom ROM, disregard the rest of this section.
Or pick a stock HTC ROM from website. Can pick most recent ROM for specific carrier or the Unlocked/Developer ROM.
To extract ROM zip file from *.exe, do the following.
Download Microsoft Process Monitor. Unzip folder and run program.
Press CTRL-L to set proper filters: "Process name", "is", [name of ROM with .exe] > click Add; "Path", "contains", "rom.zip" > click Add > Click OK
Run the ROM exe. Do not "install" it. Just run the program to start the "process". Go back to Process Monitor and look for the temp folder that the installer extracted the files to.
Go to the temp folder above that contains the rom.zip. Copy this to C:\android
Close the ROM exe install program.
Get CID for the HTC ROM. Open multi-volume zip archive via Winrar. The usual Windows zip cannot open multi-volume archives. DO NOT extract the file. But find the text file within the ROM zip archive that contains CID, and write it down for later (just keep opening text files; some will be errors; some will open; it'll be obvious). The phone's CID and the ROM's CID must match (more on this later).
Prepare stock phone for unlocking and rooting
Save/backup everything to the cloud or microSD. All data will be deleted with this process!!
Turn on Developer options: Settings > About > Software information > More > tap "Build number" many times until you see "You are now a developer".
Settings > Developer options > check "OEM unlocking", check "USB debugging"
Reboot to Download Mode via Volume-Down+Power. Do not let go of the buttons until you see the gray HTC on a black screen (otherwise won't boot to Download Mode).
HTC OEM Unlock The Phone
Go to HTCdev website. They have screwy SSL certificate and port forwarding. You will have to create a login; and so I recommend making sure it is https -- unless you don't care. Click on Unlock Bootloader and select HTC 10. Go through all the usual prompts.
No need to download all the files on the right side panel. They were already downloaded up above.
Be sure to download the HTC Windows fastboot.exe in Step 4. In C:\android rename Google's version to fastboot-google.com and then unzip and place HTC's version into this folder.
Plug in phone (make sure it is in Download Mode) to PC.
Open command prompt. Press WINDOWS+R and type cmd. In command prompt type cd \android
In C:\android> type fastboot oem get_identifier_token
As the HTCdev website shows, copy all the text between (and including) <<<< Identifier Token Start >>>> and <<<<< Identifier Token End >>>>> into the appropriate part of the website. Make sure the extra text/characters are not included (see example from HTCdev site).
Go to email and download Unlock_code.bin sent by HTCdev. Save this file to C:\android>
In C:\android> type fastboot flash unlocktoken Unlock_code.bin
Press Volume-up or -down on phone and select YES for OEM unlock.
Allow phone to reboot and do a factory reset.
After factory reset, reboot to Download Mode via Volume-Down+Power
Flash TWRP Custom Recovery Software to Phone and Prepare for SuperSU
In C:\android> type fastboot flash recovery [twrp-file-downloaded-above]
After flashing TWRP, you MUST do a hardware reboot by pressing Volume-Down+Power. If you allow reboot by any other method, phone will erase TWRP. For example, do not use adb or fastboot to reboot at this point.
Use Volume-up and -down buttons to highlight reboot to bootloader and press Power button to select it; then do the same for boot to recovery mode.
TWRP now loads
If you happen to have encrypted your phone, you MUST enter your password here. To get phone rooted, a file needs to be created in /data/ folder. This folder can only be accessed by TWRP after putting in encryption password.
If your phone is not encrypted, TWRP should not ask for a password.
Swipe right to access TWRP (cannot use TWRP in read-only mode, if you want it to do anything to the phone ... duh).
Go to Advanced > Terminal
In # type echo KEEPFORCEENCRYPT=true >> /data/.supersu
Backup Working Phone System Image
Unless you've done this before, you will likely miss a step or two. Doing so may end up with a bootloop or other error where you can't get to a user interface. Backing up your system now is a MUST.
While in TWRP, go to Backup. Select all the folders. Rename the file to something meaningful to you. Be sure it saves to microSD card.
Now do the back up.
Install SuperSU Root Access and Prepare for Sunshine
While in TWRP, go to Install.
Select the microSD and then the most recent SuperSU file you copied there earlier.
After install, select Reboot. If phone is encrypted, you will be asked to enter password, and it will likely reboot another time or two.
After phone boots up, load the SuperSU app and go through all the prompts.
Go to Settings > Security > check "Unknown sources"
Install Sunshine S-OFF App
Go to Settings > Storage > sd card (e.g., "New Storage") > select sunshine-latest.apk
Run Sunshine app
Select Grant when SuperSU pops up. If you see this pop up, your phone was successfully rooted.
Pay Sunshine $25. If you want S-OFF, I don't know of any alternatives.
Go through all prompts. Phone will likely reboot. This is part of the process. If Sunshine does not load after reboot, then load it up again and go through all the prompts. You'll have success, once the phone automatically turns off.
Turn on to Download Mode via buttton combo. This will confirm if phone is UNLOCKED and S-OFF
If you will be changing your CID later on, note all settings here (including CID) and save in case you want to revert to this state.
Alternatively, you can get the CID and MID by fastboot.
Connect phone (make sure in Download Mode) and connect to PC. In C:\android type fastboot oem readcid and then fastboot getvar mid
Install Custom ROM to HTC 10 Phone
If you used a custom ROM from the usual sources via XDA, then follow their instructions. Disregard the rest.
DO NOT perform the steps below unless the ROM is from the official HTC ROM website above for HTC 10.
For using HTC Unlocked/Developer ROM, you must change your phone's CID. If the CID on your phone does not match the ROM CID, then you will see an error before ROM installation begins.
Plug in phone (while in Download Mode) to PC
Note CID in HTC ROM text file above. It should have been BS_US001
The following step requires S-OFF. The $25 step above.
In C:\android type fastboot oem writecid [cid-code-eg-BS_US001]
Rename HTC ROM in C:\android to 2PS6IMG.zip. Copy file to microSD.
Reboot to Download Mode.
Press Volume-Up to install HTC ROM
After HTC ROM installation, TWRP recovery and SuperSU will be overwritten.
Reinstall TWRP as above.
Reinstall SuperSU as above.
Consider back up of system via TWRP onto microSD after completing all custom ROM installation, recovery flashing and rooting.
And you're done. Congrats!!
These days you'll have a better time using Magisk than SuperSU for systemless root and it'll allow you to use Android Pay as well.
Does this process remove the carrier SIM lock as well?
Sent from my HTC 10 using XDA-Developers Legacy app
Simpody said:
Does this process remove the carrier SIM lock as well?
Click to expand...
Click to collapse
No, Sunshine (nor any other app that I'm aware of) has any function affecting SIM lock. Sometimes there are other ways to hack that ability but I've never had to do it so I don't know where to suggest.

Categories

Resources