In order to help move along the CyanogenMod 7 port for Huawei U8150, I decided to try to get it built using some of the existing work of a few devs over at the XDA Developers forum. I figured that if I could help, it would bring the port along faster. Here is my attempt to submerse myself in git, bash, and bacon to see if I have what it takes to be any help!
You need to set up your computer so it can build Android. It’s too much to write here, so see, for example, the Galaxy S page on the CyanogenMod wiki. Pay specific attention to getting
repo, installing necessary OS packages with
apt-get and cloning/initializing the actual repository. It’s ~8 gigs, so don’t try this on dialup! Not for the faint of heart…
Here we go…
vendor/cyanogen/vendorsetup.shto add a lunch “combo” for the U8150:
- Android’s build system uses a “lunch menu” to choose what you want to build. There’s also
breakfast, but they’re all used for other things.
- Add a makefile for the u8150:
cp vendor/cyanogen/products/cyanogen_u8220.mk vendor/cyanogen/products/cyanogen_u8150.mk
- I used the makefile for the Huawei U8220 because it’s a Huawei… not sure how much this will help us but I figure the closer to the U8150 the better.
vendor/cyanogen/products/cyanogen_u8150.mk, replacing occurances of “u8220” with “u8150” (pay attention to case!).
- Use common sense. Basically, tailor the new makefile to be U8150 specific. Pay specific attention to the paths to makefiles and such, as they need more intelligence than just a search/replace…
vendor/cyanogen/products/AndroidProducts.mkto add the following line:
- This tells the build system where to find the device’s makefile.
- Check out a copy of my U8150 Android device tree:
cd device/huawei git clone https://github.com/alanorth/android_device_huawei_u8150.git u8150
- If you fancy, you can even fork my repo and then clone your own. All U8150-specific stuff will go in here, so if you find yourself getting into it and hacking quite a bit, I’d recommend forking it.
- Copy proprietary files:
Make sure your phone is plugged in, adb is working, and you’re running a stock Huawei ROM.
cd u8150 ./extract-files.sh
- This grabs a handful of pre-compiled proprietary drivers and libraries from your device so CM can use them.
- Set up the build environment:
. build/envsetup.sh brunch cyanogen_u8150-eng
Text will fly by for like three hours, and then (if you’re lucky) you’ll see something like this:
Optimizing MediaProvider.apk... Optimizing Provision.apk... Optimizing Calendar.apk... Optimizing ApplicationsProvider.apk... Zipping package... Signing package... Cleaning up... Package complete: /home/aorth/android/system/out/target/product/u8150/update-cm-7.1.0-RC1-U8150-KANG-signed.zip eb70f8eb8aace20f9133e2c38c62ae22 update-cm-7.1.0-RC1-U8150-KANG-signed.zip
If you’re feeling brave you can reboot into ClockworkMod Recovery and flash that puppy… hopefully all your hard work paid off:
Hopefully this will help some other devs get involved… we need help! Adios!