Luckily I've now managed to bypass this error by hex editing and reflashing the misc partition. The following method should allow you to downgrade to any signed HTC ROM no matter what version you currently have installed, even if your phone is S-ON.
Warning: You could probably brick your phone if you flash an invalid misc partition. So follow these steps carefully (or not at all)! Also, if you flash a very recent ROM, you may not be able to use these steps to downgrade again!
- Ensure you have the HTC Sync USB drivers installed then download the zip at mediafire.com/?wxf6y4yq6d6nc8d containing the tools you need, and an official HTC ROM executable. I used the ROM at filefactory.com/file/cbd7165.
- Connect your phone via USB and select the HTC sync option when prompted. Also ensure that USB debugging is enabled (this is the default).
- Extract the zip and open a windows command prompt and browse to the directory where you extracted the files.
- Execute the following commands in the command prompt:
adb push flash_image /sdcard/flash_image adb push GingerBreak /data/local/tmp/GingerBreak adb shell chmod 777 /data/local/tmp/GingerBreak
- Now enter the interactive shell mode with the following command:
- Gain temporary root access by executing the following command within the interactive shell:
- As root now execute the following commands:
cat /dev/mtd/mtd0 > /sdcard/misc.img cat /sdcard/flash_image > /data/flash_image chmod 777 /data/flash_image
- Now exit from root permissions. The shell prompt should change back to a $.
- Clean up a few files and exit from adb.
rm /data/local/tmp/sh rm /data/local/tmp/boomsh exit
- Copy the image file from your SD card using the command:
adb pull /sdcard/misc.img misc.img
- Run HxD.exe, select "OK" at the prompt then File -> Open and locate misc.img (which is in the current directory). On the 11th line you should see the version number of your current ROM, change this to a lower number. I set my version number to 1.30.401.0 since this was the version number of the previous official HTC ROM. The changes made will be highlighted in red. File -> Save As and name it misc2.img.
- Copy misc2.img to your SD card using the following command:
adb push misc2.img /sdcard/misc2.img
- Reboot your phone so that you can use GingerBreak again to attain temporary root privileges. (This may not be strictly necessary, but I think it's worthwhile just in case.)
- Once it's back and you've connected via USB using the HTC Sync option again, issue the following commands in your command prompt:
adb shell ./data/local/tmp/GingerBreak /data/flash_image misc /sdcard/misc2.img
- Now run the official ROM installer executable as normal. Note that the installer may state your current version number but this is ignored and you should be able to downgrade successfully!
Let me know if you have any problems.
Confirmed Working on:
- TMobile UK 18.104.22.168 + HBOOT 0.90.0.0
- TMobile Polska 1.30.401.2 + HBOOT 0.90.0.0