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!
Preparation…
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 adb
, 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…
- Edit
vendor/cyanogen/vendorsetup.sh
to add a lunch “combo” for the U8150:
add_lunch_combo cyanogen_u8150-eng
- Android’s build system uses a “lunch menu” to choose what you want to build. There’s also
brunch
andbreakfast
, 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.
- Edit
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…
- Edit
vendor/cyanogen/products/AndroidProducts.mk
to add the following line:
$(LOCAL_DIR)/cyanogen_u8150.mk \
- 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!
why is the repo so big? and ginger bread on ideos is laggy (for me), so how do I build CyanogenMod for froyo 2.2.2 ?
The repo is so big because Android has a lot of code in it. Also, CyanogenMod supports ~50 devices, each of which has some customization in it (bugs, device-specific features, etc). I don’t know how to build CyanogenMod Froyo (CM6)… I don’t think anyone is interested in CyanogenMod 6 anymore…
Which version of CyanogenMod 7 were you using on your IDEOS? It’s getting better by the day, me and some others are hacking on it quite often, see here (look at the last pages first!): http://forum.xda-developers.com/showthread.php?t=1001132
How did you generate a device tree like this one?
“git clone https://github.com/alanorth/android_device_huawei_u8150.git u8150″
Did you copy the U8220 device folder and rename it?
I keep getting an error when I use a copied folder that a .so file is missing.
Yes, I did essentially that when I started working on the U8150. But you have to do much, much more to get it to actually build.
Which device are you trying to build? The .so error means you’re missing the proprietary libraries which are required for building. You can either use the
extract-files.sh
script to pull them from your phone, or clone this repository to your vendor folder.Hey Alan, this build mode works for any device (like motorola xt300, for example)?
ps: Motorola XT300 has the ‘same’ hw that u8150, the only difference between this devices is the kernel ver.
It won’t “work” out of the box, but it should be easy to port…
Hey Allan, long time no post… so I’ve run into a bit of a problem, after your help on java i was FINALLY able to compile cm7 for the u8150. the problem is although I’ve followed two guides tihs guide and the one found at cyanogen mod http://wiki.cyanogenmod.org/w/Build_for_u8150 (both which have finished successfully), network access via sim card does not seem to work…please help. Thanks in advance.