Jump to content

a way to cleanly integrate u8220 eclair libcamera.so into froyo


Guest dr.flo

Recommended Posts

Updated status (post #2). I conclude that the wrapper is not the cause of the HQ video recording issues. Video recording works without issues on real froyo (real means froyo built without eclair camera compatibility hacks as in our CM6).

In CM7, the camera app crashes but video is saved. I suggest one of the following

  • accept the crash when you need to record HQ video
  • switch to low quality video recording
  • use a third party video recording app (lgCamera worked for me without crashes, using CM7 rom from 1st post)
  • if you find any camcorder app that works, please post the info into this thread

After all, the thread title is about integrating libcamera into froyo, gingerbread wasn't promised. From that point of view, I think we can be quite happy with what we have so far... ;)

I suggest we move on to look at remaining issues we have with CM7.

Link to comment
Share on other sites

I suggest we move on to look at remaining issues we have with CM7.

I think we should assemble rom with all working parts:

- cm7.2

- your camera work

- 2.6.32 kernel

- proper open GL lib by 'sun lbx'

Optional:

- stock gb keyboard with much more languages (from Hero for example). I will install it anyway (Localization in our cm7 is not very good).

- my mod of Mac Address fixer for cm7

real froyo (real means froyo built without eclair camera compatibility hacks as in our CM6).

did you compile CM6 "real froyo"? Could you upload it? Might test something with it in the future...

Edited by pier11
Link to comment
Share on other sites

Guest dejavu-8

Dear dr.flo! Could you upload the collected test kernel cm6, I just do not understand in programming android. Thanks in advance.

Ps Sorry for bad english

Edited by dejavu-8
Link to comment
Share on other sites

I think we should assemble rom with all working parts:

...

I agree on all of these parts (maybe leave out the keyboard, optional for those who need it).

What's the issue with open GL? Does this lib you refer to bring any visible improvement (and where?) I thought sun lbx gave up on this?

The best basis for this I think might be the dtox ROM you tested my wrapper with... So basically you have already built said ROM. It's time for a new topic I think... ;) And maybe also put a link to some working google apps there. As any official CM rom, the roms built from source do not include google apps due to licensing issues. We should keep it this way and not try to include them within one update.zip. After all it's pretty simple to install two zip files instead of one in CWM....

Link to comment
Share on other sites

Dear dr.flo! Could you upload the collected test kernel cm6, I just do not understand in programming android. Thanks in advance.

Ps Sorry for bad english

The CM6 stuff I have is not fully functional because my repo checkout was incomplete. If you want CM6, you're better of with some of the well known mods posted here in the forum.

If you want CM7, just wait until a new rom gets posted.

Link to comment
Share on other sites

did you compile CM6 "real froyo"? Could you upload it? Might test something with it in the future...

I compiled CM6 from source (without BOARD_USES_ECLAIR_LIBCAMERA), thus it should be normal froyo adopted to pulse where needed. But it is not fully functional. For example, it doesn't recognize my sd card. Also, cyanogenmod settings crash because CMParts.apk failed to build from source. (Workaround: drop in CMParts.apk from working ROM).

Also, I think I missed something when integrating device_huawei_u8220 folder. It only builds fastboot images, but then aborts with errors before creating update.zip. So this rom is highly experimental.

Nevertheless, it might be interesting to look at as a comparison to u8150 froyo. Also, as you are familiar with CM6, you might be able to see if known CM6 issues are still present in this rom. Something might be different because I've complied branch 'froyo' (and not 'froyo-stable') which still received commits long after CM6 release.

CM6 - FOR DEVELOPMENT ONLY - not suitable for daily use (yet)

Note: It won't boot, because libcamera (the original one) misses dependencies. You have to adb push libcamera.so and camera.so (not libcameraservice!) from this thread into system/lib... That's because real froyo - as well as real gingerbread - does not like our stock libcamera.

Link to comment
Share on other sites

What's the issue with open GL? Does this lib you refer to bring any visible improvement (and where?) I thought sun lbx gave up on this?

There is Neocore (an application on the Market) open GL test.

Without the lib it renders only flashes of light on cm7,

while with the lib it start to render real city with buildings, moving vehicles, etc.

Obviously the new version of the lib has enabled some additional rendering facilities of our GPU...

--

Thanks for CM6 build. (to others: it's for development purposes only, not for general use)

Link to comment
Share on other sites

Guest desalesouche

There is Neocore (an application on the Market) open GL test.

Without the lib it renders only flashes of light on cm7,

while with the lib it start to render real city with buildings, moving vehicles, etc.

Obviously the new version of the lib has enabled some additional rendering facilities of our GPU...

--

Thanks for CM6 build. (to others: it's for development purposes only, not for general use)

hello is it possible to test what you²ve done...can you link the rom with the new lib si i can test also with neocore...thank you

Link to comment
Share on other sites

hello is it possible to test what you²ve done...can you link the rom with the new lib si i can test also with neocore...thank you

be patient my friend

we are going to prepare resulting rom with all recent development

Edited by pier11
Link to comment
Share on other sites

Hi Dr Flo,

could we not use this source code for the mt9t013 sensor?

http://lxr.free-elec...?v=2.6.36;a=arm

also codeaurora seems to keep crashing but the kernel for 7225 might be useful if the site worked!!! :( or maybe not

https://www.codeauro...o/msm/mt9t013.h

p.s. appreciate your work :)

It has turned out that the video problem is not due to camera sensor driver or kernel issues. So, there is no need to work on these.

Just take pictures with stock camera app and get some other camera app from the market for HQ video recording.

Link to comment
Share on other sites

Guest desalesouche

be patient my friend

we are going to prepare resulting rom with all recent development

ok ; i will wait but hard to be patient :rolleyes: ...i want to thank all of you for your great and exciting job....

Link to comment
Share on other sites

ok ; i will wait but hard to be patient :rolleyes: ...i want to thank all of you for your great and exciting job....

It has been posted already in another thread.

Link to comment
Share on other sites

I compiled CM6 from source (without BOARD_USES_ECLAIR_LIBCAMERA), thus it should be normal froyo adopted to pulse where needed. But it is not fully functional. For example, it doesn't recognize my sd card.

...

Also, as you are familiar with CM6, you might be able to see if known CM6 issues are still present in this rom. Something might be different because I've complied branch 'froyo' (and not 'froyo-stable') which still received commits long after CM6 release.

Slightly off topic - but: replacing system/bin/vold with one of the current CM6 roms version makes sd card work. This rom turned out to also have the wifi reconnection bug and the gps icon bug -> CM6 issues not fixed even though build from newest sources.

Edited by dr.flo
Link to comment
Share on other sites

Slightly off topic - but: replacing system/bin/vold with one of the current CM6 roms version makes sd card work. This rom turned out to also have the wifi reconnection bug and the gps icon bug -> CM6 issues not fixed even though build from newest sources.

met this highlights how to plug unsupported device to CM... Might be useful to double check correct plugging of u8220 to CM6 (?) ... you asked about one day...

Long ago I tried with AOSP but it was far from obvious how to use even prepared u8220 configs...

Link to comment
Share on other sites

Status: Functionality of the wrapper

#5

ROM: CM6 TXG mod (with modified wrapper that links to libui instead of libcamera.so; just to test libbinder part of the wrapper)

photo: no issues

video: no issues

I've read through the thread a few times, trying to understand what all is being said, but since I am not a programmer at any level, some of this is difficult for me to understand. Please help me if you can.

Are you saying that you tested the modifications you made to the libcamera.so and camera.so files in the TXG rom and it solved the camera issues we have been having with all the CM6.1 based roms? If this is correct, then is all I need to do for the next update of the TXG rom is to copy those two files into the rom? Is it that simple?

I'll try that while I await your reply.

(I assume I can get those two files by downloading the rom you link to in the first post and pulling them out.)

Thanks for you work.

Edit: Apparently I really do not understand. I pulled those two files out of the CM7.2 rom Pier uploaded and put them into TXG. (And I replaced the Camera.apk with the original from TomG's port.) The resulting rom build hangs on boot. So any help you can give would be appreciated.

Edited by twrock
Link to comment
Share on other sites

Are you saying that you tested the modifications you made to the libcamera.so and camera.so files in the TXG rom and it solved the camera issues we have been having with all the CM6.1 based roms?

Not exactly. I was trying to figure out if my wrapper crashes in any environment. So I tried it in eclair which is the most native environment for our camera libs. If it would crash there, it could only be the wrapper because any other things were completely stock. But it didn't crash. So I tried going the way from eclair to gingerbread. Regarding the camera environment, the way is

eclair -> cm6 (all Tom G based roms with partially working camera) -> real froyo -> gingerbread

With regard to camera, your CM6 is not froyo but eclair. That's because it was compiled to act like eclair in certain aspects (libs, heap management; that's the reason these roms do not have libcamera_client and libsurfaceflinger_client by default). Real froyo would be a (CM6) rom compiled without said "eclair emulator" option.

Using the wrapper on eclair or CM6 (Tom G based) does not make sense. It is like having someone translate english into english. I just did that to see if the wrapper passes all function calls correctly (i.e, if it can read and write english if you want). It does. But in that environments, it cannot be expected to modify any functionality. Most likely, taking pictures with your rom just worked because I left the modified camera app untouched.

Edit: Apparently I really do not understand. I pulled those two files out of the CM7.2 rom Pier uploaded and put them into TXG. (And I replaced the Camera.apk with the original from TomG's port.) The resulting rom build hangs on boot. So any help you can give would be appreciated.

That is expected behaviour. Because the wrapper files you extracted are those that expect a real froyo environment. One could say the wrapper is built to translate english into french. For the wrapper to work with your rom, you need to modify camera.so (to let it translate into english instead of french). You can easily do this yourself. Get a hex editor, search for the string libcamera_client.so inside camera.so. Then overwrite 'libcamer' with 'libui.so' at the beginning of that string, and after 'libui.so' you have to add a zero (not '0' on keyboard, but a 0x00 hexadecimal, to terminate the string. Then you get the modified wrapper - but as I already said - I don't expect that to fix any issues.

By the way - without anegins camera app - how many 3MP pictures do I need to take in order to reproduce the crashing bug? Is this like 3 pics or like 30+?

Edited by dr.flo
Link to comment
Share on other sites

met this highlights how to plug unsupported device to CM... Might be useful to double check correct plugging of u8220 to CM6 (?) ... you asked about one day...

Long ago I tried with AOSP but it was far from obvious how to use even prepared u8220 configs...

Thanks - I'll have a look at this.

Link to comment
Share on other sites

Guest anarkill

sometimes appears a bug in the Cm7.2 32 kernel and 29 kernel. "Hardware not response" and a black screen on the camera. Helps only reboot.

Edited by anarkill
Link to comment
Share on other sites

So i wanted to test this thing and as i can see the orientation freeze bug is back. :/

I do hope that the same thing doesn't happen with the .32

what exactly is "this thing"? Please clarify as there are at least two roms linked from within this thread...

Edited by dr.flo
Link to comment
Share on other sites

Oh sorry. I was referring to rom #1 (the one from this thread, not from the other), the first cm7 rom with integrated camera. After using it for a while, it suddenly got the orientation bug problem. I now wonder if that bug in cm6 is caused by the camera app/lib.

Link to comment
Share on other sites

By the way - without anegins camera app - how many 3MP pictures do I need to take in order to reproduce the crashing bug? Is this like 3 pics or like 30+?

If my memory is not too faulty, the second picture would crash the camera. At least that was my experience.

And thanks for the explanation. Yes, that was very helpful and makes sense to me. Looks like Tom did a lot of hacking to get his port to work. And it works quite well, considering how many people are running it as their daily use rom (or some mod of it).

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.