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

mkdir ~/cyanogenmod
cd ~/cyanogenmod
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j16

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:

[...]
Optimizing Stk.apk...
Zipping package...
Signing package...
Cleaning up...

Package complete: /home/aorth/android/system/out/target/product/u8150/update-cm-7.1.0-U8150-KANG-signed.zip
21a4ffca4c352ff5998f2ea0e99ae2ea  update-cm-7.1.0-U8150-KANG-signed.zip

Leave a comment if you need help. Adios, muchachos!

30 thoughts on “Building CyanogenMod 7.1 for the Huawei U8150

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

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

  2. Hi,
    I tried this out, followed http://wiki.cyanogenmod.com/wiki/Building_Kernel_from_source#Setup_Repo

    an set up repo, but on running the command

    repo init -u http://github.com/CyanogenMod/android.git -b gingerbread

    i get:
    Get https://android.googlesource.com/tools/repo
    error: The requested URL returned error: 403
    error: The requested URL returned error: 403
    error: The requested URL returned error: 403

    fatal: branch ‘stable’ has not been signed

    no idea where to now.

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

    1. Ok, I guess I actually connect straight to this Freenode server in Australia: roddenberry.freenode.net, as I do have problems with the round-robin DNS names from time to time.

      BTW, I think you need to edit your repo script to point to another repo mirror (I use the github mirror). See mine here, line 5 specifically… http://pastebin.com/c0QVHXCQ

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

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

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

  4. I have synced repo now running ./extract-files.sh gives

    chmod: cannot access `../../../vendor/huawei/u8150/proprietary/bin/*’: No such file or directory

    1. Hmmm, what do you see if you list that directory? Here’s mine:

      $ ls -l ../../../vendor/huawei/u8150/proprietary/bin/
      total 284
      -rwxr-xr-x 1 aorth aorth 136616 2011-11-13 15:35 akmd2
      -rwxr-xr-x 1 aorth aorth  97148 2011-11-13 15:35 hci_qcomm_init
      -rwxrwxr-x 1 aorth aorth   5524 2011-11-13 21:26 load_oemlogo
      -rwxr-xr-x 1 aorth aorth   5596 2011-11-11 23:11 modempre
      -rwxr-xr-x 1 aorth aorth   5584 2011-11-11 23:11 oem_rpc_svc
      -rwxr-xr-x 1 aorth aorth  19212 2011-11-13 15:35 qmuxd
      -rwxr-xr-x 1 aorth aorth   5616 2011-11-13 15:35 rild
  5. 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.

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

  7. i recently installed cm7 on my u8150 but the camcorder and fm radio dnt work any way to fix this ?

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

      Also, XDA Developers is a much better place to discuss this. Here’s the CM7 U8150 thread: http://forum.xda-developers.com/showthread.php?t=1456890

  8. hi, I’m new at this, but I read somewhere a custom rom such as this improves a phone’s performance. true?
    how do I go about installing it, coz I haven’t the foggiest idea how.

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

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

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

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

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

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

        5. No, I think we’re pretty much the first people trying to port it onto the U8150. But I do remember seeing people trying to port it onto some other platforms (can’t remember which ones now…)

  10. 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 :).

  11. 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. 🙂

Comments are closed.