[GUIDE]RUU related info (Extracting rom.zip, Restoring stock, going back S-ON, etc.)

Search This thread

kgs1992

Senior Member
May 8, 2012
1,482
1,885
Bangalore
**Very informative guide, meant for everyone**
A better version is available on my site, here.


S-OFF voids warranty! At no point do I claim that this guide restores your warranty in any way.
This guide includes steps to restore stock software, which will conceal that your phone's software was modified.
It is up to you to chose how you use this guide.
Remember that hiding the fact that you have modified the phone for purposes of warranty claim is unethical & I don't support this in any way.

1. Let's discuss about RUU first:

1.1 What is an RUU?
RUU stands for ROM Update Utility
Simply put, a RUU is executable (.exe) Windows program that contains the various files required for changing your phone's software via HTC.​

1.2 The RUU contents
  • Files for it's own configuration & execution
  • adb and fastboot files for communicating with your device
  • A signed HTC ROM to flash all partitions
  • Other miscellaneous files

1.3 Method of execution:
The RUU can be started by double-clicking the executable file when the phone is connected to the PC via fastboot USB (in the bootloader). The RUU works by passing commands to your device which will enable it to flash the ROM on your phone.
Once the installation starts, the RUU executable does nothing except show you the current status of installation.
When the installation is successful or when there is an error, it displays the appropriate message.​

1.4 Security features:
The RUU will ALWAYS check your CID & MID before installation. If your phone's CID or MID does not match the RUU's list of supported CIDs & MIDs, it will not install.
Before flashing, the software number of the RUU and the phone's current software number are compared.
If your device is S-ON, then you cannot flash an RUU with version less than your phone's current version. The same applies for hboot version​

1.5 General PRECAUTIONS to take during RUU execution:
  • Always use USB 2.0 ports on the computer
  • Never use USB Hubs or extensions
  • Use a secure cable, preferably the one you got from HTC. The cable should not be loose or flimsy.
  • Never pull out the USB cable unless you are absolutely sure that the RUU is not making any changes to the phone.
  • If you are using a laptop, charge the battery first & keep the battery as well as the charger connected until RUU has finished execution.
  • Read & follow the guide to the letter.

2. Naming convention & finding the right RUU
RUUs for the HTC Sensation & Sensation XE are named as
Code:
RUU_PYRAMID or PYRAMID_LE_(Provider/Location name)_(Software base).(Provider/Location).x_RADIO_(Radio version)
As an added note, RUU for the Sensation is PYRAMID, RUU for the Sensation 4G is PYRAMID_TMOUS, and the RUU for the Sensation XE is PYRAMID_LE.
To find the right RUU for yourself, you need to know two things:
  1. Your CID & corresponding region code
  2. Your Current software version

2.1 To find your CID:
You will need sdk & and drivers, please take a look here. If you already have it, continue.

  • Reboot to bootloader powering down the phone & then Holding Vol down + Power button
  • Connect your phone to the PC while in the bootloader. The phone should say fastboot USB, if not, select fastboot on the phone & check if it says fastboot USB, if not, change the USB port you are using.
  • Navigate to the platform tools folder located inside android-sdk folder
  • Hold down shift and right-click anywhere in the empty space inside the window.
  • Select the option: Open command window here.
  • Next, type
    Code:
    fastboot getvar cid
  • You will now be shown your current CID.

2.2 To get provider/location code
Note down your CID and check corresponding provider/location here or search/post in this thread.
Here is a list of variants:
x.xx.61.x - Orange UK (United Kingdom)
x.xx.69.x - Orange PL (Poland)
x.xx.73.x - Orange FR (France)
x.xx.75.x - Orange ES (Spain)
x.xx.110.x - T-Mobile UK (United Kingdom)
x.xx.111.x - T-Mobile DE (Germany)
x.xx.113.x - T-Mobile CZ (Czech Republic)
x.xx.161.x - Vodafone UK (United Kingdom)
x.xx.163.x - Vodafone FR (France)
x.xx.165.x - Vodafone IT (Italy)
x.xx.168.x - Vodafone GR (Greece)
x.xx.206.x - O2 UK (United Kingdom)
x.xx.401.x - World Wide English (Europe Unbranded)
x.xx.415.x - Arabic (UAE/Middle East)
x.xx.468.x - Turkey
x.xx.497.x - Morocco
x.xx.498.x - WWE Brightpoint US (United States)
x.xx.531.x - T-Mobile US (United Kingdom)
x.xx.666.x - Bell Canada
x.xx.707.x - Asia WWE (World Wide English)
x.xx.709.x - Asia TW (Taiwan)
x.xx.720.x - Asia India
x.xx.771.x - Hutchison 3G UK (United Kingdom)
x.xx.841.x - Telsra WWE (World Wide English)
x.xx.862.x - Voda-Hutch AU (Australia)
x.xx.901.x - TIM IT (Italy)
x.xx.911.x - SK Telecom (South Korea)
x.xx.1400.x - HTC China
x.xx.1403.x - HTC China CMCC (China Mobile Communications Corporation)​

2.3 To find your software version:
If you have S Off, this doesn't matter, but try to flash the latest RUU.

Go to "Settings" > "About phone" > "Software Information" > "More" > "Software number" on your device.
The right software version for you is any version higher than or equal to this.

This is sometimes inaccurate (especially if you're on a custom ROM).

Another way to check is this:
You will need sdk & and drivers, please take a look here. If you already have it, continue.

  • Reboot to bootloader powering down the phone & then Holding Vol down + Power button
  • Connect your phone to the PC while in the bootloader. The phone should say fastboot USB, if not, select fastboot on the phone & check if it says fastboot USB, if not, change the USB port you are using.
  • Navigate to the platform tools folder located inside android-sdk folder
  • Hold down shift and right-click anywhere in the empty space inside the window.
  • Select the option: Open command window here.
  • Next, type
    Code:
    fastboot getvar version-main
  • You will now be shown your current software number.

The right software version for you is any version higher than or equal to this.

2.4 To find your RUU

Please find your suitable RUU using key words
"RUU" "Pyramid" (Sensation) or "Pyramid LE" (Sensation XE) or "Pyramid TMOUS" (Sensation 4G) "Firmware Base.Provider/Location code"


PYRAMID is for Normal Sensation
PYRAMID LE is for Sensation XE
PYRAMID TMOUS is for Sensation 4G

They are not cross compatible.

For example, If you want the RUU for Sensation XE Europe 3.32 based, find "RUU Pyramid LE 3.32.401 "

Execlutable RUUs can be found here*:
http://www.tsar3000.com/Joomla/inde...riginal-roms&catid=65:htc-downloads&Itemid=98
http://www.shipped-roms.com/index.php?category=android&model=Pyramid

For the extracted rom.zip file from RUU, look here*:
http://goo.im/stock/pyramid/ruu

*Please note, these files aren't hosted by me, so credit goes to whoever is uploading and hosting them.
That being said, it is your responsibility to check the source & ascertain if they are reliable.
Remember, an incomplete zip could possibly brick your device, especially S-OFF devices.


3. RUU to restore stock

The main reason that people flash RUUs is because they want to get back to stock.
Here is how it's done:
Is your device S-ON or S-OFF?
S-ON
Click to show instructions:
Is your bootloader unlocked via HTC Dev? (If it is, it should say *** UNLOCKED *** at the top)
Yes, it says UNLOCKED on the bootloader:
Follow points 3.1 & 3.2 to restore your phone back to stock.​
No, it doesn't say UNLOCKED on the bootloader:
Follow point 3.2 only to restore your phone back to stock.​

S-OFF​
Click to show instructions:
Is your bootloader unlocked via HTC Dev? (If it is, it should say *** UNLOCKED *** at the top)
Yes, it says UNLOCKED on the bootloader:
Follow points 3.1 & 3.2 to restore your phone back to stock.
Optionally use 3.3 to turn back to S-ON.​
No, it doesn't say UNLOCKED on the bootloader:
Follow point 3.2 only to restore your phone back to stock.
Optionally use 3.3 to turn back to S-ON.​


3.1 Relocking the bootloader

You will need sdk & and drivers, please take a look here. If you already have it, continue.

  • Reboot to bootloader by Holding Vol down + Power button
  • Connect your phone to the PC while in the bootloader. The phone should say fastboot USB, if not, select fastboot on the phone & check if it says fastboot USB, if not, change the USB port you are using.
  • Navigate to the platform tools folder located inside android-sdk folder
  • Hold down shift and right-click anywhere in the empty space inside the window.
  • Select the option: Open command window here.
  • Next type:
    Code:
    fastboot oem lock
  • Finally, type
    Code:
    fastboot reboot-bootloader
  • Bootloader should now say *Relocked* & may or may not display a Security Warning

3.2 Using RUU to restore partitions
  • Find your right RUU using 2 in this guide.
  • Flash your RUU as you normally would by double clicking the executable & following the instructions, you phone must be connected to PC via fastboot USB (in the bootloader).
  • If you get a Hboot Pre-update message, re-run the RUU once again with your phone connected in fastboot USB.
  • If the previous step fails, follow points listed under 4. Flashing RUU manually.
  • Reboot your device to bootloader, your bootloader should now say *Locked* or *Relocked*

3.3 Turning S On after RUU flash
You will need sdk & and drivers, please take a look here. If you already have it, continue.

This is optional, but if you want to do it, it must be done only after flashing the RUU! If your device has a hboot that isn't LOCKED, RELOCKED or UNLOCKED, do not do this!!

  • Reboot to bootloader powering down the phone & then Holding Vol down + Power button
  • Connect your phone to the PC while in the bootloader. The phone should say fastboot USB, if not, select fastboot on the phone & check if it says fastboot USB, if not, change the USB port you are using.
  • Navigate to the platform tools folder located inside android-sdk folder
  • Hold down shift and right-click anywhere in the empty space inside the window.
  • Next type:
    Code:
    fastboot oem writesecureflag 3
  • Finally, type
    Code:
    fastboot reboot-bootloader
  • Bootloader should now say S ON.
  • If the bootloader says *Security Warning*
  • Remove the battery and then re-insert it
  • Reboot to bootloader by holding down the volume key and pressing the power button.
  • Connect your phone to the computer via USB.
  • Re-run the RUU executable again.
  • The bootloader should now say S On.

4. Flashing RUU manually

4.1 Getting PG58IMG.zip from RUU
Run the RUU executable as you normally would, but don't proceed to the second step i.e. when a second window appears, do nothing. Do not proceed, just ignore it for now, but don't close the window.

  • Right-click the Windows Start button and select "Open Window Explorer" option.
    • If you use Windows XP
      Copy-paste this in the navigation bar:
      Code:
      C:\Documents and Settings\%USERNAME%\Local Settings\Temp\
    • If you use Windows Vista/7
      Press & hold Windows key on the keyboard and then press R (Win key + R). Once the box pops up, copy paste this:
      Code:
      %temp%
  • Right click anywhere inside explorer window (not on any folder) and select Sort by then select Date.
  • Locate the latest one created (first in the list & it will most likely have random numbers in the name) & open it.
  • You will find a second folder with a set of random numbers. Open it, inside you will find a number of files and the rom.zip
  • Copy the rom.zip file to another location.
  • Now, close the RUU executable folder & rename the rom.zip file as PG58IMG.zip

4.2 Adding your CID to the PGIMG.zip

This is only required if the RUU you have is not for your CID and you don't have SuperCID.

  • Check your cid by referring to 2.1 in this guide.
  • Double click the PG58IMG.zip file to open it.
  • Double click android-info.txt to open in notepad.
  • Add your CID to the end of the file uising the ones already in there as an example.
  • Make sure there are no spaces in or after your CID
  • Press Ctrl +S and then close the window.
  • You will now see a pop up window. Click yes to modify the archive.

4.3 How to Super CID

This is only required if the RUU you want to flash is not for your CID and you did not follow 4.2.
This requires that your bootloader should not say S-On.

  • Follow all steps in 2.1 and then continue.
  • Now type the following code:
    Code:
    fastboot oem writecid 11111111
  • Now type :
    Code:
    fastboot reboot-bootloader
  • Wait for the phone to reboot into bootloader.
  • Type this:
    Code:
    fastboot getvar cid
  • Your CID should now be 11111111
  • If this method failed, try 4.2

4.4 How to flash PG58IMG

4.4.1 Without a PC, via bootloader
  • Put the PG58IMG.zip onto the root of your SD Card
  • Reboot to bootloader by Holding Vol down + Power button
  • You will then be asked if you want to install the file, select yes by pressing Vol up.
  • Don't touch anything till the install completes
  • After the install is complete, when prompted to reboot, open the back casing of the phone and take out the SD Card.
  • Then press the power button once to reboot.
  • If you experience a boot loop, reboot to bootloader and re-flash the PG58IMG.zip
  • If booted into bootloader, select fastboot > reboot.
  • If booted into fastboot, select reboot.
  • Connect the SD Card to a computer and delete the PG58IMG.zip file
If this method fails, try 4.4.2​

4.4.2 With a PC, via fastboot USB
You will need sdk & and drivers, please take a look here. If you already have it, continue.
  • Reboot to bootloader by Holding Vol down + Power button
  • Connect your phone to the PC while in the bootloader. The phone should say fastboot USB, if not, select fastboot on the phone & check if it says fastboot USB, if not, change the USB port you are using.
  • Navigate to the platform tools folder located inside android-sdk folder
  • Copy the PG58IMG.zip file from step 4.1 to this folder
  • Hold down shift and right-click anywhere in the empty space inside the window.
  • Enter the following command
    Code:
    fastboot erase cache
  • You may not see any output, then enter the command
    Code:
    fastboot oem rebootRUU
  • You phone will now go into the RUU mode.
  • Wait for around 30 seconds, then enter the command
    Code:
    fastboot flash zip PG58IMG.zip
  • The installation will begin and you will be able to see the progress at every step.
  • Once done, enter the command
    Code:
    fastboot reboot
  • If you experience a boot loop, repeat 4.4.2 again.

5. Common errors & Troubleshooting:
If you get any error while running the executable, it is recommended that you use the method to extract the rom.zip & flash it.
This is because the error code returned by the executable is not very clear.

Stuck at <waiting for device>
  • Drivers not present or not installed correctly; Install the correct drivers.
  • Phone is not in fastboot USB mode. Remove USB Cable; remove & reinsert phone battery; hold volume down + power; select FASTBOOT; connect USB.
error: cannot load 'xyz'
You typed the wrong filename or the file isn't present in the folder. Check that the file is present & that the filename is correct, then repeat the command.​
Error 150: ROM upgrade utility error
This is most likely an error when you use Windows Vista.​
Error [170]: USB Connection error
The RUU cannot connect to your device.
  • Drivers not present or not installed correctly; Install the correct drivers.
  • Phone is not in fastboot USB mode. Remove USB Cable; remove & reinsert phone battery; hold volume down + power; select FASTBOOT; connect USB.
  • Other unknown error. Extract rom.zip & flash manually via SD Card.
ERROR [155 to 159]: IMAGE ERROR
One of these error messages will appear when your device is S-ON & use the incorrect RUU having lower software number/hboot version than what is currently on your phone.​
FAILED (remote: not allowed)
  • You did not reboot to RUU mode before running the flash command.
  • You are trying to use a command that you cannot use on a Locked and/or S-ON device.
(bootloader) [ERR] Command error !!! or INFO[ERR] Command error !!!
  • You are trying to issue an invalid command.
  • You are trying to use a command that you cannot use on a Locked and/or S-ON device.
FAILED (remote: signature verify fail)The zip that you extracted is broken or the RUU you downloaded is is corrupted. Get the zip again or use a different RUU.​
FAILED (remote: 99 unknown fail)
Your bootloader is still unlocked. You didn't relock your bootloader. Relock your bootloader using this command:
Code:
fastboot oem lock
FAILED (remote: low battery)
Battery is too low. Reboot to bootloader by typing
Code:
fastboot reboot-bootloader
& let the phone charge for a while.​
FAILED (remote: 90 hboot pre-update! please flush image again immediately)
Normal after Hboot version changes. You need to run only the flash command again (not the whole set of commands, just the fastboot flash command.)​
FAILED (remote: 42 custom id check fail)
The RUU doesn't contain your CID. Either add your CID to the zip (needs S-OFF) or try changing your CID (usually works only on an S-OFF device)​
FAILED (remote: 92 supercid! please flush image again immediately)
Your device is S-ON & has Super CID. You need to run only the flash command again (not the whole set of commands, just the fastboot flash command.)​
FAILED (remote: 43 main version check fail)
Your device is S-ON & you are trying to use an RUU that has software number less than your current software number.​
FAILED (remote: 44 hboot version check fail)
Your device is S-ON & you are trying to use an RUU that has hboot version less than your current hboot version.​
FAILED (status read failed (Too many links))
Disregard & continue. It is not really an error as such.​
FAILED (data transfer failed (Too many links))
Reboot the phone to fastboot USB. Remove USB Cable; remove & reinsert phone battery; hold volume down + power; select FASTBOOT; connect USB.
Then, try the commands again.​
Any other error that says '(Too many links)'
Reboot the phone to fastboot USB. Remove USB Cable; remove & reinsert phone battery; hold volume down + power; select FASTBOOT; connect USB.
Then, try the commands again.
If you still get the error, please post the complete error code here & when the error occurred so that it can be solved & added to this list.​
Any other error that says 'please flush image again immediately'
You need to run only the flash command again (not the whole set of commands, just the fastboot flash command.) Please post the complete error code here & when the error occurred so that it can be added to this list​
Any error that isn't present in this list
Please post the complete error code here & when the error occurred so that it can be solved & added to this list.​
 
Last edited:

kgs1992

Senior Member
May 8, 2012
1,482
1,885
Bangalore
Read Me

Guide last updated: 11th February, 2013

You are welcome to provide any suggestions, ask RELEVANT questions & point out any typos or errors in the guide. I will act upon it accordingly.
I request you to link all RUU related questions & restoring S On questions to this guide as I it is the most complete guide in my opinion.

This guide has been compiled from personal experience & various other sources on the internet as well as within XDA. I do not take sole credit for the information contained in this guide.
Any part of this guide may be used wherever needed without the need for my permission. If you modify the guide, please mention that it is a modified version & DO NOT present it as my work or link the guide to me in any way.


Last but not the least, I claim no responsibility for any damage caused to your device as a result of following this guide. (This will only happen if you missed out on something.)
 
Last edited:

T-Macgnolia

Senior Member
Sep 30, 2010
3,796
2,023
Shannon, Ms.
Great work on the guide it really covers the topic of a RUU very well. Sorry to be the first one to post here, and these are just suggestions also. But I seen some things that could be revised.

In the following part you can do away with all of the below.

1.5.1 To find your CID:

  • Copy and paste adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll & fastboot.exe from the android-sdk/tools/ folder to the desktop.
  • Press Windows key + R and type "cmd" in the box and hit enter.
  • Type in this command on the Command prompt (The black window)
  • For Windows Vista/7:
    Code:
    cd "c:\users\%USERAME%\desktop\"
  • For Windows XP:
    Code:
    cd "c:\documents and settings\%USERNAME%\desktop\

You can replace it with just navigating to the "tools folder" in the of the SDK folder. While in the tools folder simple hold down shift and right click anywhere in the window, then select "Open command window here". This will open a command window that is already in the tools directory so you have full access to ADB and fastboot commands. No need to copy and past files.

Also you can modify the below to just double click the file.

  • Single click android-info.txt to highlight it & press Ctrl+C and click anywhere outside and press Ctrl +V to paste it.
  • Double click android-info.txt you just pasted to open in notepad.

That is just some suggestions to make it a little simpler.....;)
 
  • Like
Reactions: TotallydubbedHD

kgs1992

Senior Member
May 8, 2012
1,482
1,885
Bangalore
Great work on the guide it really covers the topic of a RUU very well. Sorry to be the first one to post here, and these are just suggestions also. But I seen some things that could be revised.

In the following part you can do away with all of the below.



You can replace it with just navigating to the "tools folder" in the of the SDK folder. While in the tools folder simple hold down shift and right click anywhere in the window, then select "Open command window here". This will open a command window that is already in the tools directory so you have full access to ADB and fastboot commands. No need to copy and past files.

Also you can modify the below to just double click the file.



That is just some suggestions to make it a little simpler.....;)

I will revise the guide after I get back home, from.my desktop..
Thanks for your suggestions, they are very good.. :)

Sent from my Sensation using xda premium

EDIT: Done :)
 
Last edited:

cicc74

Senior Member
Jan 27, 2011
199
11
Hi kgs1992,
Sorry if i ask this question in the wrong thread, will the next update Super Utility tool will make SOFF without doing wire trick!!!!
I find it very difficult to make S-off with the Hboot 1.27, using the method JuopunutBear..
Merci
 

T-Macgnolia

Senior Member
Sep 30, 2010
3,796
2,023
Shannon, Ms.
Sorry if i ask this question in the wrong thread, will the next update Super Utility tool will make SOFF without doing wire trick!!!!
I find it very difficult to make S-off with the Hboot 1.27, using the method JuopunutBear..
Merci

You did post this in the wrong place, but you only have 5 post so you can not post in the development thread. And sorry but i can tell you, no the next version of the Super Utility tool will not make S-off without the wire trick. If you do not have Hboot 1.18.0000 or below you can not use Revolutionary. The only S-off for Hboots 1.21.0000 and up is Juopunutbear S-off.

Edit: I just read the thread in the development forum and I may have to retract my statement, lol.
 
Last edited:

kgs1992

Senior Member
May 8, 2012
1,482
1,885
Bangalore
Hi kgs1992,
Sorry if i ask this question in the wrong thread, will the next update Super Utility tool will make SOFF without doing wire trick!!!!
I find it very difficult to make S-off with the Hboot 1.27, using the method JuopunutBear..
Merci
No. It will not. I request you to please take questions to the Help thread located in the Q&A section if you cannot post in the Dev section.
You did post this in the wrong place, but you only have 5 post so you can not post in the development thread. And sorry but i can tell you, no the next version of the Super Utility tool will not make S-off without the wire trick. If you do not have Hboot 1.18.0000 or below you can not use Revolutionary. The only S-off for Hboots 1.21.0000 and up is Juopunutbear S-off.

Edit: I just read the thread in the development forum and I may have to retract my statement, lol.
No mate. Wire trick will be used. I meant that the tool will be safer to use.
Please don't encourage or engage in OT posts.
----------------------------------------------------------------------------------------------------------------------------------------------
Please do not reply to this post, let's end the OT posts here.
 
Last edited:
  • Like
Reactions: cocto

cicc74

Senior Member
Jan 27, 2011
199
11
Can someone tell me which of this two rom is for Sensation:
RUU_PYRAMID_LE_ICS_35_S_HTC_Europe_3.32.401.105_R_Radio_11.69.3504.00U_11.22.3504.07_M_release_251961_signed.exe
or
RUU_PYRAMID_LE_ICS_35_S_HTC_Europe_3.32.401.105_R2_Radio_11.69.3504.00U_11.22.3504.07_M_release_253443_signed.exe

a read that de second is for Sensation XE!!!!!
Thanks
 

ganeshp

Senior Member
Mar 15, 2012
5,496
3,259
Hyderabad
Can someone tell me which of this two rom is for Sensation:
RUU_PYRAMID_LE_ICS_35_S_HTC_Europe_3.32.401.105_R_Radio_11.69.3504.00U_11.22.3504.07_M_release_251961_signed.exe
or
RUU_PYRAMID_LE_ICS_35_S_HTC_Europe_3.32.401.105_R2_Radio_11.69.3504.00U_11.22.3504.07_M_release_253443_signed.exe

a read that de second is for Sensation XE!!!!!
Thanks

Second one is bit latest one and both of them are for XE ( if LE is there in the name then it's of XE)

Sent from my pyramid.. Through blazing fast sonic waves
 

cicc74

Senior Member
Jan 27, 2011
199
11
Second one is bit latest one and both of them are for XE ( if LE is there in the name then it's of XE)

Sent from my pyramid.. Through blazing fast sonic waves

Thanks always for your answer will this be fine to istall,
RUU_PYRAMID_ICS_HTC_Europe_3.32.401.5_R_Radio_11.69.3504.00U_11.22.3504.07_M_release_252064_signed.exe
 
  • Like
Reactions: andre6649

winsome

Senior Member
Jan 20, 2012
56
6
This is one great guide for those who want to restore their phone to stock rom and S-ON (warranty purposes). Also, the guide addresses and perfectly explains stuff like CID, SuperCID and how to change these aforementioned things. There are links to step-by-step setup of HTC drivers, AndroidSDK and adb and many useful stuff.
Simply awesome.

I managed to restore a HTC Sensation to stock rom, locked bootloader and S-ON.
Well done, kgs1992. And thank you for answering my n00bish questions on IRC =)
 
Last edited:

kgs1992

Senior Member
May 8, 2012
1,482
1,885
Bangalore
This is one great guide for those who want to restore their phone to stock rom and S-ON (warranty purposes). Also, the guide addresses and perfectly explains stuff like CID, SuperCID and how to change these aforementioned things. There are links to step-by-step setup of HTC drivers, AndroidSDK and adb and many useful stuff.
Simply awesome.

I managed to restore a HTC Sensation to stock rom, locked bootloader and S-ON.
Well done, kgs1992. And thank you for answering my n00bish questions on IRC =)

Thank you. And no prob. We're all always there to help! :)
 
  • Like
Reactions: cocto and Rvl7

Rvl7

Senior Member
Sep 28, 2011
329
17
I have HTC Sensation (non xe) out of the box with GB (S-On & Locked bootloader)
my friend tell me that my GB RUU. is this
RUU_Pyramid_hTC_Asia_WWE_1.35.707.1_Radio_10.43a.9 007.00U_10.51.9007.27_M3_release_198358_signed.exe

somehow my sensation update to ICS (so ICS OTA) automatically
now i have This information (3.32 with S-On and locked bootloader)
RUU-1.jpg


how to downgrade to Gingerbread again?

with this guide
[GUIDE][MAY.03.12] How to flash ICS 3.32 firmware | flash/update ARHD 6.6.x ICS ROM (step Do you want to go back to Gingerbread?)

flash proper GB (Is my RUU correct?)
is there any notification if wrong RUU? (so we can void semi brick cause wrong flash RUU)
 

kgs1992

Senior Member
May 8, 2012
1,482
1,885
Bangalore
I have HTC Sensation (non xe) out of the box with GB (S-On & Locked bootloader)
my friend tell me that my GB RUU. is this
RUU_Pyramid_hTC_Asia_WWE_1.35.707.1_Radio_10.43a.9 007.00U_10.51.9007.27_M3_release_198358_signed.exe

somehow my sensation update to ICS (so ICS OTA) automatically
now i have This information (3.32 with S-On and locked bootloader)
RUU-1.jpg


how to downgrade to Gingerbread again?

with this guide
[GUIDE][MAY.03.12] How to flash ICS 3.32 firmware | flash/update ARHD 6.6.x ICS ROM (step Do you want to go back to Gingerbread?)

flash proper GB (Is my RUU correct?)
is there any notification if wrong RUU? (so we can void semi brick cause wrong flash RUU)

You got an Hboot preupdate error once, right? Then this is the output of second run?
 
  • Like
Reactions: cocto

Top Liked Posts

  • There are no posts matching your filters.
  • 135
    **Very informative guide, meant for everyone**
    A better version is available on my site, here.


    S-OFF voids warranty! At no point do I claim that this guide restores your warranty in any way.
    This guide includes steps to restore stock software, which will conceal that your phone's software was modified.
    It is up to you to chose how you use this guide.
    Remember that hiding the fact that you have modified the phone for purposes of warranty claim is unethical & I don't support this in any way.

    1. Let's discuss about RUU first:

    1.1 What is an RUU?
    RUU stands for ROM Update Utility
    Simply put, a RUU is executable (.exe) Windows program that contains the various files required for changing your phone's software via HTC.​

    1.2 The RUU contents
    • Files for it's own configuration & execution
    • adb and fastboot files for communicating with your device
    • A signed HTC ROM to flash all partitions
    • Other miscellaneous files

    1.3 Method of execution:
    The RUU can be started by double-clicking the executable file when the phone is connected to the PC via fastboot USB (in the bootloader). The RUU works by passing commands to your device which will enable it to flash the ROM on your phone.
    Once the installation starts, the RUU executable does nothing except show you the current status of installation.
    When the installation is successful or when there is an error, it displays the appropriate message.​

    1.4 Security features:
    The RUU will ALWAYS check your CID & MID before installation. If your phone's CID or MID does not match the RUU's list of supported CIDs & MIDs, it will not install.
    Before flashing, the software number of the RUU and the phone's current software number are compared.
    If your device is S-ON, then you cannot flash an RUU with version less than your phone's current version. The same applies for hboot version​

    1.5 General PRECAUTIONS to take during RUU execution:
    • Always use USB 2.0 ports on the computer
    • Never use USB Hubs or extensions
    • Use a secure cable, preferably the one you got from HTC. The cable should not be loose or flimsy.
    • Never pull out the USB cable unless you are absolutely sure that the RUU is not making any changes to the phone.
    • If you are using a laptop, charge the battery first & keep the battery as well as the charger connected until RUU has finished execution.
    • Read & follow the guide to the letter.

    2. Naming convention & finding the right RUU
    RUUs for the HTC Sensation & Sensation XE are named as
    Code:
    RUU_PYRAMID or PYRAMID_LE_(Provider/Location name)_(Software base).(Provider/Location).x_RADIO_(Radio version)
    As an added note, RUU for the Sensation is PYRAMID, RUU for the Sensation 4G is PYRAMID_TMOUS, and the RUU for the Sensation XE is PYRAMID_LE.
    To find the right RUU for yourself, you need to know two things:
    1. Your CID & corresponding region code
    2. Your Current software version

    2.1 To find your CID:
    You will need sdk & and drivers, please take a look here. If you already have it, continue.

    • Reboot to bootloader powering down the phone & then Holding Vol down + Power button
    • Connect your phone to the PC while in the bootloader. The phone should say fastboot USB, if not, select fastboot on the phone & check if it says fastboot USB, if not, change the USB port you are using.
    • Navigate to the platform tools folder located inside android-sdk folder
    • Hold down shift and right-click anywhere in the empty space inside the window.
    • Select the option: Open command window here.
    • Next, type
      Code:
      fastboot getvar cid
    • You will now be shown your current CID.

    2.2 To get provider/location code
    Note down your CID and check corresponding provider/location here or search/post in this thread.
    Here is a list of variants:
    x.xx.61.x - Orange UK (United Kingdom)
    x.xx.69.x - Orange PL (Poland)
    x.xx.73.x - Orange FR (France)
    x.xx.75.x - Orange ES (Spain)
    x.xx.110.x - T-Mobile UK (United Kingdom)
    x.xx.111.x - T-Mobile DE (Germany)
    x.xx.113.x - T-Mobile CZ (Czech Republic)
    x.xx.161.x - Vodafone UK (United Kingdom)
    x.xx.163.x - Vodafone FR (France)
    x.xx.165.x - Vodafone IT (Italy)
    x.xx.168.x - Vodafone GR (Greece)
    x.xx.206.x - O2 UK (United Kingdom)
    x.xx.401.x - World Wide English (Europe Unbranded)
    x.xx.415.x - Arabic (UAE/Middle East)
    x.xx.468.x - Turkey
    x.xx.497.x - Morocco
    x.xx.498.x - WWE Brightpoint US (United States)
    x.xx.531.x - T-Mobile US (United Kingdom)
    x.xx.666.x - Bell Canada
    x.xx.707.x - Asia WWE (World Wide English)
    x.xx.709.x - Asia TW (Taiwan)
    x.xx.720.x - Asia India
    x.xx.771.x - Hutchison 3G UK (United Kingdom)
    x.xx.841.x - Telsra WWE (World Wide English)
    x.xx.862.x - Voda-Hutch AU (Australia)
    x.xx.901.x - TIM IT (Italy)
    x.xx.911.x - SK Telecom (South Korea)
    x.xx.1400.x - HTC China
    x.xx.1403.x - HTC China CMCC (China Mobile Communications Corporation)​

    2.3 To find your software version:
    If you have S Off, this doesn't matter, but try to flash the latest RUU.

    Go to "Settings" > "About phone" > "Software Information" > "More" > "Software number" on your device.
    The right software version for you is any version higher than or equal to this.

    This is sometimes inaccurate (especially if you're on a custom ROM).

    Another way to check is this:
    You will need sdk & and drivers, please take a look here. If you already have it, continue.

    • Reboot to bootloader powering down the phone & then Holding Vol down + Power button
    • Connect your phone to the PC while in the bootloader. The phone should say fastboot USB, if not, select fastboot on the phone & check if it says fastboot USB, if not, change the USB port you are using.
    • Navigate to the platform tools folder located inside android-sdk folder
    • Hold down shift and right-click anywhere in the empty space inside the window.
    • Select the option: Open command window here.
    • Next, type
      Code:
      fastboot getvar version-main
    • You will now be shown your current software number.

    The right software version for you is any version higher than or equal to this.

    2.4 To find your RUU

    Please find your suitable RUU using key words
    "RUU" "Pyramid" (Sensation) or "Pyramid LE" (Sensation XE) or "Pyramid TMOUS" (Sensation 4G) "Firmware Base.Provider/Location code"


    PYRAMID is for Normal Sensation
    PYRAMID LE is for Sensation XE
    PYRAMID TMOUS is for Sensation 4G

    They are not cross compatible.

    For example, If you want the RUU for Sensation XE Europe 3.32 based, find "RUU Pyramid LE 3.32.401 "

    Execlutable RUUs can be found here*:
    http://www.tsar3000.com/Joomla/inde...riginal-roms&catid=65:htc-downloads&Itemid=98
    http://www.shipped-roms.com/index.php?category=android&model=Pyramid

    For the extracted rom.zip file from RUU, look here*:
    http://goo.im/stock/pyramid/ruu

    *Please note, these files aren't hosted by me, so credit goes to whoever is uploading and hosting them.
    That being said, it is your responsibility to check the source & ascertain if they are reliable.
    Remember, an incomplete zip could possibly brick your device, especially S-OFF devices.


    3. RUU to restore stock

    The main reason that people flash RUUs is because they want to get back to stock.
    Here is how it's done:
    Is your device S-ON or S-OFF?
    S-ON
    Click to show instructions:
    Is your bootloader unlocked via HTC Dev? (If it is, it should say *** UNLOCKED *** at the top)
    Yes, it says UNLOCKED on the bootloader:
    Follow points 3.1 & 3.2 to restore your phone back to stock.​
    No, it doesn't say UNLOCKED on the bootloader:
    Follow point 3.2 only to restore your phone back to stock.​

    S-OFF​
    Click to show instructions:
    Is your bootloader unlocked via HTC Dev? (If it is, it should say *** UNLOCKED *** at the top)
    Yes, it says UNLOCKED on the bootloader:
    Follow points 3.1 & 3.2 to restore your phone back to stock.
    Optionally use 3.3 to turn back to S-ON.​
    No, it doesn't say UNLOCKED on the bootloader:
    Follow point 3.2 only to restore your phone back to stock.
    Optionally use 3.3 to turn back to S-ON.​


    3.1 Relocking the bootloader

    You will need sdk & and drivers, please take a look here. If you already have it, continue.

    • Reboot to bootloader by Holding Vol down + Power button
    • Connect your phone to the PC while in the bootloader. The phone should say fastboot USB, if not, select fastboot on the phone & check if it says fastboot USB, if not, change the USB port you are using.
    • Navigate to the platform tools folder located inside android-sdk folder
    • Hold down shift and right-click anywhere in the empty space inside the window.
    • Select the option: Open command window here.
    • Next type:
      Code:
      fastboot oem lock
    • Finally, type
      Code:
      fastboot reboot-bootloader
    • Bootloader should now say *Relocked* & may or may not display a Security Warning

    3.2 Using RUU to restore partitions
    • Find your right RUU using 2 in this guide.
    • Flash your RUU as you normally would by double clicking the executable & following the instructions, you phone must be connected to PC via fastboot USB (in the bootloader).
    • If you get a Hboot Pre-update message, re-run the RUU once again with your phone connected in fastboot USB.
    • If the previous step fails, follow points listed under 4. Flashing RUU manually.
    • Reboot your device to bootloader, your bootloader should now say *Locked* or *Relocked*

    3.3 Turning S On after RUU flash
    You will need sdk & and drivers, please take a look here. If you already have it, continue.

    This is optional, but if you want to do it, it must be done only after flashing the RUU! If your device has a hboot that isn't LOCKED, RELOCKED or UNLOCKED, do not do this!!

    • Reboot to bootloader powering down the phone & then Holding Vol down + Power button
    • Connect your phone to the PC while in the bootloader. The phone should say fastboot USB, if not, select fastboot on the phone & check if it says fastboot USB, if not, change the USB port you are using.
    • Navigate to the platform tools folder located inside android-sdk folder
    • Hold down shift and right-click anywhere in the empty space inside the window.
    • Next type:
      Code:
      fastboot oem writesecureflag 3
    • Finally, type
      Code:
      fastboot reboot-bootloader
    • Bootloader should now say S ON.
    • If the bootloader says *Security Warning*
    • Remove the battery and then re-insert it
    • Reboot to bootloader by holding down the volume key and pressing the power button.
    • Connect your phone to the computer via USB.
    • Re-run the RUU executable again.
    • The bootloader should now say S On.

    4. Flashing RUU manually

    4.1 Getting PG58IMG.zip from RUU
    Run the RUU executable as you normally would, but don't proceed to the second step i.e. when a second window appears, do nothing. Do not proceed, just ignore it for now, but don't close the window.

    • Right-click the Windows Start button and select "Open Window Explorer" option.
      • If you use Windows XP
        Copy-paste this in the navigation bar:
        Code:
        C:\Documents and Settings\%USERNAME%\Local Settings\Temp\
      • If you use Windows Vista/7
        Press & hold Windows key on the keyboard and then press R (Win key + R). Once the box pops up, copy paste this:
        Code:
        %temp%
    • Right click anywhere inside explorer window (not on any folder) and select Sort by then select Date.
    • Locate the latest one created (first in the list & it will most likely have random numbers in the name) & open it.
    • You will find a second folder with a set of random numbers. Open it, inside you will find a number of files and the rom.zip
    • Copy the rom.zip file to another location.
    • Now, close the RUU executable folder & rename the rom.zip file as PG58IMG.zip

    4.2 Adding your CID to the PGIMG.zip

    This is only required if the RUU you have is not for your CID and you don't have SuperCID.

    • Check your cid by referring to 2.1 in this guide.
    • Double click the PG58IMG.zip file to open it.
    • Double click android-info.txt to open in notepad.
    • Add your CID to the end of the file uising the ones already in there as an example.
    • Make sure there are no spaces in or after your CID
    • Press Ctrl +S and then close the window.
    • You will now see a pop up window. Click yes to modify the archive.

    4.3 How to Super CID

    This is only required if the RUU you want to flash is not for your CID and you did not follow 4.2.
    This requires that your bootloader should not say S-On.

    • Follow all steps in 2.1 and then continue.
    • Now type the following code:
      Code:
      fastboot oem writecid 11111111
    • Now type :
      Code:
      fastboot reboot-bootloader
    • Wait for the phone to reboot into bootloader.
    • Type this:
      Code:
      fastboot getvar cid
    • Your CID should now be 11111111
    • If this method failed, try 4.2

    4.4 How to flash PG58IMG

    4.4.1 Without a PC, via bootloader
    • Put the PG58IMG.zip onto the root of your SD Card
    • Reboot to bootloader by Holding Vol down + Power button
    • You will then be asked if you want to install the file, select yes by pressing Vol up.
    • Don't touch anything till the install completes
    • After the install is complete, when prompted to reboot, open the back casing of the phone and take out the SD Card.
    • Then press the power button once to reboot.
    • If you experience a boot loop, reboot to bootloader and re-flash the PG58IMG.zip
    • If booted into bootloader, select fastboot > reboot.
    • If booted into fastboot, select reboot.
    • Connect the SD Card to a computer and delete the PG58IMG.zip file
    If this method fails, try 4.4.2​

    4.4.2 With a PC, via fastboot USB
    You will need sdk & and drivers, please take a look here. If you already have it, continue.
    • Reboot to bootloader by Holding Vol down + Power button
    • Connect your phone to the PC while in the bootloader. The phone should say fastboot USB, if not, select fastboot on the phone & check if it says fastboot USB, if not, change the USB port you are using.
    • Navigate to the platform tools folder located inside android-sdk folder
    • Copy the PG58IMG.zip file from step 4.1 to this folder
    • Hold down shift and right-click anywhere in the empty space inside the window.
    • Enter the following command
      Code:
      fastboot erase cache
    • You may not see any output, then enter the command
      Code:
      fastboot oem rebootRUU
    • You phone will now go into the RUU mode.
    • Wait for around 30 seconds, then enter the command
      Code:
      fastboot flash zip PG58IMG.zip
    • The installation will begin and you will be able to see the progress at every step.
    • Once done, enter the command
      Code:
      fastboot reboot
    • If you experience a boot loop, repeat 4.4.2 again.

    5. Common errors & Troubleshooting:
    If you get any error while running the executable, it is recommended that you use the method to extract the rom.zip & flash it.
    This is because the error code returned by the executable is not very clear.

    Stuck at <waiting for device>
    • Drivers not present or not installed correctly; Install the correct drivers.
    • Phone is not in fastboot USB mode. Remove USB Cable; remove & reinsert phone battery; hold volume down + power; select FASTBOOT; connect USB.
    error: cannot load 'xyz'
    You typed the wrong filename or the file isn't present in the folder. Check that the file is present & that the filename is correct, then repeat the command.​
    Error 150: ROM upgrade utility error
    This is most likely an error when you use Windows Vista.​
    Error [170]: USB Connection error
    The RUU cannot connect to your device.
    • Drivers not present or not installed correctly; Install the correct drivers.
    • Phone is not in fastboot USB mode. Remove USB Cable; remove & reinsert phone battery; hold volume down + power; select FASTBOOT; connect USB.
    • Other unknown error. Extract rom.zip & flash manually via SD Card.
    ERROR [155 to 159]: IMAGE ERROR
    One of these error messages will appear when your device is S-ON & use the incorrect RUU having lower software number/hboot version than what is currently on your phone.​
    FAILED (remote: not allowed)
    • You did not reboot to RUU mode before running the flash command.
    • You are trying to use a command that you cannot use on a Locked and/or S-ON device.
    (bootloader) [ERR] Command error !!! or INFO[ERR] Command error !!!
    • You are trying to issue an invalid command.
    • You are trying to use a command that you cannot use on a Locked and/or S-ON device.
    FAILED (remote: signature verify fail)The zip that you extracted is broken or the RUU you downloaded is is corrupted. Get the zip again or use a different RUU.​
    FAILED (remote: 99 unknown fail)
    Your bootloader is still unlocked. You didn't relock your bootloader. Relock your bootloader using this command:
    Code:
    fastboot oem lock
    FAILED (remote: low battery)
    Battery is too low. Reboot to bootloader by typing
    Code:
    fastboot reboot-bootloader
    & let the phone charge for a while.​
    FAILED (remote: 90 hboot pre-update! please flush image again immediately)
    Normal after Hboot version changes. You need to run only the flash command again (not the whole set of commands, just the fastboot flash command.)​
    FAILED (remote: 42 custom id check fail)
    The RUU doesn't contain your CID. Either add your CID to the zip (needs S-OFF) or try changing your CID (usually works only on an S-OFF device)​
    FAILED (remote: 92 supercid! please flush image again immediately)
    Your device is S-ON & has Super CID. You need to run only the flash command again (not the whole set of commands, just the fastboot flash command.)​
    FAILED (remote: 43 main version check fail)
    Your device is S-ON & you are trying to use an RUU that has software number less than your current software number.​
    FAILED (remote: 44 hboot version check fail)
    Your device is S-ON & you are trying to use an RUU that has hboot version less than your current hboot version.​
    FAILED (status read failed (Too many links))
    Disregard & continue. It is not really an error as such.​
    FAILED (data transfer failed (Too many links))
    Reboot the phone to fastboot USB. Remove USB Cable; remove & reinsert phone battery; hold volume down + power; select FASTBOOT; connect USB.
    Then, try the commands again.​
    Any other error that says '(Too many links)'
    Reboot the phone to fastboot USB. Remove USB Cable; remove & reinsert phone battery; hold volume down + power; select FASTBOOT; connect USB.
    Then, try the commands again.
    If you still get the error, please post the complete error code here & when the error occurred so that it can be solved & added to this list.​
    Any other error that says 'please flush image again immediately'
    You need to run only the flash command again (not the whole set of commands, just the fastboot flash command.) Please post the complete error code here & when the error occurred so that it can be added to this list​
    Any error that isn't present in this list
    Please post the complete error code here & when the error occurred so that it can be solved & added to this list.​
    16
    Read Me

    Guide last updated: 11th February, 2013

    You are welcome to provide any suggestions, ask RELEVANT questions & point out any typos or errors in the guide. I will act upon it accordingly.
    I request you to link all RUU related questions & restoring S On questions to this guide as I it is the most complete guide in my opinion.

    This guide has been compiled from personal experience & various other sources on the internet as well as within XDA. I do not take sole credit for the information contained in this guide.
    Any part of this guide may be used wherever needed without the need for my permission. If you modify the guide, please mention that it is a modified version & DO NOT present it as my work or link the guide to me in any way.


    Last but not the least, I claim no responsibility for any damage caused to your device as a result of following this guide. (This will only happen if you missed out on something.)
    3
    UPDATE: The guide now includes instructions for S On using RUU. I request you to link all RUU related questions & S On using RUU questions to this guide. :)
    2
    Great work on the guide it really covers the topic of a RUU very well. Sorry to be the first one to post here, and these are just suggestions also. But I seen some things that could be revised.

    In the following part you can do away with all of the below.



    You can replace it with just navigating to the "tools folder" in the of the SDK folder. While in the tools folder simple hold down shift and right click anywhere in the window, then select "Open command window here". This will open a command window that is already in the tools directory so you have full access to ADB and fastboot commands. No need to copy and past files.

    Also you can modify the below to just double click the file.



    That is just some suggestions to make it a little simpler.....;)

    I will revise the guide after I get back home, from.my desktop..
    Thanks for your suggestions, they are very good.. :)

    Sent from my Sensation using xda premium

    EDIT: Done :)
    2
    just a small suggestion :)

    in section 1.3
    just if possible keep a note saying ...phone should be connected to pc in fastboot ..otherwise RUU wont run :D