[Desire HD Android Development] ivolol:
Desire HD development is now in full swing.

This guide/overview will hopefully show you all about how to customize your Desire HD.

NOTES: If this reference contains any mistakes/needs updates, please PM me. If you would like something added, either PM or include it in a reply.

WARNING: At the time of writing, the newest HTC update (to android 2.2.1) will make your phone unrootable. Do not perform a phone update if you want to be able to follow the majority of this guide!

Follow this guide to downgrade 1.72/1.84 (Android 2.2.1) [if you have updated to it] back to the rootable/moddable 1.32 before following this guide.

Files

A lot of the files and ROMs found here have been kindly mirrored by mousey_ at his site, here. (Getting outdated :( )

Another link to downloads is at http://www.iloveabath.co.uk/

Tools

Alot of these tools might be needed at some stage or another.

Android SDK - gives you tools like adb, used for all pc-based android development

HTC Sync - Has correct USB drivers for the DHD and lets you sync up various data

Fastboot - lets you flash .img's to your phone easily through it's fastboot interface

Flasher^ - lets you flash boot and recovery and create new bootanimation flashes.

QtADB - Useful graphical interface for using adb, also fastboot and recovery

Root

Note: If you just want to fully root your device as easily as possible, you might try this tool by liquidperfection. Check Default, ENG HBOOT and PERM ROOT. This will give you Root, S-OFF and Eng bootloader.

Root means that you can do things on your android that require the root user's access (the super-administrator account on linux). You manage this account by installing SuperUser and su. In the DHD, only having root access does not mean you can do all things usually associated with 'rooting your phone'. Alot of things (such as installing custom ROMs) need S-OFF as well.

NOTE: Custom ROMs are almost always pre-rooted. You will not need to 're-root' after installing a custom ROM.

VISIONary - An exploit app that gives you root.

- Needs USB Debugging on. might need 'Unknown Sources' on to install.

- You only need a temproot to achieve S-OFF (which will give you root thereafter), otherwise you can do a temproot followed by a Permaroot.

- Use it on 1.32 build rom only

PSNeuter - is a script that will let you get root access in 1.32 or 1.72 builds.

Superuser* - The su and Superuser app, for managing root access on your phone. Visionary installs this for you. This is the market link.

S-OFF*

This means Security-Off, which is a flag in the DHD's internal memory that lets you write to protected partitions of it, like /system and all of the boot partitions. Having this effectively gives you 'full' root access and is needed in addition to root for many of the more interesting rooting activities (modding, etc).

There are two ways to achieve S-OFF on your phone:

A) Load the engineering hboot, which makes the phone think it's S-OFF - this is called ENG S-OFF

B) Flip the internal 'switch' in the phone's Radio to S-OFF status. This is called Radio S-OFF

ENG S-OFF is 'softer' than Radio, it can be undone by a software update. You only need ENG S-OFF for updating ROMs. You need both for updating radios.

Radio S-OFF will never need to be redone. It is one of the most permanent changes you can make to your phone. Eng S-OFF can be cleared by a new hboot (i.e from a stock RUU, explained later).

ENG Hboot S-OFF Tool* - installs a new hboot img to your phone, which puts the internal memory card in S-OFF at boot.

- ENG Hboot scripts A guide for doing this is can be found here

- A completely manual guide to achieving S-OFF can be found here.

Radio S-OFF tool* - turns on permanent S-OFF in the radio. Doing this, even the normal bootloader will recognise that the phone is in S-OFF state.

- Using the gfree script, there's a manual way to do it

- Do this on a 1.32 rom only, it will stay thereafter.

root adb boot.img^ - Flashing this boot.img will give adb root permissions without having to ask.

Stock Roms

These are complete stock roms for the DHD, returning it to its original state.

The only thing not touched by these would be a Radio S-OFF.

The Vanilla HTC Stock roms are RUUs which can be run from the PC.

Others have uploaded clockworkmod backups from their phones to have near-perfect copies of Vendor's ROMs. Near-perfect because S-OFF is still required to do the backup.

Use clockworkmod to restore them.

HTC WWE Stock RUUs - (World Wide English), for stock devices. These are RUUs to completely flash the device from the PC.

- If you are having trouble with them not connecting to your phone, try my guide here.

Source of more Roms and 2.36 (Gingerbread) WWE RUU

O2 1.31.207

H3G UK 1.31.771

HTCCN CHS 1.31.1400

O2 1.32.207

HTC Asia 1.32.707

TMO DE 1.39.111

Orange UK 1.40.61

Vodafone AU 1.32.178

Three/Hutchinson AU 1.32.861

HTCCN CHS 1.60.1400

Clockworkmod Recovery^

This recovery.img allows you to do easy backups and restores of ROMs, as well as apply custom, unsigned roms and imgs.

To get to recovery mode on the DHD, power off the device fully (makesure fast booting is off), then when turning on, hold down the power and volume down buttons.

Rom Manager^ - This is a market app that will install the latest ClockWorkMod for you.

- The actual images are available here. The Desire HD is called 'ace'. 2.5.1.3 is most stable for ROMs using 2.2.1 android, 3.0.0.6 and above is most stable for ROMs using 2.3 android.

- flash these to the recovery partition using fastboot, as shown below in the guide

Almost all custom ROMs use this to install. A normal process is:

Backup apps and/or data. Be careful about backing up system data, moving from one ROM to another and restoring it will almost always screw with them.

Download the zip for the ROM, and it's easiest to put it in the root directory of your sdcard.

Restart the phone into recovery mode, to get to clockworkmod.

Perform pleliminary steps: perform a backup first. For wiping a new ROM: Make sure battery is 100%, wipe cache, dalvik cache, battery stats and factory data. (see the tip at the end of Custom Roms section for this)

Choose to install a zip, from sd card. Find the zip you downloaded and install!

Wait patiently for the 1st boot-up, it almost always takes longer.

Custom Roms^

These are customized ROMs from the community, promising different combinations of speed, performance, features and looks over HTC's sense.

The easiest way to install them is through clockworkmod.

Here are some of the most popular ROMs for the DHD at the moment. It is in no way an exhaustive list.

Also see this list.

LeeDroid Froyo - A Customisation of HTC's Sense, with aims of long battery life and reserved improvement. Comes with his own custom kernel.

LeeDroid Gingerbread - Same as above, based on HTC's Gingerbread Sense (leaks).

Android Revolution HD Froyo - Customisation of Sense, with Apache14's kernel. Also aims to improve on all aspects of the ROM while not modifying its look.

Android Revolution HD Gingerbread - Same as above, based on HTC's Gingerbread Sense (leaks).

CoreDroid Froyo & Gingerbread - Customisation of Sense, with the developer's own UI tweaks and enhancement to add a shinier look and feel.

GingerX Gingerbread - Gingerbread Sense customisation with some added UI tweaks as well.

RCMixHD Gingerbread - Another Gingerbread HTC Sense ROM.

RCMixHD Froyo Rotating - Includes the Desire Z's rotating Sense UI.

CyanogenMod 7 - Cyanogen's famous version of Android, released for the DHD.

CyanongenMod Nightlies - Nightly builds of the above.

CleanDHD - Clean, minimal ROM with bases of CM6 and CM7 to keep things fast and let you choose what to install.

MIUI 1.4.x - MrGarak's mostly vanilla version of this Chinese customisation of Android. Has a completely new look and feel. (Don't worry, it's in English).

Ray's MIUI 1.4 - Ray-619's customisation of MIUI.

This thread may be handy for wiping your phone with a zip, before changing from one ROM to another.

Kernels^

Custom kernels for the DHD, hopefully allowing better performance, features or overclocking of the phone.

These are designed for 1.72/1.84 ROMs, or for Cyanogen when stated.

Gingerbread custom kernels will come when HTC release source for that.

Clockworkmod can be used to install some, or fastboot using the zimage partition (plus some additional modules may be required to fix WiFi).

See their thread for details.

SetCPU - (forum link) - Available on the Android Market, this is almost essential to make use of overclocked kernels.

Buzz OC/UV 1.51ghz

Buzz OC/UV 1.22ghz

kAmMa's OC Kernel

LeeDroid's Kernel

LorDMod CM / MIUI Kernel - Warning: do not flash for sense ROMs!

Kali's CM Kernel - Also CM only kernel

Jkoljo's Kernal Flasher - a windows based tool for automagically flashing kernels without the fuss of manual fastboot.

Radios^

Radios contain the firmware for the chipsets in your device that control the phone, gps, wifi, etc. There are many different versions out there.

A better ('ideal') radio will give you better reception while using less battery power.

It is a general consensus by the community that newer radios have generally gotten better from the original that you might have on your phone.

You can flash a radio .img onto your phone by using fastboot, into the radio partition. How to do this is shown below in this thread.

Please be sure to have both Eng and Radio S-OFF before doing so.

Always check the md5 hash of the image you want to flash, to be sure it is a non-corrupt file. (use something like this or this to check an md5 hash)

It is one of the most crucial parts on your phone and you always want to make sure you flash a working one on.

User Drakknar has compiled an excellent, almost exhaustive list of DHD radios in his thread.

It might be helpful to install the RIL profile associated with the radio you install. This helps how android natively communicates with your phones radio. See jkolo's thread here for CWM installable zips.

Otherwise just use the radio that your rom developer recommends.

Guides

Step by Step guide on going from a stock DHD to a rooted, Custom one

On rooting, S-OFF and clockwork

Another on root and S-OFF

S-OFF, the 'manual' (hard) way

Clockworkmod installation for mac users

Guide to installing new radios

Uninstalling system apps with Titanium

Or disabling them through the shell

If you are having trouble installing RUUs

Flashing ROMs through your phone

Editing apk skins

Using fastboot

In order to use this with anything not signed by HTC, you will need S-OFF.

If you follow things carefully, it is not hard to do this properly. Doing things wrong with fastboot, however, is the easiest way to brick your phone.

Download and install HTC Sync to get correct USB drivers.

Download fastboot and put it in a convenient directory ( e.g. C:\desirehd\ or C:\android\, or replace the one in your SDK installation)

Turn off / restart the phone (fully); while it is restarting, hold down POWER and VOLUME DOWN buttons until it boots into the bootloader.

Select the fastboot option, and connect the phone to your PC.

Start a cmd prompt / terminal, and navigate to fastboot's directory.

type fastboot devices, and check that it has one device listed there as your phone in fastboot.

To flash an img, type fastboot flash <partition> <path/to/new.img>

Partitions:

hboot - flash the ENG hboot here to achieve S-OFF

boot - the bootloader

zimage - contains kernel

recovery - used for clockworkmod

radio - the firmware for your phone's radio chip

system - the /system partition

splash1 - contains the splash screen on initial boot

Always make sure the .img you have is the correct one for that partition and is a working/non-corrupt file!

Example for flashing clockworkmod:

Download clockworkmod and unzip the .img so that it is in the same directory as fastboot

Connect/setup up your phone as instructed above

Use a command similar to this: fastboot flash recovery recovery-clockwork-2.5.1.3-ace.img

After it's finished, reboot into your bootloader, choose the recovery option, and you should load into clockwork's recovery!

Useful Apps

These are mostly useful utility / customisation apps, which a high percent of people might have, and/or are to do with this guide.

Most are available on the Android Market.

BusyBox Installer^ - A prerequisite tool for a lot of other apps, providing some useful base linux functionality not present by default on android. (comes preinstalled in a lot of custom ROMs)

Superuser* - used to manage root user rights on other apps (also usually comes preinstalled).

Titanium Backup* - Extremely useful for backing up applications and settings. Will need S-OFF to restore system app backups.

SetCPU* - Allows for overclocking and profiling of the CPU

Typefresh^ - Lets you change Android's default font.

MetaMorph - A meta-app for changing styles and icons in other apps and skins.

Root Explorer* - 'The' root file explorer app. For getting down and dirty with android's file system.

ES File Explorer - IMO, one the best free normal file explorers. Also capable of root access.

AdFree^ - incase you don't like supporting ad-based free apps :)

Terminal Emulator - shell access to your phone. Can make use of root with the su command.

ConnectBot - I think an even better shell and ssh client. Same as above.

FasterFix and GPS Status - allow you to optimise your GPS chip, to get as fast a fix as possible. Set your region with FasterFix and download new A-GPS data with GPS Status.

Links

Useful links:

HTC Source Code

HTC Developer guide - on tools, adb and flashing

MoDaCo Forums - another great android development community

VillainROM forums - and yet another

XDA Desire HD Wiki page