[Desire HD General] leftcase:
I'm pretty new here but as I documented the process of modding my own phone I thought I'd share it with you. I didn't invent any of these processes and this information is available from many different sources. I've tried to credit any source material that I've used verbatim. I am by no means an expert.

Please reply back with any corrections and I'll be happy to edit the post.

This guide describes how to take a HTC Desire HD (mine was fully patched with OTA updates including Sense 3.0), unlock it and install CyanogenMod onto it. It worked for me but it might not for you. I don't take any responsibility for you turning your phone into a brick!

Pro Tips

Remember, in any steps requiring the phone to be powered off, just give it a minute to make sure that it is properly turned off.

Understand what's happening! If you get what's going on, you've more chance of fixing it if it goes wrong. This process describes how to use HTCs official method to unlock the bootloader. This allows you to change the operating system on the phone. The phone contains a recovery system which we an engineer can boot into to replace the main operating system if it becomes unbootable. We are going to replace this stock recovery system with a modified one which allows us do fiddle about with the phone's internal partitions. Once we have the modified recovery system in place we use it backup the existing phone operating system and replace it with a modified one. We can also use it to restore the original one again if things go wrong.

Read all of the instructions properly first! Don't go off half-****ed!

As far as I'm aware you can't reverse the official HTC bootloader unlock (i.e put your phone back *exactly* as it was) and it may effect your warranty. You have been warned!

Unlock the Bootloader

INFO: You can use the HTCDEV unlock bootloader method from HTC as an 'official' means of unlocking the bootloader. Confused? Check out the official site: http://htcdev.com/bootloader/ I'm not going to describe it step by step here because HTC do that quite well enough themselves.

Quick tip. If when going from one step to another on the HTC website you come to a white screen, that may be because you've been logged out. Just go back to the first page, log in again, then go back to the last step you completed.

Another quick tip. Make sure you properly install everything HTC tells you to. We'll need it all later...

Installing recovery mode

INFO: The stock recovery mode itself is pretty basic and can't do much, so we need to replace it with a custom recovery image.

We're going to use the clockworkmod recovery image which you grab from here: http://dl.dropbox.com/u/4518713/archive/recovery-clockwork-5.0.2.7.111102-j_r0dd_mod-ace.zip (originally seen here: http://xdaforums.com/showthread.php?t=1118865)

Make sure that the fast boot mode on your phone is disabled. You can find this in your power settings menu.

If the phone is connected via a USB cable then unplug it.

Power off the phone using the power button and leave it alone for a minute.

INFO: To flash the new recovery image to the phone, you need to reboot the phone into the bootloader so that you can select a new image to boot. The bootloader is known as HBOOT.

Boot into HBOOT by holding down the 'volume down' button and pressing the power button.

By default FASTBOOT is selected so just press the power button to access it.

Attach the USB cable and note that FASTBOOT changes to FASTBOOT USB

On your PC open cmd prompt and cd to the platform-tools directory of the android sdk. Mine is at C:\Program Files (x86)\Android\android-sdk\platform-tools>

Copy the .img file from the clockworkmod zip file we downloaded earlier to the platform-tools directory. Rename it recovery.img

Go to your command prompt and issue this command:

fastboot flash recovery recovery.img

INFO: The recovery image will then be written to your phone, and as long as everything went well you'll get a message saying OK.

Ensure that BOOTLOADER is selected in the HBOOT menu and press POWER button to select it. Now you're back at the HBOOT menu.

Use the volume buttons to highlight RECOVERY and press the power button to select it. After showing you the HTC logo, the phone should boot into recovery mode!

Backing up your phone

Using the volume buttons to select move to the 'backup and restore' option in the menu. Use power to select and use the backup option. This backs up your current phone setup to the SD card.

Select power off to turn off you phone. Leave it a few secs - select reboot system now.

When your phone is backup and running, mount it in mass storage mode and navigate to the root of your SD card. See the folder called 'clockworkmod'? copy that along with everything in it to your computer and put it somewhere safe. That's your backup. If needs be, you can use this backup your phone back to the original state!

Installing CyanogenMod (other mods may vary)

Mostly taken from http://wiki.cyanogenmod.com/wiki/Nexus_One:_Full_Update_Guide with some extra stuff that messed with me when I tried to do it.

Download the latest version of CyanogenMod from http://download.cyanogenmod.com/?type=stable&device=ace

Download the Google Apps for the device. http://wiki.cyanogenmod.com/wiki/Latest_Version/Google_Apps

Place the CyanogenMod update.zip file on the root of the SD card.

Place the Google Apps .zip on the root of the SD card also.

Boot into the ClockworkMod Recovery.

Once the device boots into the ClockworkMod Recovery, use the side volume buttons to move around, and the power button to select.

Select the option to Wipe data/factory reset.

Then select the option to Wipe cache partition.

And the option to wipe the Dalvik cache

Select Install zip from sdcard.

Select Choose zip from sdcard.

Select the CyanogenMod update.zip.

Select Install zip from sdcard

Select Choose zip from sdcard

Select the Google apps zip

These extra steps seem to have been required by people in this thread. All credit due to marsdta and theluckster for their suggestions. I've edited this guide to include the instructions here where they are more visible.

Once the installation has finished, select Go Back to get back to the main menu, and select the Reboot system now option. The phone should now boot into CyanogenMod.

Now wait for what seems like an incredibly long time with the phone showing the 'htc' screen.

INFO: The phone should now boot into CyanogenMod!

Restoring your phone - When things go wrong

OK, so you flashed a bad mod. Time to restore.

First up, put the backup you made in the previous step onto the root of your SDcard (if it isn't already there). Then, I came across this video which seems to explain things pretty well :)

http://www.youtube.com/watch?v=mUYGe8mmNWU

The basic gist of it is, boot into recovery mode, format the cache, data and system partitions, wipe the Dalvik cache, then restore the backup from your SD card.