[NIGHTLY][2.3.7][UPDATED 17/01] CyanogenMod 7.2 for Huawei U8150 [UNNOFFICIAL]

Would you like the text at the top or bottom of the boot animation?

  • Top

    Votes: 105 40.9%
  • Bottom

    Votes: 152 59.1%

  • Total voters
    257
Search This thread

ntnlzr

Senior Member
Mar 9, 2008
1,034
496
Genoa
OnePlus 6T
Google Pixel 7 Pro
Yah, subpsyke looks like he's doing some great work. Basically, I wanted to get the build system up and running so I could actually be in a position to help. I wrote it all down partly for me, but also so that other eager folks could give it a shot. Information wants to be free! Now that I've successfully built everything synced to the latest CM sources, I'm sure I'll get curious about trying to fix some stuff. His device tree on github should be of particular interest (as it was based on tilal's in the first place).


Awesome. Got 8 gigs of bandwidth to spare for the repo cloning? Then you can help me with the hard stuff!

Otherwise, here's the September 21 nightly I compiled lastnight: http://bayfiles.com/file/13Kv/AZ0Kip/update-cm-7.1.0-RC1-U8150-KANG-signed-21092011.zip. I haven't fixed any bugs, merely compiled CM7 with tilal's device tree against newer CM sources. It's using the multi-touch kernel; for some reason the non-multi-touch kernel doesn't boot on my U8150-D, and I've never understood why this happens with CM7 on IDEOS. Hit "thanks" if you download it... I'm curious how many people are still interested in CM7 on U8150.

No pressure to try it... no guarantees either. ;) I'm just glad to have someone else willing to hang around and help!

hi
tnx u for your work i'm going to test it now
 

Hetfield666

Senior Member
Aug 22, 2011
187
21
Smart Watches
@aorth wonderful work.

i have a little problem: i must use headphones due to driving restrictions and time i spend at phone.

so, as your build will be the same of tilal's it won't work

when you'll merge the subpsyke's libaudio change i'll install and test everything i can. of course if you try before you'll save me from backupping and restore a stock rom.
poke me :)

eager to test
 

aorth

Senior Member
Nov 10, 2010
1,122
1,997
Nairobi, Kenya
mjanja.ch
Thanks for the excellent overview of how to integrate a device into the CM sources. I've one request though.

No problem, dude. That's why I did it! Information wants to be free ;)

As we work with repo and git, it would be nice when the steps described by you would be placed in the context of repo/git, so that the issue, patch, fix or whatever you name it, is placed in its own local work branch and results in a commit that can be pushed or for which a pull request can be send to a repository like those of tilal (U8150), psyke83 (U8160) or tas0s (U8120).
It would give a clear example of the workflow required to work together.

Paul

p.s.
Still struggling myself with the workflow, so ...

Aren't we all struggling? git is easy enough, but repo's a whole nother thing. For now my main aim was to get the **** building. As far as I know it's really only tilal and marc who have gotten it to build successfully; I wanted to figure out the process for myself, then share it.

Regarding patches and the git workflow... yes, most of the git work will be in the device tree, which you should indeed fork if you're going to do any serious dev stuff. Then, in the setup walkthrough above, you'd clone your own, instead of tilal's. I've just committed a fix to my device tree repo (the init.rc fix), for example:

https://github.com/alanorth/android...mmit/409cd6b04150661f5ae1dd984e60d7fa1da866be

Now if tilal wants, he can pull mine... or, I'll go do a pull request right now! Done. :)

---------- Post added at 01:41 PM ---------- Previous post was at 12:42 PM ----------

@aorth wonderful work.

i have a little problem: i must use headphones due to driving restrictions and time i spend at phone.

so, as your build will be the same of tilal's it won't work

Good point. I'm not even sure what fixing this will entail... but I'm keen to setup my build environment a bit more and start comparing stuff with subspyke's repo.

I've never actually used headphones on IDEOS, so I really have no idea what's broken :)
 

Hetfield666

Senior Member
Aug 22, 2011
187
21
Smart Watches
i've diffed you git with psykes'

apart binary files, that's a little wifi path difference and few script renamed.
plus of course the kernel....but this is a different thing....and the famous libaudio where i can see 90% are for FM radio and a device lookup (which may affect the routing we need).

just try to plug in the headphones and dial for a call: sound won't be output from headphones but from speakers or nowhere at all.

same for FM Radio: select a station and no sound will be played at all..
 

aorth

Senior Member
Nov 10, 2010
1,122
1,997
Nairobi, Kenya
mjanja.ch
error 7 when i try to install the new nightly!!!!

Oops... the Error 7 is printed in ClockworkMod Recovery?

i've diffed you git with psykes'

apart binary files, that's a little wifi path difference and few script renamed.
plus of course the kernel....but this is a different thing....and the famous libaudio where i can see 90% are for FM radio and a device lookup (which may affect the routing we need).

just try to plug in the headphones and dial for a call: sound won't be output from headphones but from speakers or nowhere at all.

Alright, I'll test it when I find some headphones around here... Edit: I see, headphones work for music, but not for the phone application. Strange! I'll try to look at subpsyke's repo tonight.
 
Last edited:

Hetfield666

Senior Member
Aug 22, 2011
187
21
Smart Watches
are you using the stock headphones shipped with ideos?

generally that's a problem that after trying to call (and this fails as you've seen) headphones won't even play music and you need to reboot.

what about power draining? last v7 was good, nightly terrible.
 

aorth

Senior Member
Nov 10, 2010
1,122
1,997
Nairobi, Kenya
mjanja.ch
are you using the stock headphones shipped with ideos?

generally that's a problem that after trying to call (and this fails as you've seen) headphones won't even play music and you need to reboot.

what about power draining? last v7 was good, nightly terrible.

Yeah, they were iPod headphones. Plugging and replugging seems to have worked for the stock Android music player, even after a phone call (though the phone call, like you said, didn't route through the headaphones). I'll try with my Huawei headphones when I get home.

yes!in clockworkmod recovery

Ok, we can try to fix it I guess. Did it erase everything before it attempted to flash? If not, go do a nandroid backup right now. Which is the last revision of CM7 you were on, v7 or the last tilal nightly?
 

iliaskone

Senior Member
Nov 23, 2009
167
15
nafplio
Originally Posted by iliaskone
yes!in clockworkmod recovery
Ok, we can try to fix it I guess. Did it erase everything before it attempted to flash? If not, go do a nandroid backup right now. Which is the last revision of CM7 you were on, v7 or the last tilal nightly?

i did a nandroid restore the v7 because i was on a fusion for a while,i did a reboot and then i went back to recovery and i flashed the latest nightly....and error 7.i will try again for a clean install,first the v7 and then without wipe the nightly.
thanks in advance
 

aorth

Senior Member
Nov 10, 2010
1,122
1,997
Nairobi, Kenya
mjanja.ch
Do an advanced restore

i did a nandroid restore the v7 because i was on a fusion for a while,i did a reboot and then i went back to recovery and i flashed the latest nightly....and error 7.i will try again for a clean install,first the v7 and then without wipe the nightly.

If you've got a nandroid backup from a previous CM7, then what I'd do is wipe, install my nightly, and then restore just the data partition from your previous nandroid ("backup and restore -> Advanced restore" in CWM recovery).

When I tested the nightly last night I was coming from a Froyo stock ROM...
 

iliaskone

Senior Member
Nov 23, 2009
167
15
nafplio
If you've got a nandroid backup from a previous CM7, then what I'd do is wipe, install my nightly, and then restore just the data partition from your previous nandroid ("backup and restore -> Advanced restore" in CWM recovery).

When I tested the nightly last night I was coming from a Froyo stock ROM...

ok now.i am testing your rom.i have a strange issue.i think it is not from the rom but if someone can help...
i have no usb or charger connected to my phone but the led is on and on the screen shows that my phone is charging!!!and of course the battery drain very fast.i tried take of the battery make a reboot but nothing!!!
 

tas0s

Senior Member
Dec 29, 2010
183
142
Athens
As for subspyke's libaudio, I have tried a modified version (I had just remove the fm related things) and in my test build the headphones were working as expected (u8120).Tomorrow I will make a commit in my repo(Im waiting for joilarois recheck ).
 
  • Like
Reactions: aorth

psyke83

Inactive Recognized Developer
Mar 29, 2011
1,267
3,959
As for subspyke's libaudio, I have tried a modified version (I had just remove the fm related things) and in my test build the headphones were working as expected (u8120).Tomorrow I will make a commit in my repo(Im waiting for joilarois recheck ).

Good to know. I would also recommend that you try the FM code too. Setting the FM volume via the F8 register seems to work on most Broadcom chips (even the BCM204x on my Samsung I5500).

---------- Post added at 09:12 PM ---------- Previous post was at 08:52 PM ----------

aoth,

Nice work with the compile instructions. Some small notes:

  • When you want to build a .zip package, "mka bacon" is better, as it does optimizations such as zipaligning.
  • Add "gps.ideos" to line 30 of your device_u8150.mk file.
  • You could probably add "lights.msm7k" to line 31, right after "gps.ideos". That will install the generic msm7k lights driver, but you should verify that your screen brightness etc. works.
  • Are you missing the gralloc.msm7k file in /system/lib/hw? Judging from your device file it should be missing, but that doesn't make sense, as your phone shouldn't start properly without it. Anyway, the open-source gralloc generally works on the U8160, but it prevents the camera/video codecs from working. That's why I use the stock ROM's version:
Code:
# Hardware drivers
PRODUCT_COPY_FILES += \
    vendor/huawei/u8160/proprietary/lib/hw/gralloc.msm7k.so:system/lib/hw/gralloc.msm7k.so

  • I'm fairly sure you could replace the whole libaudio folder with my version (apart from msm_audio*.h - copy the versions from your kernel). That should get the FM radio working.
  • To activate USB tethering, you need to change these components:
    • patch your kernel with this code.
    • edit overlay/frameworks/base/core/res/res/values/config.xml and make sure that "usb\\d" is added to the "config_tether_usb_regexs" section.
    • edit BoardConfig.mk and add:
    • Code:
      BOARD_CUSTOM_USB_CONTROLLER := ../../device/huawei/u8150/UsbController.cpp
    • copy my UsbController.cpp code. I don't think it needs to be modified (the USB strings seem to be used by many Huawei phones), but you can verify that by checking what USB identifier your kernel uses in untethered (mine is 1038) vs tethered (mine is 1039) states.
  • To fix the CPU frequency/governor selection in CMParts, use this kernel patch.
 
Last edited:
  • Like
Reactions: aorth

tas0s

Senior Member
Dec 29, 2010
183
142
Athens
Good to know. I would also recommend that you try the FM code too. Setting the FM volume via the F8 register seems to work on most Broadcom chips (even the BCM204x on my Samsung I5500).

I have to made some research about fm chip in u8120 because I think that it is different from u8150 and u8160.
(Off topic: at last all (well 1-2 missing but ok) the huawei ports devs in one thread!:):))
 

psyke83

Inactive Recognized Developer
Mar 29, 2011
1,267
3,959
I have to made some research about fm chip in u8120 because I think that it is different from u8150 and u8160.
(Off topic: at last all (well 1-2 missing but ok) the huawei ports devs in one thread!:):))

Yay ;)

What chip does the U8120 use? Also, what wifi driver?

Another question: your thread indicates that Bluetooth works on your port, but does it really work properly? I thought that I got Bluetooth working on my phone at first - the hciattach service could bring up the HCI device, and the Bluetooth stack would load with the icon displaying properly. However, when I tried to actually pair or search for BT devices, the system would crash. I discovered that the CM7 version of brcm_patchram_plus wasn't working correctly, so I just used the stock ROM's binary (with the patchram file in /system/etc/bluetooth/ on the stock ROM). You may want to try this too.

Even if the chip is different, give the code a try. I see that you're using the same kernel as me, so the sound endpoints for the FM speaker and headset should be correct. I've confirmed that the F8 register can control volume on BCM204x and BCM40xx chips at the very least, so if your Bluetooth chip is Broadcom, and Bluetooth actually works properly on your port (see the last paragraph), there's a good chance it could work.
 
Last edited:
  • Like
Reactions: poruid

aorth

Senior Member
Nov 10, 2010
1,122
1,997
Nairobi, Kenya
mjanja.ch
Audio fixed on the U8150 ;)

I have to made some research about fm chip in u8120 because I think that it is different from u8150 and u8160.
(Off topic: at last all (well 1-2 missing but ok) the huawei ports devs in one thread!:):))

I was just thinking the same thing. Good thing we're all on the same side of the planet!

  • When you want to build a .zip package, "mka bacon" is better, as it does optimizations such as zipaligning.
  • Add "gps.ideos" to line 30 of your device_u8150.mk file.
  • You could probably add "lights.msm7k" to line 31, right after "gps.ideos". That will install the generic msm7k lights driver, but you should verify that your screen brightness etc. works.
  • Are you missing the gralloc.msm7k file in /system/lib/hw? Judging from your device file it should be missing, but that doesn't make sense, as your phone shouldn't start properly without it. Anyway, the open-source gralloc generally works on the U8160, but it prevents the camera/video codecs from working. That's why I use the stock ROM's version:
Code:
# Hardware drivers
PRODUCT_COPY_FILES += \
    vendor/huawei/u8160/proprietary/lib/hw/gralloc.msm7k.so:system/lib/hw/gralloc.msm7k.so
I'll check it out later. Thanks for the tip about making bacon ;).

I'm fairly sure you could replace the whole libaudio folder with my version (apart from msm_audio*.h - copy the versions from your kernel). That should get the FM radio working.
Man, it's working. I just copied all your libaudio stuff verbatim into my device tree. Audio is now working in the head phones ;). I guess people have been waiting for this for a long time! Also, I checked and the msm_audio* headers in your libaudio are the exact same as the ones in our U8150 kernel. Go figure.

Did you hear me, people?! Headphone audio appears to be fixed! I just plugged and unplugged my headphones several times, pressed some numbers in the dialer, made a call, and then went back to music. All in the headphones ;)
 
Last edited:
  • Like
Reactions: poruid

tas0s

Senior Member
Dec 29, 2010
183
142
Athens
Yay ;)

What chip does the U8120 use? Also, what wifi driver?

Another question: your thread indicates that Bluetooth works on your port, but does it really work properly? I thought that I got Bluetooth working on my phone at first - the hciattach service could bring up the HCI device, and the Bluetooth stack would load with the icon displaying properly. However, when I tried to actually pair or search for BT devices, the system would crash. I discovered that the CM7 version of brcm_patchram_plus wasn't working correctly, so I just used the stock ROM's binary (with the patchram file in /system/etc/bluetooth/ on the stock ROM). You may want to try this too.

Even if the chip is different, give the code a try. I see that you're using the same kernel as me, so the sound endpoints for the FM speaker and headset should be correct. I've confirmed that the F8 register can control volume on BCM204x and BCM40xx chips at the very least, so if your Bluetooth chip is Broadcom, and Bluetooth actually works properly on your port (see the last paragraph), there's a good chance it could work.

The wifi driver is ar6000.As for fm chip to be honest I dont know.I havent look to much into this.
I will check asap the bluetooth because you gave me food for thought.Thanx!
 

psyke83

Inactive Recognized Developer
Mar 29, 2011
1,267
3,959
Did you hear me, people?! Headphone audio appears to be fixed! I just plugged and unplugged my headphones several times, pressed some numbers in the dialer, made a call, and then went back to music. All in the headphones ;)

Just to confirm: the FM radio also works? :)

FM seeking won't work, but there's code on Gerrit that I've confirmed works (as of patch set #5, at least): http://review.cyanogenmod.com/#change,6157
 

Top Liked Posts

  • There are no posts matching your filters.
  • 102
    This thread has been depreciated.

    Please go to http://xdaforums.com/showthread.php?t=1456890 for the latest info and nightlies.
    50

    Accomplishments:
    -Overclocked Kernel by tilal6991
    -Stripped FROYO rom
    -Booting Gingerbread rom / AOSP & CYANOGEN

    Dev Teams Rom V2 FROYO
    Newer base! ;)
    Please Update Git
    Ripped (So GAPPS package will be an option)

    Change Log
    *ROOT
    *Rom Manager, File Manager, ADW launcher
    *Newer base from march
    *Nexus bootscreen

    Removed
    *GAPPS
    *Launcher2
    17
    All the changelogs and known issues are now at our new blog here!!!!!!!
    10
    December 5th nightly (CyanogenMod 7.2)

    Here's a new nightly, up to date with latest upstream CyanogenMod sources as of December 5, 2011. Also, I'm testing new libs in this build and I'd appreciate feedback. n00bs need not apply.

    What's new/fixed:
    • Mounting the SD card over USB
    • Overclocking
    • Barcode Scanner works (using tilal's fix, of course)
    • ROM Manager 4.8.0.6
    • Kernel Supports ext3/ext4 (should fix link2sd problems)
    • I bet nobody read this, and will ask a million times if it supports overclocking... :)
    What's not fixed:
    • Camera still takes 2 megapixel pictures. This appears to be the maximum the U8150 camera hardware supports, information about the U8150's camera sensor. I can't explain why the stock firmware takes 3mp pictures, but it appears they're upscaling them, not taking "true" 3mp.
    • Audio is still distorted when it is very loud.

    How to flash*:
    1. Flash ClockworkMod Recovery 5.0.2.7 (instructions). UltraJack won't work.
    2. Do a nandroid backup from ClockworkMod Recovery
    3. Wipe data/factory reset
    4. Flash update from sdcard
    5. Full reboot!
    6. Flash Google Apps from ClockworkMod Recovery (optional)

    Download ROM: update-cm-7.2.0-RC0-U8150-KANG-signed-dec5.zip (md5sum: 245615517569263c37364b0460425e6d)
    ClockworkMod Recovery: clockworkmod_5.0.2.7_u8150.img (md5sum: c59673d5aa926d94227857e51fbe9e2c)
    Google Apps: gapps-gb-20110828-signed.zip (md5sum: 1647897d8ac3efb04723d2ad2c361a3f)

    *failure to follow instructions has been shown to result in baldness in both men AND women. Flash at your own risk. It is your own responsibility to backup your applications, settings, phone numbers, etc.

    Feedback:
    Beta testers should look out (and provide feedback) for:
    • I switched to CyanogenMod's libril, liblights, libcopybit rather than using local versions in our device tree. The reasoning was that if the local ones work as well as the CM ones, there is no need to complicate our device tree just because "it works." CyanogenMod's maintainers maintain/update the CM hardware libs, so we'll let them do it.
    • Audio. I switched to psyke83's libaudio. We are already using a local libaudio override in our device tree, but right now we're using one from tas0s U8120 build. From speaking to psyke I learned that his code is newer, and contains fixes from the CodeAurora Forum. We had tried his code before but it didn't compile because of an error in the FM-related ifdef logic. We fixed the compile bug last night and the audio seems to work no less better than the U8120 audio.

    Have fun!
    7
    January 17, 2012 Nightly

    Alon can you please post a newer build of cm 7 which incorporates light sensor.

    Thank you

    Yep, I tried to post one yesterday but XDA was down to show their disapproval of controversial Internet censorship legislation in the USA. I posted the download link on Twitter, so a few lucky people saw it. ;)

    Here you go: update-cm-7.2-nightly-Jan17-u8150.zip (md5sum: 9a608be48402fd3d26c534fdb1597296)

    It has the "working" auto brightness, a new kernel with a kernel panic fix, some touchscreen fixes, and dithering on by default (a bit nicer colors, especially grays).

    Cheers!