How to downgrade an HTC Desire to stock version? I know the first thing you gonna say is to google it, there is plenty of tutorials for it, but I tried at least 5 of them (including some in XDA), and every time I didn't succeed.

First of all, here's my HTC Desire status :

BRAVO PVT-1 SHIP S-ON
HBOOT-0.93.0001
MICROP-031d
TOUCH PANEL-SYNTH0101
RADIO-5.11.05.27
Aug 10 2010,17:52:18


At the beginning, I tried to reinstall the original rom from the links in the XDA : http://forum.xda-developers.com/showthread.php?t=695667

I choosed RUU_Bravo_HTC_Europe_1.15.405.3_Radio_32.30.00.28U _4.05.00.11_release_121865.exe because I'm in France (and it seems it was the most recent version for european).

But when I execute the installer, it works a bit, but then, it fails with this error :


  ERROR 140: Bootloader version error (I got it in french : "Erreur de version bootloader")


So after, I tried to get directly the rom.zip by going into the %temp% folder (windows), I put it on the mounted disk of my android, and renamed it to PB99IMG.zip.

I boot with VOL DOWN pressed, and it extract the archive but fails with a :


  Main version is older!


So, I must have a newer HBOOT, but I can't find how to downgrade it, and most importantly, to which version ? 0.92 ? 0.90 ? 0.83 ? 0.80 ?

I tried some tutorials, like :

http://forum.xda-developers.com/showthread.php?t=768256 => The link for the downgrader (2.1 or 2.3) doesn't exists anymore, or contains viruses ... great

http://www.mikesouthby.co.uk/2010/08/htc-desire-downgrading-hboot-and-installing-custom-froyo-rom/ => The PB99IMG.zip for downgrading the HTC Desire doesn't work, it result in the same error message "Main version is older!".

In order to sum up, I'm looking for help to make my HTC Desire go back to the ROM I had when I purchased it. For that, I need a link to a tutorial or an app for downgrading to the correct HBoot, and I need to know to which version.

Thank you very much for your help, I really appreciate! I spent 5hours trying to make this work without any luck.
I finally succeeded !! (YOUHOU!! You can't believe how proud I am !)

First of all, I want to indicate that links on XDA (those that goes in multiupload.com, that redirect to lnx.lu), SUCKS! I can't believe it. You have to download a "download manager", with so many related ads and apps you must install. It's a shame. (I am very angry agains't them (lnx.lu) for wasting my time just because they are greedy).

Now, the real answer !

You need to downgrade your hboot version before running the RUU rom, for that, it's quite easy :

First, you choose your ROM on that page, and notice the ROM version

Then, you go here (if the link is down, you can download the source code here!) and define the CID and the ROM version.

For the CID, if you don't know it, just set to 11111111 or HTC__022.
If you want to try something more precise, you can try the one related to your carrier from this link.

Keep the download file to a specific directory (for this case, it will be /tmp/mtd0.img).

Now you need the flash_image tool, if you can't find one, here's a link. Download it to /tmp/flash_image

Now some command line. For that, you'll need the Android SDK and a correct USB driver (adb should return a device when connected, with debug on).

Do these commands :

// go to the sdk/platform-tools/ dir
adb push /tmp/flash_image /data/flash_image
adb push /tmp/mtd0.img /data/mtd0.img

// Make sure those files were updated with :
adb shell ls /data

// Then run
adb shell

// You will be in your terminal's shell, now do these commands :

chmod 755 /data/flash_image
/data/flash_image misc /data/mtd0.img

CTRL+C // To quit the terminal's shell and go back to your computer shell

// Now reboot to RUU mode
adb reboot oem-78


Once the phone is on RUU mode (showing a grey HTC logo), run the .exe rom you downloaded previously, wait for it to finish, and voilà! You're done ! :)

Here's the doc I followed for the commands.