Ujanja Ni Uhai (Hustling Is Life)

Building CyanogenMod 7.1 for the Huawei U8150

A few weeks ago I posted instructions for building CyanogenMod 7 for the Huawei U8150. A lot’s changed since then, so I wanted to post updated instructions for building from source. The process is easier now because the U8150 was recently merged to mainline CyanogenMod, so we don’t have to do any finagling.

Assuming you’ve already taken care of installing adb, repo and the dozen or so required system dependencies, all you need to do is…

Grab the source

As of CyanogenMod 7.x this project is about 8 gigabytes, so don’t try this if you’re on a slow/expensive line! By the way, Ice Cream Sandwich will be much bigger, so you might wanna think about getting a faster Internet connection before it comes out. 😉

Extract proprietary files

Some of the drivers/programs for various hardware in the U8150 are not open source, so we have to use Huawei’s pre-compiled libraries to get everything working properly in CyanogenMod.

Make sure your phone is running a stock Huawei Froyo ROM, adb is enabled (Settings -> Applications -> Development -> USB Debugging [✔]), and then plug your phone into the computer and run the extract-files.sh script:

cd device/huawei/u8150
./extract-files.sh

Cook some bacon

cd ~/cyanogenmod
. build/envsetup.sh
brunch cyanogen_u8150-eng

A clean build takes my dual-core Core i7 ThinkPad T420 takes about 40 minutes. When it’s done you should see something like this:

Post navigation

30 thoughts on “Building CyanogenMod 7.1 for the Huawei U8150”

vipi mjanja jst stumbled on ur site n al say its kul. am also using an ideos u8150. I also hv bin experimenting wid ma 4n little by little which led 2 messing up da 4n bt fixing it eventually. byda nyc work on da info.
which rom so far u think is gud apart 4rm CyanogenMod 7? am currently using that.

I think I’m a bit biased… I like the CyanogenMod project. I’ve been helping port CM for a month or so now. We’re making slow progress, but it’s been fun learning about hardware, software, etc… stay tuned.

Damn, that’s confusing. Well, I cloned my repo initially before the kernel.org servers were hacked (kernel.org used to host AOSP), and I know that once the source started moving around people started getting sync errors. I haven’t see anything like that. Have you tried looking on the CyanogenMod forums, or maybe even #cyanogenmod-dev on irc.freenode.net?

Si ndio, it’s on the XDA dev forums. There is a super early beta port. I haven’t tried it because I don’t want to be disappointed… but you can give it a try if you’re brave/curious. There are a couple devs working on it, google something like “ics u8150” or “cm9 u8150” and you’ll find a few threads on XDA.

Hey!
Going through your github acc. and looking at the build configurations for our little charm U8150.
I even downloaded them to have a closer look.
So I was wondering..how does one use that build configuration to come up with a ROM?

Awesome work with the Cyanogen POrt 7.*
BTW..is it an everyday ROM?
Thanks.

Well, the build configuration is part of the larger AOSP project (actually, it’s CyanogenMod in this case). AOSP and CM have a build system which reads the makefiles (such as BoardConfig.mk,Android.mk, and device_u8150.mk, etc) and those dictate how to set up the build environment in order to get the ROM working on a particular device. This can include things like which ARM version the device is, which kernel to use, which settings to override for the device, etc. Other than that, the project is basically a bunch of common code (more or less the same apps/defaults/themes, etc on every CM device).

Yes, it’s an every day ROM. The battery life ain’t great, but everything else is very stable right now. Give it a shot (backup first of course using ClockworkMod Recovery, you can always go back).

Hey, just upgraded to the latest nightly. Didn’t even wipe or restore to factory just hit update from the Gingerman 7 stable. Risky I know but it worked out fine and didn’t loose my settings or data. Awesome work. looking forward to more.

Good afternoon, Alan! First, many thanks for the instructions, I finally got to collect firmware for u8120. But I have a small problem and I do not even know in which direction to dig – this firmware is not working the radio module, ie the phone does not see the network operator. You are not faced with such? I would appreciate any help.

Yeah, I assume you flashed the one from CyanogenMod’s website, most likely 7.2-RC3? That one had a broken video camera. Try a newer build and it will work. FM Radio will never work on Huawei U8150 on CyanogenMod. I don’t know how to make it work. 🙂

Hi Alan,
Awesome work with porting CM to u8150. I’m working with a group that’s now trying to port B2G to the u8150. We’ve managed to build and flash successfully, but we ran into some problems which we think are due to missing drivers.
If you could give us the manifest that you used in order to build for the u8150, it would be of great help to us.
Thanks in advance.

I was wondering whether you might have stripped down the manifest for the u8150. Specifically, I wanted to know which folders under hardware/qcom are required.
We seemed to be getting an error with libgenlock (which wasn’t included in our manifest). We added it, but on trying to compile hardware/qcom/display, we ran into build errors in libcopybit: http://pastebin.mozilla.org/1688721

Also, are the libraries compiled by hardware/msm7k used? We’re a little short on time, so we don’t want to unnecessarily solve build errors if we don’t have to 🙂

Ah, I see. No, I don’t customize the manifest at all. For my CyanogenMod 7 builds I’m using a local copybit in my device tree. We can use CM’s (and my nightly builds do), but it used to cause problems with graphics or video recording (can’t remember).

Thanks for the help 🙂
We’re able to get the audio at least to work now => mp3 playback using stagefright from inside the adb shell 🙂
I guess the other drivers will fall in place one by one, graphics included.

Praveen, is there a community around this b2g effort? It’s really interesting to me… I might want to help, or adapt your approach to other devices (there’s a new U8185 in Kenya and I’ve just started porting CyanogenMod to it).

Sorry for the late reply. (I don’t seem to get an email even though I have “notify me of follow-ups” checked!)
Well, if by ‘community’ you include the whole mozilla community, then yes. The project is in very active development. Looks like it’s mozilla’s next big thing – they have it on the frontpage of their website and what not: http://www.mozilla.org/en-US/
Our approach is extremely crude trial and error – this is our first time trying something like this!

Say, which IRC can I find you on? I think that would be a much better place if we need to request your help again.

Hey, I more meant “community” as in the U8150 community/github/etc, hehe. I know about b2g in general. I’m usually on #cyanogenmod-dev on Freenode most days… on and off, depending on work/personal life stuff.

Hi,
I am working with praveen on the same B2G project. Firstly, an awesome effort on u8150.
We seem to have some problems with the display though. We get a blank screen when the Ideos splash screen goes off. Any help on debugging this problem?
Also, is it possible to emulate the build images, since switching the mobile on and off is a tiresome and time taking task :).

hey Allan, long time…. after your help on how to set up java I have finally compiled it… the initial build was time consuming but the rest take less than a minute!
One problem though…network access does not work(sim-card)… everything else works. where could the problem be? please help. thanks in advance. 🙂