[Sprint HTC EVO 4G LTE] yarrimapirate:
Update 10/19/2012: There is now an automated package available:

http://xdaforums.com/showthread.php?t=1940512

Confirmed working for 1.19

I just downgraded successfully again. Mac_Gyver, you may want to add this to the OP for easy reference... and THANKS for getting the ball rolling on this. You gave me enough information to take this and run with very little experience messing with low-level Android (but a little bit of Linux under my belt) :p

Here are some highlights:

SU/Root is not needed for this to work. TWRP Recovery is needed however, so you need to unlock your bootloader.

You will get the *** TAMPERED *** flag when you load the bootloader after doing this.

What I did before repeating this process:

Relocked my bootloader (fastboot oem relock)

Flashed Sprint 2.13 RUU with 1.12 Radio and 1.19 HBoot (and verified that it did indeed update HBoot again)

None of this is required, as I originally downgraded with Fresh 5.3.1 loaded. I just wanted to see if root was needed, and it isn't.

This was done on Kubuntu Precise (12.04) x64 but should work on any flavor of *buntu, Fedora, Debian, etc.

You will need:

EDIT: I've attached a file to this post with everything needed.

EDIT 2: I've attached a bakp4 file with the MEID removed. If you lose your bakp4 file, unzip this one and open the bak4p file in a hex editor. At offset 0x21C you need to enter your HEX MEID (found under the back cover of your phone). It is 14 digits long and should start with 99. Save the file and you can try flashing it to pull your phone out of Qualcomm Loader (AKA brick).

Standard disclaimers about this procedure possibly wiping out your entire extended family apply.

What to do:

Preparation: Unzip all the attachment files into a folder in your home directory. Open xterm/konsole/your favorite shell. CD to the folder you dumped everything into. Then:

$ chmod +x adb
$ chmod +x fastboot
$ chmod +x emmc_recover
$ chmod +x getbrickdrive.sh

1. Unlock your bootloader with HTCDev Unlock (If you haven't already, So we can load TWRP)

2. Reboot to Bootloader (power+vol dn). Enter Fastboot. Plug your phone into the computer. (Duh)

3. Flash the TWRP Recovery image. This gives us ADB Shell ability before the ROM loads. (Maybe there's another way to do this?)

$ ./fastboot flash recovery openrecovery-twrp-2.1.8-jewel.img

4. Reboot the phone again. Enter Recovery. Just leave it at the main screen of TWRP.

5. Now we need to push the broken block 4 file onto the phones internal storage.

$ ./adb push ./killp4 /sdcard/killp4

5. Enter ADB shell.

$ ./adb shell

6. Now we backup our current block 4 to internal storage so we can restore it later.

shell> dd if=/dev/block/mmcblk0p4 of=/sdcard/bakp4

7. Then we flash the broken block 4 in its place.

shell> dd if=/sdcard/killp4 of=/dev/block/mmcblk0p4

8. Now we EXIT shell. It is VITALLY IMPORTANT not to reboot the phone yet! You are kinda boned if you do.

shell> exit

9. Grab the backup block 4 from internal storage.

$ ./adb pull /sdcard/bakp4 ./bakp4

10. NOW we reboot.

$ ./adb reboot

*POOF* Your phone is now a brick. Hooray!

It won't even appear to turn on, nor will you have a charging light. This is normal.

11. Let's see if Linux sees the phone.

$ sudo dmesg | grep "qcserial"

You should see "Qualcomm USB modem converter detected" as the last line of the output. If not, you can unplug and replug the USB cable or run...

$ sudo modprobe qcserial

...to reload the driver.

12. Reset the driver, which removes any old block devices associated.

$ sudo modprobe -r qcserial

13. Now create the block device that emmc_recovery needs.

$ sudo mknod /dev/ttyUSB0 c 188 0

14. Emmc_recovery needs to know what disk to write to. An easy way to find this out is to run

$ ./getbrickdrive.sh

Which will tell you if it sees your bricked phone, and also give the proper disk. Mine was /dev/sdc and so I use that in the following instructions. Replace /dev/sdc* with /dev/sdb* or /dev/sdd* or whatever yours is.

15. Now we load the 1.12 HBoot (how exciting!)

$ sudo ./emmc_recover -f ./hboot_1.12.0000_signedbyaa.nb0 -d /dev/sdc12 -c 24576

You can hit enter at all of the prompts here. If it stalls at "Waiting for /dev/sdc12, hold the power button down on your phone for more than 30 seconds, then release it. 10 seconds or less after you do this, emmc_recovery will see your phone and proceed. Flashing Hboot will take several minutes, as it has to load data in ~23K chunks followed by a reset after each.

16. Once that is finished. We have to reset the qcserial driver again.

$ sudo modprobe -r qcserial

17. And then recreate the block device.

$ sudo mknod /dev/ttyUSB0 c 188 0

18. Now we restore our original block 4.

$ sudo ./emmc_recover -f ./bakp4 -d /dev/sdc4 -c 24576

Again, if it hangs, hold your phone's power button for more than 30 seconds then release. This file will flash very quickly (it's only 1K) and once it completes, you'll immediately notice that your chargin light turns back on.

19. Unplug your USB cable and hold the power button to hard reset the phone. In a few seconds you'll be greeted by the familiar HTC screen. Enter bootloader and check out your HBoot version. 1.12!

20. Look for some pandas to feed.

I['m sure someone will boil this process down even further or script it. Hopefully this lets folks willing to brave a Linux shell accomplish this now though.