yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] aorth:
No problem, dude. That's why I did it! Information wants to be free ;)

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

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 :)
[Android Software/Hacking General [Developers Only]] iliaskone:
error 7 when i try to install the new nightly!!!!
[Android Software/Hacking General [Developers Only]] Hetfield666:
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..
[Android Software/Hacking General [Developers Only]] aorth:
Oops... the Error 7 is printed in ClockworkMod Recovery?

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.
[Android Software/Hacking General [Developers Only]] Hetfield666:
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.
[Android Software/Hacking General [Developers Only]] iliaskone:
yes!in clockworkmod recovery
[Android Software/Hacking General [Developers Only]] aorth:
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.

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?
[Android Software/Hacking General [Developers Only]] iliaskone:
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
[Android Software/Hacking General [Developers Only]] aorth:
Do an advanced restore

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...
[Android Software/Hacking General [Developers Only]] iliaskone:
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!!!
[Android Software/Hacking General [Developers Only]] tas0s:
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 ).
[Android Software/Hacking General [Developers Only]] psyke83:
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:

# 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:

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.
[Android Software/Hacking General [Developers Only]] tas0s:
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!:):))
[Android Software/Hacking General [Developers Only]] psyke83:
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.
[Android Software/Hacking General [Developers Only]] aorth:
Audio fixed on the U8150 ;)

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

I'll check it out later. Thanks for the tip about making bacon ;).

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 ;)
[Android Software/Hacking General [Developers Only]] tas0s:
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!
[Android Software/Hacking General [Developers Only]] psyke83:
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
[Android Software/Hacking General [Developers Only]] aorth:
Not sure, I don't see the FM Radio app and I went to bed right after I got audio working last night. I see your makefile inherits some CM radio stuff... does the build system include the FM Radio app conditionally based on whether the device says it supports it?
[Android Software/Hacking General [Developers Only]] aorth:
Download for fixed audio build

U8150 testers, get your nandroid backups ready... Here's the latest nightly with audio routing fixed: update-cm-7.1.0-RC1-U8150-KANG-signed-sept21-2.zip. It's the same as the one I posted yesterday, but headphone audio is working.

Edit: does anyone know which kernel sources tilal was using? It appears there are some tweaks needed to get the Froyo sources working on CM7. mine boots, but it's clearly missing some stuff as touch is broken, etc. Cheers.
[Android Software/Hacking General [Developers Only]] Hetfield666:
aorth!!!!!!!!!!! great man!

i insist saying you and subpsyke should merge projects and using conditionals in Makefiles to build 8150 and 8160...libaudio shows how devices are similar.

plus, probably u8160 kernel will totally work on ideos too.

benefit is an update on a phone (for istance a new CM patch) will go to both without issues.

anyhow, wonderful job. is wifi working too? guess so.

what you mean with the kernel problem with touch?

did u include tilal's kernel in the nightly build not yours?

thanks again, i'll test asap, tonight if i'll get home not too late

---------- Post added at 10:00 AM ---------- Previous post was at 09:54 AM ----------

aorth i forgot to ask: what about AudioFilter.csv and AudioFilter8150.csv

because there is a mismatch between your git and subpsyke's....even if it looks like 8160's volume is too loud and audio quality lowers a bit
[Android Software/Hacking General [Developers Only]] aorth:
That sounds great, but the CM build system is confusing as hell... I don't even know how we'd start. Maybe, now that audio is fixed, you can get your feet wet? Come on in, the water's nice!

Yes, the kernel in my nightlies is one I've extracted from Gingerman-v6.5-Multitouch_kernel.zip. My custom "noma" kernel (and the generic Froyo sources from Huawei as well) boot CM7 just fine, but touch is buggy so I can't even unlock the screen.

Dunno... I'll have to go check what the differences are later tonight.
[Android Software/Hacking General [Developers Only]] Hetfield666:
i would like to join but next 2 months i'm busy with job transfer and i'm relocating, so i can't give any commitment.

regarding the factory you can have some

ifeq ($(TARGET_BOOTLOADER_BOARD_NAME),u8150)

...else...

in the Android.mk or similar Makefiles and that's all
[Android Software/Hacking General [Developers Only]] tas0s:
Best approach for a multidevice config tree I think that it would be if you look at some htc devices (they all use a htc common dir etc).So maybe you can have in a dir the common stuff with u8160 etc and distinct dirs for each device.Just a thought, I haven't try anything.
[Android Software/Hacking General [Developers Only]] aorth:
I don't have the CM7 Radio App handy, but I just tried Spirit FM Radio from the market and it behaved a bit strangely, and then sorta broke audio routing. I had to reboot it to get headphone sound working again. This was with iPod headphones that I usually have at work, btw. My Huawei headphones are at home.

---------- Post added at 12:24 PM ---------- Previous post was at 12:23 PM ----------

True, also the Samsung Galaxy S/SII devices are all very similar. I've built CM7 for Galaxy S many times, so I might have a look at what they're doing with common build files.
[Android Software/Hacking General [Developers Only]] poruid:
Do I understand it correctly?

The CM build tree is itself an example of support for many devices. When some of these devices share some code then a common project could be for example huawei/u81xx_common.

What I do not understand is how the kernels for different devices are integrated into the CM tree.
[Android Software/Hacking General [Developers Only]] smashman42:
Anyone got a mirror? That bayfiles site keeps crapping out of me, first time I got 50/64.9MB & every retry has been worse :(
[Android Software/Hacking General [Developers Only]] aorth:
Sure, gimme a few minutes. Uploading to multiupload right now...

Edit: Here you go! update-cm-7.1.0-RC1-U8150-KANG-signed-sept21-2.zip (multiupload)
[Android Software/Hacking General [Developers Only]] Hetfield666:
aorth, i tested it and the headphones are not working at all!

they are detected and i can see the icon, but no sound is rooted at all...

u mentioned the libaudio from subpsyke was included, wasn't it?
[Android Software/Hacking General [Developers Only]] aorth:
Damn, that is confusing, the 21092011-2 build definitely worked for me. Ironically, today I was editing some stuff in my device tree and now I can't even rebuild it! Keeps failing trying to find libaudio.so... wtf.
[Android Software/Hacking General [Developers Only]] Hetfield666:
plus it looks like the battery draining bug is still there. i lost 5% of battery in few minutes. doing nothing.

i'll wait some more hours to check what's going on

---------- Post added at 07:15 PM ---------- Previous post was at 07:08 PM ----------

ok, do you think that's a chance you uploaded something without the patch?

battery draining is here anyhow. lost another 2%.

it was introduced in the first tilal's nightly build

---------- Post added at 07:32 PM ---------- Previous post was at 07:15 PM ----------

some more: this build is much smaller probably because there are no gapps and tools like cpu no frills.

but i notice that translation is not complete, even compared to v7. this is really strange.

and it lacks the nice wizard on first install
[Android Software/Hacking General [Developers Only]] psyke83:
Maybe you forgot to edit libaudio/Android.mk again?

Should be: ifeq ($(TARGET_BOOTLOADER_BOARD_NAME),u8150)
[Android Software/Hacking General [Developers Only]] smashman42:
Which sub-revision? working fine on my -D so far, haven't made any calls to try to break the headphones yet so touch wood... (note: call button doesn't pause/play music, this bug started in GM7 & is present in all nightlies, worked normally in GM6.5.1)

ps: The boot animation looks like HVGA not QVGA
[Android Software/Hacking General [Developers Only]] lazyfai:
Tried on my 8150B, battery dropped from 100% to 82% in 2.5 hours, a little bit higher than before, probably due to 122MHz min CPU freq instead of 31/60 before.
[Android Software/Hacking General [Developers Only]] Hetfield666:
dropped from 100 to 61 in a night time in flight mode, plus headphones not working.

can't use it now :((((((((((((((((((((

so sad because it's amazing fast i'm using 60-320 mhz ondemand and everything is smooth and sound!
[Android Software/Hacking General [Developers Only]] aorth:
Busy at work so I'll answer quickly!

1. The build is smaller because this is vanilla CM7. I guess a lot of people have never used a plain ol' CyanogenMod build? It's lovely! No Google Apps because google doesn't like people packaging them with their ROMs. You can download them here (get the Universal one): http://goo-inside.me/gapps

2. I just flashed stock then back to my "fixed audio" nightly and audio is working with iPod headphones with the music player and the dialer.

3. Battery drain? Dunno! We need more devs and I need more time. Working kernel sources would be nice ;). I've compiled psyke's U8160 kernel but haven't had time to fix my CM7 build system. Keeps failing on libaudio, ironically. (yes, psyke, my device tree's libaudio/Android.mk is building for u8150... what else could it be?).

---------- Post added at 11:51 AM ---------- Previous post was at 11:45 AM ----------

I noticed that too... hahahaha. I think we need to edit the LOCALES, I noticed subpsyke has his U8160 set to ldpi: https://github.com/psyke83/android_device_huawei_u8160/blob/master/device_u8160.mk

I'll edit ours as soon as I get some time! Also, I need to fix this damn build bug. wtf!

ps, quick tally: who has flashed the "fixed audio" nightly and headphone audio in the Dialer and Music apps are working?
[Android Software/Hacking General [Developers Only]] Hetfield666:
forgot to add: i have u8150-D, same as you.

and now i'm running CM7 from tilal, not nightly. same battery issue. about 50% in 10 hrs, doing nothing.

when i get home tonight i'll flash the stock rom or the fusionideos :(((
[Android Software/Hacking General [Developers Only]] aorth:
Yes, the kernel included in my nightlies has no under/overclock. I included the multi-touch kernel because for some reason the over/underclock one doesn't boot on my U8150-D. If I knew which kernel sources tilal was using I could maybe look at getting both of them to play nice with each other.
[Android Software/Hacking General [Developers Only]] -XoRoX-:
it doesnt work in huawei c8150

is it posible flash cm7 for device c8150?
[Android Software/Hacking General [Developers Only]] Hetfield666:
aorth as far as i know it's not a problem with kernel but with cyanogen itself
[Android Software/Hacking General [Developers Only]] tilal6991:
I'll be posting a new build soon. Absolute promise :)
[Android Software/Hacking General [Developers Only]] Hetfield666:
well done tilal, really waiting for it to replace the v7 battery eater!

but as you're busy with the ZTE Skate (traitor ahahhaah!) and it looks like aorth and others may continue and contribute, can you share in git everything?

thanks again man!
[Android Software/Hacking General [Developers Only]] tilal6991:
I've not been busy with the Skate - just busy with life in general - all my work is always posted on Git - https://github.com/tilal6991/android_device_huawei_u8150. I should have more free time from now on. :)
[Android Software/Hacking General [Developers Only]] smashman42:
Re: Battery drain, 90% left after 5hr45min, wifi & sync enabled, 2g network only, BT, GPS & mobile data off (sitting around the house)

Light app/web use, played a bit of Angry Birds, some shifting stuff from data to system with Ti Backup
[Android Software/Hacking General [Developers Only]] Hetfield666:
ah ok, i saw some git activity for ZTE :)

anyhow i still hope a dream team to get merged

ok, i stop bothering you so you can post a new release :)
[Android Software/Hacking General [Developers Only]] aorth:
Welcome back

Awesome. I'm ready to pull changes from your github, hehe. Building from source is fun ;) I was on a roll for a few days, but now mine doesn't compile and I'm honestly wondering how I even got it compiled in the first place. brunch always stops at libaudio.so...

Not bad, dude... you're a happy customer then? Haha.
[Android Software/Hacking General [Developers Only]] tilal6991:
Did you run extract-files.sh before runnling brunch?
[Android Software/Hacking General [Developers Only]] aorth:
Yup. But libaudio.so is built from the local one in the U8150 device tree, isn't it? Also, libaudio.so isn't in extract-files.sh...
[Android Software/Hacking General [Developers Only]] tilal6991:
Just realised that - what does the Android.MK in libaudio folder say? The bootloader shoould be "U8150" with a capital.
[Android Software/Hacking General [Developers Only]] aorth:
Ah, indeed. The test in libaudio/Android.mk has to match the defined bootloader in device/huawei/u8150/BoardConfig.mk. I see that my kang from subpsyke swapped that from U8150 -> u8150. I'm surprised it even built properly after that...

I see you've just committed the fix: https://github.com/tilal6991/androi...mmit/ee9d9c8801d26c62fca20cf6b637e4d175a80df6 I'll pull shortly... :)

Cheers.
[Android Software/Hacking General [Developers Only]] tilal6991:
What may have happened was that the config built with the old libaudio - which means the new one was never tried at all.
[Android Software/Hacking General [Developers Only]] aorth:
You're right, again!

Right again. I'm seriously confused by the Android build system. I guess a previously-built libaudio.so was in out/target/product/u8150/, and I probably didn't `make clobber` after I kanged subpsyke's libaudio. Also, it's just a coincidence that headphone audio worked in my nightly. It seems it works for me, but not all U8150-Ds. Strange!

I just merged your latest libaudio fixes and I'm recompiling as fast as my Core i7 can!

btw, how modified is your kernel source for CM7? My kernels boot on CM7, but they behave very strange (touch is erratic). subpsyke's U8160 kernel even compiles and boots much better than my U8150 one!
[Android Software/Hacking General [Developers Only]] aorth:
Audio is complicated

I hate to say it, but I was wrong about headphone audio being fixed. First, it appears my "fixed" build was kinda an accident; the only reason it compiled is because I forgot to clean up the old outputs before trying to compile the new code (I'm still learning the Android build system, gotta brush up on the specifics).

Second, subpsyke's libaudio finally compiles... but it appears, at least on my device, to have two problems:

Audio is very low

Headphones are detected, but don't work at all (similar to what Hetfield666 said earlier about my "fixed" build, ironically!)

Anyways, glad to be a part of this process. If I can convince more of you guys to join us in hacking away in your free time then we'd be quite a team ;).
[Android Software/Hacking General [Developers Only]] poruid:
What is the meaning of "kanged", or better, what does the verb to kang mean?
[Android Software/Hacking General [Developers Only]] aorth:
haha, it means to take/steal. I don't know if it has any meaning outside the CyanogenMod circles... :)
[Android Software/Hacking General [Developers Only]] psyke83:
Yep, you're taking revenge for me "kanging" your kernel tweaks too ;).

Speaking of the kernel, why don't you try using the U8160 source as a base? The U8160 prebuilt module may work on your phone if you just replace the firmware files.
[Android Software/Hacking General [Developers Only]] Hetfield666:
aorththe problem may be with csv files you're not importing.

if you see in the lib

if (!audpp_filter_inited)

+ {

+ LOGE("Parsing error in AudioFilter.csv.");

+ return -EINVAL;

+ }

so the return may quit and skip the device init/detection.

i'm not sure because i'm checking only the patch not the whole driver....

and AudioFilteru8150.csv or similar is missing too.

lalit played with those files too in the past.