Originally posted at https://lazybottom.blogspot.com/2009/08/tackling-androids-donut-branch.html on 2009-08-04.
# Tackling Android's Donut Branch
I know I should be updating [the graph visualization project](http://lazybottom.blogspot.com/2009/07/usable-ui.html), but I just wasn't in the mood these days, so after getting a new layer of screen protector for my G1/Dream/ADP, I went on checking out [Android's master git branch](http://android.git.kernel.org/), which has seen some merges from the Donut branch.
The checkout process went on for a whole night on my sloppy "high-speed internet" connection, and grabbed a few (less than 3)*Note to self: next time settle for single-core compilation, it's faster*.
Now that I have a working *adb* tool, I can get some proprietary blobs from my phone:
```sh
zsol@silithus:~/android$ cd mydroid
zsol@silithus:~/android/mydroid$ . build/envsetup.sh
zsol@silithus:~/android/mydroid$ cd vendor/htc/dream-open/
zsol@silithus:~/android/mydroid/vendor/htc/dream-open$ ./extract-files.sh
[... output snipped off ...]
```
Now to configure the build for my G1:
```sh
zsol@silithus:~/android/mydroid/vendor/htc/dream-open$ lunch htc_dream-eng
============================================
PLATFORM_VERSION_CODENAME=Donut
PLATFORM_VERSION=Donut
TARGET_PRODUCT=htc_dream
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=Donut
============================================
```
That looks pretty promising, doesn't it.
While building I noticed something interesting with my xterm:
![[utfterm.png]]
That's right, it supports UTF-8 properly. Take that, urxvt!
After some 20ish minutes of compiling, the process is halted with some error messages missing "camera.h", "camframe.h", "jpeg_encoder.h", and the like. A quick search leads me to [this thread](http://groups.google.com/group/android-platform/browse_thread/thread/3f2928072b3d3617). The funny thing is, the solution was not posted when I found it, only now that I rechecked the link. So this is what I did:
- patch the mentioned change with: `repo download platform/vendor/htc/dream-open 10981/1`
- hack `hardware/msm7k/libcamera2/Android.mk` and change the "true" value on the first line to "false"
- run `make` again
So it turns out my phone is missing /system/lib/libspeech.so (which is some proprietary library built and supplied by the vendor). I was told it should be included in the 150275 build, so now after downloading it, I copied over the corresponding file to `$HOME/android/mydroid/vendor/htc/dream-open/proprietary/`. Now it's building.