• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root How to Unlock the Bootloader, install recovery, and Root your HTC One S

agentc13

Daleks Über Alles
Aug 31, 2011
7,914
5,481
Skaro
Important note: http://androidforums.com/one-s-all-things-root/597701-htc-one-s-has-two-versions-s3-s4.html
Make sure you use the correct recovery/ROM files for your version. Using the incorrect ones can lead to bootloops and possibly bricking your device.


In order to root your HTC One S, you need to unlock the bootloader and install a custom recovery. I am going to go through this entire process here step by step.

Note: I have a Windows 7 PC, so the instructions are written for that OS. I am sure they will work for other operating systems (OSX, Linux, Vista, XP) with minimal adjustments. I can add any linux specific changes later (if requested) when I have time to test it all on my linux partition.

First of all we need to download and install a few prerequisites:
  • HTC Sync (Windows only)
  • Java Runtime Environment
  • Android SDK
If you already have these on your computer, feel free to skip ahead to the next post.

Install HTC Sync
  1. Download the file here: HTC Help Center. It's under the header "HTC Sync for all HTC Android phones"
  2. Run the setup_3.2.10.exe file that you downloaded. The filename will probably change whenever they update it after this has been made.
  3. Select the language.
  4. Select "Next >".
  5. A window will pop up explaining that you need to disable the anti-virus software on your computer. Do so and select "OK".
  6. Accept the license agreement, and select "Next >".
  7. Select Complete and then "Next >".
  8. Select "Install".
  9. Select "Finish". HTC Sync is now installed.

Installing JRE
  1. Download the file here: Java Runtime Environment.
  2. Select "Install >".
  3. Select "Close". JRE is now installed.

Installing the SDK
  1. Download the installer_r18-windows.exe from Android SDK | Android Developers.
  2. Run the installer_r18-windows.exe.
  3. Select "Next >".
  4. Select "Next >".
  5. Change the destination folder to "C:\Android\android-sdk\" (this will make it easier for other steps).
  6. Select "Next >".
  7. Select "Install".
  8. Select "Next >".
  9. Select "Finish".

Optional - Adding the Envrionment Variables (Path)
  1. Right click on Computer and select "Properties" (or navigate to Control Panel\System and Security\System).
  2. Select "Advance system settings".
  3. Select "Environment Variables...".
  4. Under System variables click on "Path" then select "Edit..."
  5. Add this to the end of the list:
    Code:
    ;C:\Android\android-sdk\platform-tools\
  6. Select "OK".
  7. Select "OK".
  8. Select "OK".
 
Unlocking the bootloader on the HTC One S.

To do this go to Welcome to HTCdev and create an account. After you get that created do the following:


  • Go to HTCdev - Unlock Bootloader.
  • Select "All Other Supported Models" and "Begin Unlock Bootloader".
  • A pop up box will appear asking if you wish to continue as this process can void all or parts of your warranty. Click "Yes".
  • You then need to click the two boxes to accept the legal terms, and press "Proceed to Unlock Instructions".


Here are the steps you need to go through:


  1. Remove and reinsert the battery. You can't remove the battery, just hold the power button down until the phone powers off.
  2. Press Volume Down and Power to start the device into Bootloader mode.
  3. Use the Volume buttons to select up or down. Highlight Fastboot and press the Power button.
  4. Connect the device to the computer via a usb cable.
  5. Open up command prompt. ( Start > Run > Type CMD).
    agentc13-albums-faq-picture6089-command-prompt.jpg
  6. Navigate to where your fastboot.exe is. If you followed my instructions to set up the SDK they would be in c:\Android\android-sdk\platform-tools, so you would type in Command Prompt:
    Code:
    cd c:\Android\android-sdk\platform-tools
  7. In the command prompt type:
    Code:
    fastboot oem get_identifier_token
  8. You will see a long block of text. Copy and paste this text into the the token field below (in the command prompt: Right Click > Mark > highlight the block of text > Right click to copy).
    You will see one of the following two screens:
    Ref. 9a
    pict_6a.png

    Ref. 9b
    pict_6b.png

    When copying the token, start with this line:
    Code:
    <<<< Identifier Token Start >>>>
    And end with this line:
    Code:
    <<<<< Identifier Token End >>>>>
    Note: Only copy the highlighted sections above. Do not copy the INFO or (bootloader) prefix
  9. Paste this string of text into the token field at the bottom of the page and hit Submit in order to receive your unlock code binary file. You will receive this information in your email.
  10. You will receive an email from HTC-Unlockbootloader@htc.com with the attachment: Unlock_code.bin. Save this file in the same folder as your fastboot files (For Example: C:\Android\android-sdk\platform-tools).
  11. In the command prompt type:
    Code:
    fastboot flash unlocktoken Unlock_code.bin
    In the command prompt you will see the following message:
    step12.png
  12. On your phone you will now see the disclaimer. Please read this carefully as this action may void your warranty. Use the Volume buttons to highlight your choice, and the Power button to make your selection. If you select Yes, your phone will be reset to its
 
Upvote 0
Installing TWRP 2 Recovery. (Option #1, S4 or S3 versions available)



  1. Download the TWRP 2 Recovery by Team Win. (Get the S3/VilleC2 version here.)
  2. Place the openrecovery-twrp-2.2.1-ville.img file in the same location as the fastboot.exe (If you followed my instructions to set up the SDK it would be in c:\Android\android-sdk\platform-tools).
  3. On your phone, hold the power button down until the it powers off (10 seconds or so).
  4. Press Volume Down and Power to start the device into Bootloader mode.
  5. Highlight "Fastboot" and press the Power button. (Use the Volume buttons to select up or down).
  6. Connect the device to the computer via a usb cable.
  7. Open up the command prompt. ( Start > Run > Type CMD).
    agentc13-albums-faq-picture6089-command-prompt.jpg
  8. Navigate to where you put the openrecovery-twrp-2.2.1-ville.img. (If you followed my instructions to set up the SDK it would be in c:\Android\android-sdk\platform-tools), then you would type in command prompt:
    Code:
    cd c:\Android\android-sdk\platform-tools
  9. Now type:
    fastboot flash recovery openrecovery-twrp-2.4.1.0-ville.img

The TWRP 2 Recovery is now on your phone. Now is a good time to make a nandroid backup, after you do that reboot your phone.

Note: The S3/VilleC2 version has a different file name, make sure to use the correct name for the S3 version as it is different than the one listed above.
 
  • Like
Reactions: Urzum and mwohlford
Upvote 0
Installing ClockworkMod Recovery. (Option #2, S4 version only)



  1. Download the CWM Touch Recovery by Koush.
  2. Place the recovery-clockwork-touch-5.8.3.1-ville.img file in the same location as the fastboot.exe (If you followed my instructions to set up the SDK it would be in c:\Android\android-sdk\platform-tools).
  3. On your phone, hold the power button down until the it powers off (10 seconds or so).
  4. Press Volume Down and Power to start the device into Bootloader mode.
  5. Highlight "Fastboot" and press the Power button. (Use the Volume buttons to select up or down).
  6. Connect the device to the computer via a usb cable.
  7. Open up the command prompt. ( Start > Run > Type CMD).
    agentc13-albums-faq-picture6089-command-prompt.jpg
  8. Navigate to where you put the recovery-clockwork-touch-5.8.3.1-ville.img. (If you followed my instructions to set up the SDK it would be in c:\Android\android-sdk\platform-tools), then you would type in command prompt:
    Code:
    cd c:\Android\android-sdk\platform-tools
  9. Now type:
    fastboot flash recovery recovery-clockwork-touch-5.8.3.1-ville.img

The CWM Touch Recovery is now on your phone. Now is a good time to make a nandroid backup (backup and restore > backup), after you do that reboot your phone.
 
Upvote 0
Rooting your Phone


  1. Download SuperSU (UPDATE-SuperSU-v1.04.zip).
  2. Place the UPDATE-SuperSU-v1.04.zip on your phones internal memory. (Mount as disk drive, then copy/paste). Remember where you place this.
  3. On your phone, hold the power button down until the it powers off (10 seconds or so).
  4. Press Volume Down and Power to start the device into Bootloader mode.
  5. Highlight "Recovery" and press the Power button. (Use the Volume buttons to select up or down).
  6. To flash the .zip in recovery:
    • Select "install zip from sdcard".
    • Select "choose zip from sdcard".
    • Navigate to wherever you saved the file. Select the UPDATE-SuperSU-v1.04.zip.
    • Select "Yes - Install UPDATE-SuperSU-v1.04.zip".
    • Reboot your phone.

Your Phone is now rooted. :thumbup:

Be sure to check out this thread (One S: All Things Root Guide) for current root/ROM related info!
 
Upvote 0
Noobish question I know but I unlocked the bootloader with zero issues but in trying to flash CWM the command prompt will not take me to the folder where I put the file (the folder you suggested)

How do I get command prompt to take me to where I want to go?

Did you type "cd C:/Android/android-sdk/platform-tools/" in the cmd prompt?

As long as that is where you installed sdk and put the recovery.img, it should work fine.
 
Upvote 0
Hi, I'm a noob here.
Pardon me for my English before..

This is my first time for using Android, and I want to root it.
There's no problem when I'm unlocking the bootloader, until the next step.
It always shown a splash screen with red message on the bottom:
This build is for development purposes only. Do not distribute outside of HTC without HTC's written permission. Failure to comply may load to legal action.
.
Then I wait for 20-30 minutes, and nothing happened. So I reboot my phone.

I've trying Superboot too, or using another boot image, and it does the same.
My phone is One S with S3 processor, S4 series aren't available in my country.. :(
Any issues with this type?
 
Upvote 0
Hi, I'm a noob here.
Pardon me for my English before..

This is my first time for using Android, and I want to root it.
There's no problem when I'm unlocking the bootloader, until the next step.
It always shown a splash screen with red message on the bottom:
.
Then I wait for 20-30 minutes, and nothing happened. So I reboot my phone.

I've trying Superboot too, or using another boot image, and it does the same.
My phone is One S with S3 processor, S4 series aren't available in my country.. :(
Any issues with this type?

The S3 is different and will require a different recovery (I believe that there is a TWRP2 for it). The process will be the same, just different files. You should be squared away by flashing the S3 recovery.

Also, do not flash ROMs for the S4 as they won't work on the S3 version.

The red message is normal, it just won't work with a recovery (or ROM) built for the S4 version.

I will try to get specific instructions and a disclaimer added this afternoon/evening.
 
  • Like
Reactions: van de Bugs
Upvote 0
This should be the correct recovery for the S3 version.
http://goo.im/devs/teamwin/twrp2/openrecovery-twrp-2.2.1-villec2.img
Here is a link to the XDA thread on it.
[RECOVERY][S3/villec2] TWRP 2.2.1 with on-screen keyboard! [2012-07-17] - xda-developers

Here is a link to the only ROM thread I have seen so far.
[ROM][S3] BackToBasics_v2 (based on RUU_VILLEC2_U_ICS_40_HTC_Europe_1.11.401.110) - xda-developers

S3 superboot link.
[ROOT] [S3] VilleC Superboot R1 - xda-developers

I will work on getting things sorted for the S3 version here at AF (I've brought it to the attention of the site admin Phases), I will make sure to deal with it ASAP.
 
Upvote 0
I've trying Superboot, n it works. Many thanks! \:D/


Umm.. may I ask another question?
During recovery installation, there's a command:
Code:
fastboot flash recovery <boot.img>
I do this many times.
What it does actually? Does it do like a 'format' then copying the image file, or it just copying anyway?
Should I doing this one? :
Code:
fastboot clear cache

Sorry if this is a stupid question..
 
Upvote 0
I've trying Superboot, n it works. Many thanks! \:D/


Umm.. may I ask another question?
During recovery installation, there's a command:
Code:
fastboot flash recovery <boot.img>
I do this many times.
What it does actually? Does it do like a 'format' then copying the image file, or it just copying anyway?
Should I doing this one? :
Code:
fastboot clear cache

Sorry if this is a stupid question..

It's not a stupid question. It will overwrite the recovery partition (no need to clear cache for that), but it should be a recovery.img (like the TWRP2 one I linked) not a boot.img.

You should clear the cache/dalvik cache in recovery when flashing ROMs (as well as /data and any other specific instructions given for that ROM).
 
Upvote 0
It's not a stupid question. It will overwrite the recovery partition (no need to clear cache for that), but it should be a recovery.img (like the TWRP2 one I linked) not a boot.img.

You should clear the cache/dalvik cache in recovery when flashing ROMs (as well as /data and any other specific instructions given for that ROM).
Oh, I see..
Just wondering if this has been asked frequently :D

Thanks, its more clear now :)
 
Upvote 0
I downloaded and installed the Android SDK package, however the version now availabe for download is v 20.0.3..I am using XP PRO SP3, and could nor figure out where to change the change the enviromnetal variables path, but as I stsrted out in DOS 2.2, some 20+ years ago, navigating directories is not a problem. What is a problem though is that there is not a C:\Program Files\Android\android-sdk\platform-tools\ directory, but separate platfom and tools directories. On another quick note, this is a T-Mobile S4 version of the HTC One S, that I just got today. It is till locked from the factory. Does that make a difference?

Thanks, will keep reading FAQ,s look forward to rooting all my new Android devices. :)
 
Upvote 0
I downloaded and installed the Android SDK package, however the version now availabe for download is v 20.0.3..I am using XP PRO SP3, and could nor figure out where to change the change the enviromnetal variables path, but as I stsrted out in DOS 2.2, some 20+ years ago, navigating directories is not a problem. What is a problem though is that there is not a C:\Program Files\Android\android-sdk\platform-tools\ directory, but separate platfom and tools directories. On another quick note, this is a T-Mobile S4 version of the HTC One S, that I just got today. It is till locked from the factory. Does that make a difference?

Thanks, will keep reading FAQ,s look forward to rooting all my new Android devices. :)

Whichever directory has the adb.exe and fastboot.exe is the one that you need to add to the environmental variables. I don't have a Win XP machine to test the specific steps, but it should be similar. And this guide will work with a T-Mobile S4 version (it's what I have).
 
Upvote 0
Ok. One more question. This is probably going to be more of an opinion/speculation. I've done my research. If I unlock my boot loader, I can "relock" the phone, but it will never again be "locked". So if i'm doing this, is it a waste of money to have the insurance because they will know the phone has been unlocked and refuse service? Or, in your opinion, will they still honor insurance claims in the future?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones