This is for a build in ~/work/android/system rather than the usually quoted ~/android/system.
Start off in the usual way…
sudo apt-get install gcc-multilib<br></br>
sudo apt-get install bison flex schedtool<br></br>
cd work<br></br>
mkdir bin<br></br>
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > bin/repo<br></br>
chmod a+x bin/repo<br></br>
mkdir android/system<br></br>
cd android/system/<br></br>
repo init -u git://github.com/CyanogenMod/android.git -b ics<br></br>```
Before starting the long first sync, we need to add some extra repositories to the build as presently the Desire HD isn’t included “out of the box”.
Create a file, .repo/local_manifest.xml with the following contents
<project name="CyanogenMod/android_device_htc_ace"
path="device/htc/ace" remote="github" />
<project name="CyanogenMod/android_device_htc_common"
path="device/htc/common"
revision="refs/heads/gingerbread"/>
<project name="CyanogenMod/android_device_htc_msm7x30-common"
path="device/htc/msm7x30-common" remote="github" />
<project name="koush/proprietary_vendor_htc"
path="vendor/htc" />
```
Next step is to start the initial sync, then go do something else for a few hours while it grabs a lot of code for you…
repo sync -j16<br></br>
Now we need to get some prebuilt files from the CyanogenMod Project.
cd vendor/cm/<br></br>
./get-prebuilts<br></br>
cd ../..```
At this point the codebase will build but will not boot. To fix this, you need to edit the file device/htc/ace/media_profiles.xml as follows. [Patch submitted here [http://review.cyanogenmod.com/13069](http://review.cyanogenmod.com/13069))].
Insert @ line 77:
``
Change line 250 from
` maxOutputFrameHeight="720"/><br></br>`to
` maxOutputFrameHeight="720" maxPrefetchYUVFrames="10"/><br></br>`
Once all that has been done you can start building!
. build/envsetup.sh
brunch ace
```
It will take a while, so sit back and wait…
**NB
The build results in a ROM that runs and is stable enough for everyday use, but there is no camera support! Neither picture nor video work in the current build 🙁
**