Build Configuration for the T-Mobile MyTouch

MyTouchWhite

The HTC Dream is the only supported Android development device. But, it is possible to do development on other devices, by cannibalizing the various drivers that you can find on them. This usually involves modifying/repacking an official update.zip. However, with a little work, it is possible to use the Android build system to create legitimate fastboot images!

After following the instructions to retrieve the MyTouch build configuration and extracting the proprietary bits from a running device, you can do the following to build images for the MyTouch:

. build/envsetup.sh
lunch htc_mytouch-eng
make

There is also a mkupdatezip script available in the Downloads section of the repository to assist in creating update.zip files as well!

The images will then be found in out/target/product/mytouch-open. A build configuration for the Magic will be coming soon! (It is the same board as the MyTouch, a Sapphire, but different enough to need a separate config.)

Note:

The general process in creating this board makefile was basically the following:

  1. Start with the Dream build config (dream-open).
  2. Extract the kernel from a running device and replace it.
  3. Modify the extract-files.sh script to adb pull the correct proprietary files.
  4. Modify the .mk files to reference the proper proprietary files.
  5. Grab the wlan.ko off the device and replace the one at the repository root.

11 comments:

Unknown said...

Hi,
great guide, i manged to build the *.img with it
but, i want to create update.zip file with that and i can't find anywhere the "mkupdatezip" (and the "gen-update-script").

can you please help me?
Thx!

Koush said...

In the MyTouch github repository, check the "Downloads" section for the scripts. Make sure BOTH are in your path. I'll be adding another github repository to handle those scripts (and Android forking in general).

Unknown said...

:thumbs up:!!!!!
this is great :)
"and so it begins" - now i can really have fun with my android

THANK YOU!

Unknown said...

1 last thing:
how do i make the builds open for 'root'?

realGirish said...

Hi

First, thanks for all this useful info.

mkupdatecript gives the following error:
Unable to access jarfile [...]/kiha/signapk.jar. Missing jar file? Is this jar file same as this one: [...]/out/host/darwin-x86/framework/signapk.jar?

realGirish said...

I am getting the following error when I tried to flash the new update.zip:
Installing update...
E: Bad data length 0
E: Can't read update script
Installation aborted

any ideas?
(I checked out the cupcake branch and built it for mytouch. I am using cyanogen recovery tool to flash update.zip)

Koush said...

Hi ambient morality: I figured out how to build update.zip files without my scripts.

Just type:

TARGET_NO_RADIOIMAGE=true make otapackage

Koush said...

I'll update my README accordingly in a bit.

Shawn said...

Just one error encountered.

make: *** No rule to make target `vendor/htc/mytouch-open/proprietary/AudioPreProcess.csv', needed by `out/target/product/mytouch-open/system/etc/AudioPreProcess.csv'. Stop.

Solved by:

adb pull /system/etc/AudioPreProcess.csv proprietary/AudioPreProcess.csv

Now what about the google apps that are distributed with the phone (i.e. Gmail) but aren't in the Git source?

By the way, dmanbuhnik, the rooted version I have now is reported to have only two differences:

1) added /system/bin/su
2) changed “ro.secure=0″ from 1 in the boot.img build properties

Still, a rooted phone will keep you out of the paid app market. I don't want this one rooted that's why I want to build in a Japanese IME. Thanks Koush! Now I can write my friends and use apps from the market (assuming I can figure out how to get the IME into the build. I did via adb before so know what to do but...)

realGirish said...

Hi Koushik
The build system does not create userdata.img, it creates boot.img and system.img though. Any idea why this is so? (When I build for the emulator/generic it creates all three images!) Thanks.

Shawn said...

Hey Koush,

Have you seen this on the android list:

"I've checked in configuration files that allows to build AOSP for sapphire (i.e. the Google I/O device).

The build steps are essentially the same as building for dream, with
one notable exception: AudioPara4.csv can't be read from the device
and needs to be manually extracted from the ota package itself (i.e.
currently signed-google_ion-ota-14721.zip). I'll switch to extracting
files from the zip instead of using adb pull to get them from the
device, but I'm not going to have time to it this week and I figured
people would want to play around during the week-end.

Enjoy,
JBQ"

Thought it might save you some work