5,604,859 Members 33,640 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] How to Unroot an HTC Desire

Tip us?
 
Droidzone
Old
(Last edited by Droidzone; 17th July 2011 at 06:14 PM.)
#1  
Droidzone's Avatar
Recognized Developer - OP
Thanks Meter 2165
Posts: 5,466
Join Date: Sep 2010
Location: Kerala

 
DONATE TO ME
Angry [GUIDE] How to Unroot an HTC Desire

HTC DESIRE UNROOTING PROCESS, AND THE ANDROID HBOOT, FASTBOOT, AND RECOVERY MENU OPTIONS

(How to Revert to Stock/ What to do before taking my phone back to the service centre?/ How to restore my phone after a failed OTA update on a Rooted phone/My phone is stuck at the HTC Quietly brilliant screen/My boot animation keeps looping, What to do?)

by

Courtesy:
To EddyOS for the Tutorial on getting the PB99IMG from the RUU


I didnt find any newbie friendly guides for unrooting the HTC Desire, on XDA. Even some external ones arent that easy to follow, unless you have a very good idea about what is going on.

The main purpose of this post is to benefit people who have got an SLCD bricked device on their hands with nothing displayed except a blank screen, and cannot remember the key sequences necessary to activate the unrooting process, or to run the OTA Update and get to Android recovery. You will note that I have added the time taken at each step in the process. This will benefit people with SLCD bricks waiting anxiously without seeing anything on screen.

For a complete guide on Unbricking an HTC Desire, please see my thread here.

There are two methods of unrooting an HTC Desire.
Methods:
  1. Get the latest RUU for your region from Shipped Roms. This is an exe file. You can run this file directly from PC. Then connect your device when so prompted.
  2. The second method is to flash the rom.zip directly from the Android bootloader interface, after renaming the Rom.zip (which is actually obtained from the RUU) to PB99IMG.zip [See EddyOS's excellent step-by-step guide for dummies, in the FAQ below]
Method1 does not need any explanation (If necessary, I will add illustrations of this process later along with error codes)
Method2 is illustrated below.

Note: The following post illustrates the actual steps necessary to unroot your HTC Desire by running the PB99IMG.zip. This is also the method to upgrade the software with the RUU, the last method to fix bootloops cause by a bad boot, and also the way to unbrick an SLCD bricked Desire. Note that another simple method exists to unroot the device, and that is by directly running the exe file of the RUU from Windows. Though simple, this is slightly riskier, since complications with Windows drivers, or a sudden power surge or PC reboot can semibrick/brick your device. The following method using PB99IMG.zip eliminates those problems.

Unrooting is just one of the steps necessary to unbrick an SLCD bricked HTC Desire. The process is a pain for these users because they cant see anything on the screen and left pressing keys in sequence, whose function they can only guess. Also they need to wait specific amounts of time before pressing the sequences.

I'm making visible the steps which the Android system proceeds through, when you run a PB99IMG.zip to unroot your Android device. I've also included the time taken before each step while running the WWE 2.29 RUU as PB99IMG.zip. The time isnt much different for other ROMs. To be sure, just give it about 30secs more than the time I've noted.

Initial steps:

  1. Create a goldcard if you want to convert a branded Desire to unbranded, or vice versa, or to make a Desire of one region (CID) accept software written for a phone of another region.
  2. After creating the goldcard, format it as FAT32. If more than one partition exist, delete the rest, and format one as Primary and FAT32.
  3. Put the file PB99IMG.zip into the root of the goldcard. Note that the name must be PB99IMG.zip and not PB99IMG.zip.zip. Windows has a tendency to rename it as the latter.
  4. If you dont already have the PB99IMG.zip, you can get it by running the RUU, and while the RUU is loaded (dont start the RUU upgrade. Just click on the exe, and when the welcome screen of RUU shows up,) search in your Temp folder for the file rom.zip. Hint: To quickly navigate to Temp, Type the following into the Run window: %TEMP% [If you still get this step confused, see EddyOS's excellent tutorial on this, in the FAQ below]
  5. To run the PB99IMG.zip, just reboot with Vol- and power button pressed.

I'm describing the whole boot process below for Reference, though.

Hboot mode (Vol- & Power key. Key them pressed for a 5-6 secs

FOR INSTALLING ANY RUU AS PB99IMG.ZIP

Press Vol- , then w/o releasing it, press Power button + Vol –


After 3-4 secs, the following screen shows up momentarily:


· Fastboot
· Recovery
· Clear Storage
· Simlock
This shows the above few options for 2-3 seconds, and then directly checks for PB99IMG.ZIP. It displays:
SD Checking…
Loading…
PB99DIAG.ZIP
Pb99DIAG.nbh
PB99IMG.ZIP
When it finds PB99IMG.zip, it starts to load it (13 secs after you press the Vol- & power key)
It gives the next options after 2min 20seconds (for the WWE 2.29 RUU) from the initial key press of Vol- and Power key.
Parsing………………….[SD zip]
1. Bootloader
2. Radio V2
3. Radio_Cust
4. Boot
5. Recovery
6. System
7. Userdata
8. Splash1
9. Splash2

Do you want to update device?
<Vol Up> Yes
<Vol Down> No
So, net key sequences involved:
· Back+Power
· Power again
· Vol Up
If we chose No, next option:
Do you want to reboot device?
<Vol Up> Yes
<Vol Down> No

If you pressed Yes, then:
Update is in progress..
Do not power off your device.
1. Bootloader -OK
2. Radio V2 -OK
3. Radio_Cust -OK
4. Boot -OK
5. Recovery-Unzipping/Updating
6. System
7. Userdata
8. Splash1
9. Splash2
It cycles through each of these in turn. For me, it took exactly 2 min 17 secs for time when I chose to apply update, to when update was completed.

(Note: At times, it may update the bootloader and reboot. If you have an SLCD screen, when the device reboots, you may not see anything onscreen (black). At this point, it is notable that the device boots to Fastboot instead of Bootloader, so you will need to press Power button again to get it to resume the update process. Once it completes, you will be presented the options to reboot the device. So you just need to Press Vol + after some time)

It displays:
Update complete
So you want to reboot device?
<Vol Up> Yes
<Vol Down> No

Congratulations. Your phone is now officially unrooted.
On rebooting, HTC screen shows up for a few seconds.
Then a green Down arrow in a green circle shows up for another 5-6 seconds.
Then, HTC screen again.
Finally, HTC screen disappears and the HTC Quietly brilliant logo shows.
Your device now boots into the Android phone.
Total time taken: 6min 30 seconds.

If the Rom is incompatible with your SLCD device, at the reboot stage, you will hear the momentary vibration. Then after about 10-20secs, you will hear the HTC Quietly Brilliant tone. The phone will boot, and the keys light up after about a min, indicating that the Android system has booted up. Since the Rom is incompatible, there's still nothing on screen. To shutdown the booted up phone, press power key, then swipe your finger vertically up-down like you do to unlock your phone normally, which is exactly what you're doing. Then keep Power button pressed until the phone vibrates. This means it is presenting you with the Power menu. At this point press the trackball once, then once more. The phone will now shutdown. At this point you can flash your SLCD compatible update.zip (OTA) and unbrick it.


FASTBOOT mode

Back+Power key:
4 options:
· Bootloader (For running PB99IMG.zip)->Choose with Power key (This loads the Bootloader/Hboot mode)
· Reboot
· Reboot bootloader
· Power down

Bootloader (Hboot mode) or PB99IMG update mode.

Performs the following check on the PB99IMG.zip:
1. Bootloader
2. Radio V2
3. Radio_Cust
4. Boot
5. Recovery
6. System
7. Userdata
8. Splash1
9. Splash2
Do you want to start update?
Vol Up: Yes
Vol Down: No
So, net key sequences involved:
· Back+Power
· Power again
· Vol Up

If we chose No, next option:

Do you want to reboot device?
<Vol Up> Yes
<Vol Down> No



No brings up the following options:


  • · Fastboot
  • · Recovery
  • · Clear Storage
  • · Simlock

The Following 15 Users Say Thank You to Droidzone For This Useful Post: [ Click to Expand ]
 
Droidzone
Old
(Last edited by Droidzone; 12th August 2011 at 01:24 PM.)
#2  
Droidzone's Avatar
Recognized Developer - OP
Thanks Meter 2165
Posts: 5,466
Join Date: Sep 2010
Location: Kerala

 
DONATE TO ME
Default Frequently Asked Questions (FAQs) for Newbies

Frequently Asked Questions (FAQs) for Newbies

1. Why do I need to Unroot?
  • To take the device to service centre for warranty
  • To fix problems with Boot and Recovery unsolved by other methods
2. What are the methods of unrooting? Which is safer?

Basically both methods are the same. It is the process of flashing an original HTC software onto your ROM. One method involves running an .exe file from Windows, and the other is by running a file extracted from this exe file from the sdcard. The latter method is called the PB99IMG.zip method, because it involves renaming the rom file so extracted as PB99IMG.zip. This method is generally safer because the whole process can be completed from your phone itself. The method of running the exe is prone to corruption because of problems with Windows drivers, your Usb cable, Battery issues, and even a Windows System Failure or System Crash or Power Failure!

3. How do I get a PB99IMG.zip? [EddyOs's complete tutorial for Dummies]

(The illustrations and answer to this question has been provided by EddyOS)

If you still get lost, dont even bother to ask!!

1. Double-click on the RUU file and wait until you get to the first main screen



2. Move the window to the bottom of your screen because it can’t be minimised and will sit on top of all other windows





3. 3. Click on Start>Run and type ‘%temp%’. Then click ‘OK’



4. Look for the newest folder in the temp folder. Double-click on it




5.Copy the file called ‘rom’ to your Desktop



6. Rename the file called ‘rom’ to ‘PB99IMG’



7. Copy this file to the root of your SD card (root = not in any folders)

4. Do I need a Goldcard?
If you have a recent version of the RUU for your Device, available on Shipped Roms, you dont need a goldcard. This is the usual scenario for people who purchased their Desire in Europe, and so have an unbranded Desire. All Branded Desires need a correct branded version of the RUU, and any other RUU including WWE (Worldwide English, or European) RUU will not work for them. Also if an unbranded Desire user wishes to change RUU to a branded version, he will need a Goldcard. This is because all Desires have a particular software tag in the Rom, called the InfoCID. This dictates the Region code. For Eg. An Indian Desire is branded and has InfoCID of HTC__038. When you change a RUU to different region, what you actually do is reset the InfoCID setting. Changing the InfoCID setting requires a Goldcard.

5. What is a Goldcard?

It is a normal MicroUSB card specially prepared in such a way that its Sector 0 (which normally doesnt hold anything useful) is modified, so that it signals to the HTC RUU that the InfoCID may be changed.

6. How do I create a Goldcard?

Just download this tool (Credits and All Rights by klutsh@Modaco), and run it.

In case your card in phone cannot be detected by the PC, download and install Goldcard Helper from the market and use it to generate the Reverse CID

7. Can you tell me more about Goldcards?
Sure. I've already posted it for you. Read the FAQs in this thread.

8. I think I've bricked my Desire. I cant unroot it with your method. What can I do?
Follow my thread on Unbricking a Bricked Desire. Though it's written for SLCD device, it will work for AMOLED too. The chance of success depends on two essentials: 1-That you have a working goldcard, and 2-You have a compatible RUU (of version higher or equal to the current version)


The Following 6 Users Say Thank You to Droidzone For This Useful Post: [ Click to Expand ]
 
Droidzone
Old
(Last edited by Droidzone; 26th December 2010 at 05:55 PM.)
#3  
Droidzone's Avatar
Recognized Developer - OP
Thanks Meter 2165
Posts: 5,466
Join Date: Sep 2010
Location: Kerala

 
DONATE TO ME
Reserved for the future...

 
medomedo
Old
#4  
Junior Member
Thanks Meter 0
Posts: 20
Join Date: May 2010
Hi,

Thanks for informative article. Can I install PB99IMG.zip using the standard clockworkmod @ recovery mode?
Edited: I tried using windows, it failed. I tried the 2nd method, but Desire does not reconize the PB99IMG.zip file and so nothing happens.
 
Droidzone
Old
#5  
Droidzone's Avatar
Recognized Developer - OP
Thanks Meter 2165
Posts: 5,466
Join Date: Sep 2010
Location: Kerala

 
DONATE TO ME
Quote:
Originally Posted by medomedo View Post
Hi,

Thanks for informative article. Can I install PB99IMG.zip using the standard clockworkmod @ recovery mode?
Edited: I tried using windows, it failed. I tried the 2nd method, but Desire does not reconize the PB99IMG.zip file and so nothing happens.
When you mean you tried it in Windows, do you mean you connected the cable and ran the exe file? If so, what error did it give you?

You cant flash it via Clockwork. And you dont have to.

Assuming you have only one partition on your sdcard and it is formatted correctly as FAT32 and the PB99IMG.zip is placed in the root folder, and you press Vol- & Power button to start your Desire, it will detect the file and start the update process. Problems usually happen when the card is not formatted correctly, and the file is named PB99IMG.zip.zip and not just PB99IMG.zip. This is because Windows may not display the full filename including the zip extension.

The Following User Says Thank You to Droidzone For This Useful Post: [ Click to Expand ]
 
KayK
Old
#6  
Senior Member
Thanks Meter 0
Posts: 130
Join Date: Apr 2009
Default one simple question

i wanted to root my phone so i could flash to a custom ROM, but i have since updated to 2.13.707.2 OTA, but i cant seem to find the RUU in shipped ROMs site...
could i use the 2.13.707.1 RUU to unroot?
 
medomedo
Old
#7  
Junior Member
Thanks Meter 0
Posts: 20
Join Date: May 2010
Hi droidzone,

Thanks for the quick response. The error I got from windows 7 pro was (translated from German):

error 170: USB connection failure. The update software was not able to connect to mobile. Make sure the cable is connected to both PC and mobile.

My SD card is partitioned into FAT32 and a small parition ext3 for apps. This configuration is defacto for DeFrost, OpenDesire, and Oxygen ROMs. I moved the rom.zip file and renamed it using rootExprorer application to be 100% sure. When I go to recovery mode and then to Clockwork I can see the exact file name and its correct PB99IMG.zip (I am not sure if the system is case sensitive) but PB99IMG.zip is the exact name. Of course I restarted win7 few times but nothing changed. I need this because my mic is bricked like described in this thread
http://forum.xda-developers.com/show...51668&posted=1

What can I try next? thanks!
 
Droidzone
Old
(Last edited by Droidzone; 20th December 2010 at 01:53 PM.)
#8  
Droidzone's Avatar
Recognized Developer - OP
Thanks Meter 2165
Posts: 5,466
Join Date: Sep 2010
Location: Kerala

 
DONATE TO ME
Quote:
Originally Posted by medomedo View Post
Hi droidzone,

Thanks for the quick response. The error I got from windows 7 pro was (translated from German):

error 170: USB connection failure. The update software was not able to connect to mobile. Make sure the cable is connected to both PC and mobile.

My SD card is partitioned into FAT32 and a small parition ext3 for apps. This configuration is defacto for DeFrost, OpenDesire, and Oxygen ROMs. I moved the rom.zip file and renamed it using rootExprorer application to be 100% sure. When I go to recovery mode and then to Clockwork I can see the exact file name and its correct PB99IMG.zip (I am not sure if the system is case sensitive) but PB99IMG.zip is the exact name. Of course I restarted win7 few times but nothing changed. I need this because my mic is bricked like described in this thread
http://forum.xda-developers.com/show...51668&posted=1

What can I try next? thanks!
Quote:
i wanted to root my phone so i could flash to a custom ROM, but i have since updated to 2.13.707.2 OTA, but i cant seem to find the RUU in shipped ROMs site...
could i use the 2.13.707.1 RUU to unroot?
It's worth a try.Normally an older version cant be used on top of a newer version. It will give a "main version is newer" error. A newer version will always work. If it still doesnt work for you, downgrading may be the only resort. Get Teppic's downgrade tool for that.

Quote:
error 170: USB connection failure. The update software was not able to connect to mobile. Make sure the cable is connected to both PC and mobile.
Could be a Windows driver issue. The PB99IMG.zip method should work for you though. Remove the ext partition, and partition the whole card as one big FAT32 partn, format it once, and then put the file there again. It should work.

If it still wont work, use another sdcard, repeat these steps.

The Following User Says Thank You to Droidzone For This Useful Post: [ Click to Expand ]
 
KayK
Old
#9  
Senior Member
Thanks Meter 0
Posts: 130
Join Date: Apr 2009
Quote:
Originally Posted by droidzone View Post
It's worth a try.Normally an older version cant be used on top of a newer version. It will give a "main version is newer" error. A newer version will always work. If it still doesnt work for you, downgrading may be the only resort. Get Teppic's downgrade tool for that.
Thanks for clearing up for me...i know now what to prepare...
 
medomedo
Old
#10  
Junior Member
Thanks Meter 0
Posts: 20
Join Date: May 2010
FYI, I used another SDcard with only FTA32 partition and it worked. Howerver it did not fix the mic problem. Thanks!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes