[Desire HD Android Development] AlexDP:
DISCLAIMER: This guide and package are provided as-is. I do not accept any responsibility for damage caused by following the guide or using the programs. This process was used by myself for rooting, unlocking and installing ROMs on my own Telus Desire HD. Please read through the entire guide ahead of time and make sure you understand where all the files in the package are.

Introduction

I noticed there was a good deal of confusion about the forums as to what to do with the Telus Desire HD and whether it was closer to the European DHD or the Inspire 4G. Turns out its closer to the Inspire 4G. jkoljo helped figure out what needed to be done to successfully flash this phone, so don't forget to thank him!

By the way, don't order a SIM unlock code if you need to unlock the phone so you can use it on another network. This procedure allows you to SIM unlock you phone without an unlock code. (Refer to step 22 in Section B.d).

Feel free to let me know if theres anything wrong or missing or if you have any questions.

Enjoy rooting and ROMing!

-AlexDP

-------------------------

Note: All the files needed for this process are included in this package. The folders for each section are located under folders with corresponding names (i.e. the files for Preparation are in the "Preparation" folder).

Download the package here:

-Full version, includes the PD98IMG.zip stock downgrade ROM file.

-Lighter version with no PD98IMG.zip file. You can get the necessary PD98IMG.zip file from here and use it when needed as per the guide.

A. Preparation Notes:

-Install HTC Sync (from the "Step 1 - HTC Sync" folder")

-Set your phone to allow usb debugging by going to Settings->Applications->Development and checking off USB debugging.

-Make sure you have the same SIM card if you've logged into Android Market before.

-Leave your Desire HD plugged in to your PC. Choose Charging only when prompted (unless you need to copy files to your SD, in which case switch to Mount drive).

-At the end of the process, once your all done rooting, save a copy of the following files from your SD card just in case:

hboot_check.nb0

hboot_eng.nb0

part7backup-SomeNumbersHere.img

hboot_original.bin

-Create a Gold Card:

Install GoldCard Helper from the Android Market,

Run it and make note of the value listed after Card:mmc2, Reverse CID. It should be a long series of numbers and letters. (make sure to use mmc2, the default copy to clipboard copies mmc1 ..)

Visit this page (http://psas.revskills.de/?q=goldcard), enter the new copied number and create your goldcard image, which will be e-mailed to you.

Save the file attached in the email to your PC.

Install HxD Hex Editor on your computer, from the "Step 4 - Gold Card" folder.

Run HxD Hex Editor. ("Run as Administrator" under Vista and Windows 7).

Go to the Extra menu and select Open Disk. Under physical disk, select Removable Disk (your microSD card), uncheck Open as Read only and click OK. Note that you should select physical disk NOT the logical disk. This is important!

Go to the Extra menu again and select Open Disk Image. Open the goldcard image that you received by email.

Press OK when prompted for Sector Size (selecting 512 (Hard disks/Floppy disks)) and click OK.

You should now have two tabs - one is your removable disk, the other is your goldcard image.

Click on the goldcard image tab. Go to the Edit menu, choose Select All then select the Edit menu again and select Copy.

Click on the Removable Disk tab. Highlight offset (line) 00000000 to offset (line) 00000170 (including the 00000170 line), then click on the Edit menu and select Paste Write.

Click on the File menu and select Save, accepting the warning.

Your Gold Card SD card is completed.

----

B. Rooting (Do this if you just want to root, or if you want to install a custom rom, do this first):

B.a Downgrade Process

1- Copy the PD98IMG.zip file from the "Step 1 - PD98IMG" folder and put it on the root of your SD card (i.e. not in any folders). Do NOT rename this file.

2- Go to the "Common files" folder and double click Start Here.

3- Copy the files in "Step 3 - Downgrade" to the "Common files" folder.

4- In the new command window that opens, type the following commands (you shouldn't get any errors. hit enter after each):

adb push psneuter /data/local/tmp
adb push misc_version /data/local/tmp
adb shell chmod 777 /data/local/tmp/psneuter
adb shell chmod 777 /data/local/tmp/misc_version
adb shell /data/local/tmp/psneuter
adb shell

NOTE: You should have the "#" sign instead of the "$". If you do, you have temporary root, and can continue on.

/data/local/tmp/misc_version -s 1.31.405.3
exit

Note: If you get an error while running the step before exit, try using 1.31.405.6 instead of .3.

5- Type adb reboot bootloader and hit enter. Your phone will be switched into the white bootloader screen. Wait for the bootloader screen.

6- Hit the power button to select bootloader from the options. It'll automatically find the PD98IMG.zip and start examining it. You'll see a blue progress bar at the top right. Once it finishes it'll ask you to hit volume up if you want to install. Do so. Don't worry if some items are marked "Bypassed" during install.

7- Once its done, it'll ask you to hit the power button to restart. Android should boot up.

8- Set the usb debugging option again. (Refer to Preparation step 2).

B.b Temp Root

Note: As an alternative to this section, you can download and install Visionary on your phone and have it do the temproot, by tapping the Temproot Now option. If you do this, jump straight to section B.d once you're done. If you have trouble doing this, or Visionary shows "rooting" then gets stuck or get a black screen, reboot your phone and follow this section fo the guide.

9- Make sure your SIM card is in when signing in to the Android Market for the next steps, otherwise it'll give you an error saying it can't access the Google server (!?! wtf, btw...)

10- Copy the files from the "Step 10 - Temp Root" folder to the "Common files" folder.

11- Go to the "Common files" folder and double click Start Here.

12- In the new command window that opens, type the following commands (you shouldn't get any errors. hit enter after each):

adb push su /sdcard/su
adb push Superuser.apk /sdcard/Superuser.apk
adb push rage /data/local/tmp/rage
adb push busybox /data/local/tmp/busybox
adb push root /data/local/tmp/root
adb shell chmod 0755 /data/local/tmp/*

13- On the HTC Desire HD, install the Android Terminal Emulator (by Jack Palevich) app from the Android Market.

14- Launch the Terminal Emulator, and run the following command: /data/local/tmp/rage

15- After a minute or so, you will see the following message on the phone Forked #### childs. Press the Menu button & select Reset Term. The Terminal Emulator will exit out.(If you don't see this after a few minutes, something is wrong. Retrace your steps).

16- Launch Terminal Emulator. It will force close. Launch it a second time, and you'll have a root shell (i.e. you'll see a # sign instead of the $ sign in the console).

B.c Permanent Root

Note: It turns out this section (B.c) is actually unnecessary as its taken care of later in the process already. You can safely skip this section and go straight to section B.d.

17- Copy the files from the "Step 17 - Permanent Root" folder to the "Common files" folder.

18- Go to the "Common files" folder and double click Start Here.

19- In the new command window that opens, type the following commands (you shouldn't get any errors. hit enter after each):

adb push gfree /data/local
adb shell chmod 777 /data/local/gfree

20- Launch the Terminal Emulator on your phone and run the following commands:

/data/local/gfree -f
sync
/data/local/tmp/root

NOTE: You may see an error that states mkdir: /system/xbin already exists, if you do, simply ignore and continue on.

sync

21- Wait for this to finish. Once done, restart the HTC Desire HD.

B.d Unlock phone for flashing ROMs and carrier unlocking

Note: The order of these steps has been changed, but the folder names haven't been updated. Please pay good attention to the instructions here.

22- Run Easy Radio Tool (in the "Step 23 - Easy Radio Tool" folder), select the first option (especially if you want to SIM unlock, if not the Radio S-OFF option is sufficient). Follow the directions in the program. Make sure to accept the SuperUser request on the phone when it pops up (keep your phone unlocked so you see it). It may fail at one point and your phone will restart. If it does, thats ok just run it again and it'll finish successfully this time.

23- Run EasyS-OFF (in the "Step 24 - EasyS-OFF" folder) and follow the instructions.

B.e Flash ClockworksMod Recovery

24- Download and run ROM Manager from the Android Market and have it install ClockworksMod Recovery.

24.I If you're not flashing a Gingerbread-based ROM (like CM7), please choose the last option in the list "All ClockworkMod Recoveries" then choose 2.5.1.3.

24.II If your installing a CyanogenMod or any other Gingerbread-based ROM you must have ClockworkMod Recovery 3.0 and above, so just choose the first option in the list, "Flash ClockworkMod Recovery".

If this fails with a message about permissions, it means you haven't rooted correctly, retrace your steps.

----

C. Flashing a new ROM:

1- Download the ROM of your choice (I recommend Android Revolution HD, available here: http://xdaforums.com/showthread.php?t=840040, but feel free to chose any). Copy the zip for the ROM to your SD card. Inside ROM Manager, click Install ROM from SD Card and select the ROM that you put on your SD card. Select wipe data and cache and optionally the backup checkbox. Let it finish installing and rebooting your device.

Note: If you are flashing to a ROM other than a stock Telus ROM (Raidroid Stockify is a stock Telus ROM), you will have to enter your APN settings manually. If you're using your phone on a different network than Telus, you will have to enter your APN settings.

Note:If you want CyanogenMod, it's available inside ROM Manager and you dont need to do this part and you can skip to the very last step. If you want to install CyanogenMod 7 or any Gingerbread-based ROM, you must first update your ClockworkMod Recovery to 3.0 and above. Please note that you can't restore from a backup or install a non-Gingerbread ROM from ClockworkMod Recovery 3.0 and above. If you need to restore from backup or downgrade, install ClockworkMod Recovery 2.5.1.3 (ROM Manager -> All ClockworkMod Recoveries -> 2.5.1.3) then proceed to flash or restore as needed.

2- Copy Telus Kernel.zip to your SD card from the "Step 2 - Telus Kernel" folder.

3- Run Kernel Update Utility (in the "Step 3 - Kernel Update Utility" folder) and click "Select a cwm zip", then click next, then click Go to fastboot, wait for the white bootloader screen on your phone, then click Flash. Once it's done, it'll reboot back into Android.

4- Once that's done click next, wait for the USB connection and USB debugging mode notification.

5- Click flash button in Kernel Update Utility and once that's done click finish.

Your done! Sound works perfectly and so does Wi-Fi!

--------------------------

Guide Credits:

This guide and package was pieced together from various other guides and packages after exploring the various posts and methods on the topic, mostly from Xda-Developers. I've listed them here:

Gold Card Guide: http://www.droid-den.com/android-guides/android-guide-how-to-create-a-gold-card

CyanogenMod Downgrade and Rooting guide: http://wiki.cyanogenmod.com/index.php?title=HTC_Desire_HD:_Full_Update_Guide#Downgrade_to_1.32.405.6

How to downgrade: http://xdaforums.com/showthread.php?t=905003

One click Radio S-OFF tool: http://xdaforums.com/showthread.php?t=857537

One click ENG S-OFF: http://xdaforums.com/showthread.php?t=855403

Desire HD, no sound thread (thanks jkoljo): http://xdaforums.com/showthread.php?t=949909&page=10

Thanks to everyone who wrote those guides and these programs and made it possible for us to flash the Telus Desire HD, specifically jkoljo, who put his own time into it.