Building CyanogenMod 7 for the Huawei U8150

Note: this was originally posted on the XDA Developers forum, where it is undergoing active development/testing by several people. I’ve re-posted a version of it here so it can both gain more visibility as well as be a sort of mirror. –Alan, Sept 21, 2011
Note 2: The U8150 was merged into the official CyanogenMod repositories, so the build process is a lot easier now, see: Building CyanogenMod 7.1 for the Huawei U8150. I’ll leave this post unmodified as it is a useful resource for people trying to port CyanogenMod to new devices. –Alan, Nov 1, 2011

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 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/ 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 and breakfast, but they’re all used for other things.
  • Add a makefile for the u8150:
cp vendor/cyanogen/products/ vendor/cyanogen/products/
  • 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/, 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/ to add the following line:
cd device/huawei
git clone 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
  • 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/
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/

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!

7 thoughts on “Building CyanogenMod 7 for the Huawei U8150

  1. 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 ?

    1. 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!):

    1. 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 script to pull them from your phone, or clone this repository to your vendor folder.

  2. 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.

  3. 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 (both which have finished successfully), network access via sim card does not seem to work…please help. Thanks in advance.

Comments are closed.