• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [DEV] WIP CM9 (Camera) [updated 2/23/2013]

Anyone else having problems using Clockworkmod 6 to backup as a Nandroid? I get half way through /Data and it dies with an error.

Backing up SD Card and will reformat it just in case? I wonder if it's the same as the above issue?

Yes I've been having the same problems w 6.0.1.9 cwm. I went back to 5.5.0.4 and no more prob
 
I could never quite wrap my heard around why we need both libcamera.so and camera.msm7x30.so: clearly the app needs the former and the mediaserver needs the latter. But, why doesn't the app just use camera.msm7x30.so?

Now, it is looking like this scheme is essentially copied for the overlay library, which we will have in both frameworks and camera.msm7x30.so... something is rotten.

I guess the immediate options are to either 1) completely remove overlay from camerHal or 2) update cameraHal to use qcom overlayLib. Does one of these make more sense to you than the other?

Also, do you know offhand if we have a similar problem with overlayLib/framebuffer as we did with kernel/camera stuff (possibly mismatched version, etc)?

I think it might be related to our use of multiple blob sources.
 
Yes I've been having the same problems w 6.0.1.9 cwm. I went back to 5.5.0.4 and no more prob

I went to CM 5.5.0.4 yesterday and tried to backup, again having an error during /data.

I then tried TWRP (or whatever it was called) and tried, but it said that I needed more space than I had to do a backup (I had 20GB spare so I suspect it got the maths wrong).

This morning, I backed up the SD Card in my linux laptop, then went back to CWM 6, and changed from dup to tar. It then performed a backup perfectly.

Not sure if it's dup to tar related, or maybe I had a bogus app which updated itself overnight.

Happy it's working at least, I will stick with tar for the time being until I notice my SD card filling too quickly.
 
Those error messages are from overlayLib in hardware/qcom/display/liboverlay. Inside overlayLib.h here we have a class Overlay. I wonder if this is the overlay that should be included in cameraHal? The interface is not quite the same though...

EDIT: This overlay stuff also seems to have a lot to do with the kernel framebuffer driver, so that is something to keep in mind as well.

EDIT2: Or maybe camerahal doesn't really need an overlay, and we need to just update what's in frameworks.

EDIT3: I realized I never mentioned on here but I have been hanging out in irc, might be good to talk there sometime.
Sorry for not responding with more info, I was fighting to keep my eyes open after that first post.

Yes, since the overlay is tied to the hardware, I wanted to incorporate it, since from everything I see it should be enabled. Once enabled, I saw the errors and went about finding a solution. This led me to an old CM9 I had on disk, to see what mantera did, and that is how I got where I am now. I uploaded all the camera source I had handy, to make it easier for anybody who wants to help, there is a readme in it briefly describing what everything is. This may help to figure out what we are missing.
Moto_Triumph_various_camera_source_2-26-13

I have never really used irc, but I would be willing to get on and discuss this in more depth.

I could never quite wrap my heard around why we need both libcamera.so and camera.msm7x30.so: clearly the app needs the former and the mediaserver needs the latter. But, why doesn't the app just use camera.msm7x30.so?

Now, it is looking like this scheme is essentially copied for the overlay library, which we will have in both frameworks and camera.msm7x30.so... something is rotten.

I guess the immediate options are to either 1) completely remove overlay from camerHal or 2) update cameraHal to use qcom overlayLib. Does one of these make more sense to you than the other?

Also, do you know offhand if we have a similar problem with overlayLib/framebuffer as we did with kernel/camera stuff (possibly mismatched version, etc)?
I am pretty sure the camera.msm7x30.so is new to ICS, it is the reason the camera is so hard to get working on ICS for devices that never got the update.

I think that the overlay files are included in the cameraHal so it is a complete package, but then again the QualcommCameraHardware does include the frameworks file. So, yeah it is confusing, plus the renaming of the OverlayHtc to Overlay in the cameraHal is confusing. Why not just leave it as OverlayHtc?

My gut feeling is that we need to rewrite the overlay code in the cameraHal to match the Overlay files. It seems that while the phone that the HTC files are for may be the same SOC, we do not have an HTC phone. Also, the line in the logcat about acousticHtc.so, or whatever, not being found kinda perplexed me, I am wondering if it is tied to the BOARD_USES_HTC_CAMERA, since that is the only flag we have set that relates to HTC. Plus the flag only seems to be in our BoardConfig and frameworks/base/libs/ui/Android.mk. While the flag is in manteras BoardConfig it is not in frameworks, nor the OverlayHtc files. Neither of the frameworks Overlay files are included in stock source.

As far as I can tell the Overlay should match our kernel, since we use manteras kernel and he is the one that put the Overlay files in. The other mismatches are due to us having so many phones to choose from, while we were stuck at froyo most of the others got GB, and Isaac used the libs from the Cherry ROM to get the camera working in CM7, then the files just got used as ours since they worked. Basically at points we were using libs from both Sharp and Cherry GB ROMS, but I had no hand in that, so I can't tell you what is what. I just compare the variant ROMs to our proprietary files to see where they come from, they are different depending on whose repo you pull. I am pretty sure my device files are using just Cherry and Stock files, I figure that is the best way to go since they use the same kernel for the most part and Sharp uses the 2.6.35.7 kernel and is setup for 3GVM_SPLIT, while we and all the other variants use 2GVM_SPLIT.

My issue with the overlay is, I don't know how to rewrite the overlay in the cameraHal, it is over my head. Before the changes to get the camera taking pictures, I was using the Overlay files but leaving the camera stuff pointing to OverlayHtc and it still worked like it did just different errors. I am pretty sure that is how I built the PA Camera Test that I posted, I know for sure that I had commented out the BOARD_USES_HTC_CAMERA. But now, with the fixes, building that way breaks the camera. The app opens and has no preview and will flash but not save the picture, it even focuses, you can hear it.


SIDE NOTE: I have been thinking that the issue is not with the focus but with the zoom, or maybe the way focus uses the zoom. Since I had messed with Camera Mod for Xperia PLAY from the playstore, and they have no zoom, I tried it out and you can hear the camera zoom when it focuses when you take a picture, but it does not go all crazy in video mode.
 
I think that the overlay files are included in the cameraHal so it is a complete package, but then again the QualcommCameraHardware does include the frameworks file. So, yeah it is confusing, plus the renaming of the OverlayHtc to Overlay in the cameraHal is confusing. Why not just leave it as OverlayHtc?

My gut feeling is that we need to rewrite the overlay code in the cameraHal to match the Overlay files. It seems that while the phone that the HTC files are for may be the same SOC, we do not have an HTC phone. Also, the line in the logcat about acousticHtc.so, or whatever, not being found kinda perplexed me, I am wondering if it is tied to the BOARD_USES_HTC_CAMERA, since that is the only flag we have set that relates to HTC. Plus the flag only seems to be in our BoardConfig and frameworks/base/libs/ui/Android.mk. While the flag is in manteras BoardConfig it is not in frameworks, nor the OverlayHtc files. Neither of the frameworks Overlay files are included in stock source.

As far as I can tell the Overlay should match our kernel, since we use manteras kernel and he is the one that put the Overlay files in. The other mismatches are due to us having so many phones to choose from, while we were stuck at froyo most of the others got GB, and Isaac used the libs from the Cherry ROM to get the camera working in CM7, then the files just got used as ours since they worked. Basically at points we were using libs from both Sharp and Cherry GB ROMS, but I had no hand in that, so I can't tell you what is what. I just compare the variant ROMs to our proprietary files to see where they come from, they are different depending on whose repo you pull. I am pretty sure my device files are using just Cherry and Stock files, I figure that is the best way to go since they use the same kernel for the most part and Sharp uses the 2.6.35.7 kernel and is setup for 3GVM_SPLIT, while we and all the other variants use 2GVM_SPLIT.

My issue with the overlay is, I don't know how to rewrite the overlay in the cameraHal, it is over my head. Before the changes to get the camera taking pictures, I was using the Overlay files but leaving the camera stuff pointing to OverlayHtc and it still worked like it did just different errors. I am pretty sure that is how I built the PA Camera Test that I posted, I know for sure that I had commented out the BOARD_USES_HTC_CAMERA. But now, with the fixes, building that way breaks the camera. The app opens and has no preview and will flash but not save the picture, it even focuses, you can hear it.
The reason that you can't leave the HTC part in there is I believe that it would confuse the phone.You can use HTC drivers on the phone but if the phone isn't HTC and it reads HTC where normally it would be MOTOROLA it seems like the phone wouldn't accept it.Anyways that's what I think.
 
I went to CM 5.5.0.4 yesterday and tried to backup, again having an error during /data.

I then tried TWRP (or whatever it was called) and tried, but it said that I needed more space than I had to do a backup (I had 20GB spare so I suspect it got the maths wrong).

This morning, I backed up the SD Card in my linux laptop, then went back to CWM 6, and changed from dup to tar. It then performed a backup perfectly.

Not sure if it's dup to tar related, or maybe I had a bogus app which updated itself overnight.

Happy it's working at least, I will stick with tar for the time being until I notice my SD card filling too quickly.

I was never too crazy about the dedupe ("dup") backup method, but I'm one of those who thinks that if it ain't broke it don't need fixin' LOL So why go from a perfectly fine .tar backup to the newer dedupe method?

Anyway, as far as your SD card filling up too quickly, only hold onto the backups that you think you need. I do a Nandroid at least every 2 days, if not daily, and once a week or so I copy the entire contents of my SD card (excluding the ext4 partition) to one of the external hard drives on my computer. I usually hold onto all of my Nandroids throughout the week and then, to save time & space, delete all but the very latest backup from the clockworkmod folder on my SD card before backing it up to my computer.

All that being said, I've been running b_randon's 6.0.1.5 recovery for several months now with no problems whatsoever.
 
As far as I can tell the Overlay should match our kernel, since we use manteras kernel and he is the one that put the Overlay files in. The other mismatches are due to us having so many phones to choose from, while we were stuck at froyo most of the others got GB, and Isaac used the libs from the Cherry ROM to get the camera working in CM7, then the files just got used as ours since they worked. Basically at points we were using libs from both Sharp and Cherry GB ROMS, but I had no hand in that, so I can't tell you what is what. I just compare the variant ROMs to our proprietary files to see where they come from, they are different depending on whose repo you pull. I am pretty sure my device files are using just Cherry and Stock files, I figure that is the best way to go since they use the same kernel for the most part and Sharp uses the 2.6.35.7 kernel and is setup for 3GVM_SPLIT, while we and all the other variants use 2GVM_SPLIT.

My issue with the overlay is, I don't know how to rewrite the overlay in the cameraHal, it is over my head. Before the changes to get the camera taking pictures, I was using the Overlay files but leaving the camera stuff pointing to OverlayHtc and it still worked like it did just different errors. I am pretty sure that is how I built the PA Camera Test that I posted, I know for sure that I had commented out the BOARD_USES_HTC_CAMERA. But now, with the fixes, building that way breaks the camera. The app opens and has no preview and will flash but not save the picture, it even focuses, you can hear it.


SIDE NOTE: I have been thinking that the issue is not with the focus but with the zoom, or maybe the way focus uses the zoom. Since I had messed with Camera Mod for Xperia PLAY from the playstore, and they have no zoom, I tried it out and you can hear the camera zoom when it focuses when you take a picture, but it does not go all crazy in video mode.

I don't know if you guys noticed or not, but I pushed up a set of the device files for the varients that I could find. They are in folders that say were they came from.
 
Not sure if this is the place to post a comment.... Been using cm-9.0.0.Triumph-Alpha-0.6.17.1 for months and decided to upgrade. Followed the wiping instructions and installed 597794-rom-mtdev-cm9-build-20121023-beta. A No Service message appears after the system reboots. There is an X in the 3G indicator icon. The Airplane Mode toggle trick doesn't work either. The Airplane Mode remains grayed out when it is evoked from the Power Button. The Unfortunately, Settings has stopped working message appears when I go in to More > Mobile networks.
 
Not sure if this is the place to post a comment.... Been using cm-9.0.0.Triumph-Alpha-0.6.17.1 for months and decided to upgrade. Followed the wiping instructions and installed 597794-rom-mtdev-cm9-build-20121023-beta. A No Service message appears after the system reboots. There is an X in the 3G indicator icon. The Airplane Mode toggle trick doesn't work either. The Airplane Mode remains grayed out when it is evoked from the Power Button. The Unfortunately, Settings has stopped working message appears when I go in to More > Mobile networks.

For now stick with the ROMs listed on the main post, not the testers.
One of the ones I posted was to test a way to move apps around programmaticly.
 
Trying to look into this...

I tried removing OverlayHtc from frameworks, and it looks like that file may be unused because I encountered no problems.

It looks like the Overlay in cameraHal is a placeholder, and I have started to fill it in with overlayLib. I have something that builds, but trying it will have to wait for another day.

What I really don't understand is how preview is working with the camera currently, because it seems like we should need a proper overlay (libcamera.so seems to think it is using one, anyway).
 
I tried removing OverlayHtc from frameworks, and it looks like that file may be unused because I encountered no problems.

I was wrong about this. Something in frameworks needs an overlay: mediaserver won't load without the android::Overlay::setFd symbol in frameworks, which explains why OverlayHtc is there. The weird thing is it looks like it just blindly calls this symbol without calling the class's constructor...
 
anybody have just the camera update?...
As far as I know there isn't a separate zip file that you can flash with the camera update that they have done.I believe it's cause of the kernel or something else that they are using in the newer builds.I'm using Feb-25 PA ICS camera test ROM from BSydz and it's running good.If you need Skype or ooVoo for video chatting then I would say don't change the ROM but if you are just looking for a ROM that will save the pictures you take then BSydz ROM is the one.It saves picture and has correct date and time.Also there is one on here the CM9 20130223 build that works just doesn't save the date and time correctly which shouldn't be an issue.Hope this helps.
 
As far as I know there isn't a separate zip file that you can flash with the camera update that they have done.I believe it's cause of the kernel or something else that they are using in the newer builds.I'm using Feb-25 PA ICS camera test ROM from BSydz and it's running good.If you need Skype or ooVoo for video chatting then I would say don't change the ROM but if you are just looking for a ROM that will save the pictures you take then BSydz ROM is the one.It saves picture and has correct date and time.Also there is one on here the CM9 20130223 build that works just doesn't save the date and time correctly which shouldn't be an issue.Hope this helps.
Thanks for the time you have put in testing stuff out. If you could lay out what the differences between the two are, as far as camera goes, that would be very helpful, to find out what needs to be changed. I have a feeling that the video chat problems are cause the video is not working, it probably has a path now to connect and it just hangs like the video recording does. Cause nothing was changed except cam stuff, check out the pic of what I have changed below. The red means different and the blue means extra, I had to collapse a few folders to get it to fit but that is what was changed.

I just don't have time for testing, what time I have, I am working on the code. If anybody feels froggy, it would be great to get some comparisons of the camera functionality between the 2 ROMs.

adamtos camera build:
http://androidforums.com/triumph-al...amera-updated-2-23-2013-a-12.html#post5571894
My PA camera build:
http://androidforums.com/triumph-al...-6-beta-1-source-15feb2013-3.html#post5577702

For anybody interested about the changes I made, here they are. I updated the kernel to match the Cherry libcamera, by pulling in from the M410 kernel. I went through and rearranged the frameworks files that adamto used from CM7 and found that it was very similar and merged the two leaving what was there from both files. I changed the rest of the proprietary .so files to the Cherry Magnum, except the 3 ril files, liba2dp, libaudio, and libdiag.

 
Wow this is crazy i haven't been on in a while and now the camera works. Great job all!!!
i wish i would have been more active in the past couple of weeks then i wouldn't have bought a new phone. I know we have an amazing set of devs. here but i thought the camera was a lost cause so i went a head and got an unlocked motorola atrix HD (loving it) and moving on to tmobile. im mad now cause since the camera is improving i didn't really need a new phone imma be pissed if someone popup saying they have HDMI working lol. well im about to download the latest version and test out the camera. Again great job to everyone involved.
 
Well 4 days running this Rom so far so good random reboot count has been 6 and that's not bad. I do get the 3 drop but fixed while I switch between airplane mode. But I have noticed slow buffering with some sites. with YouTube and Netflix I also get that issue. Besides all that it's good running ICS with working cam and I will keep testing this bad boy. All I gotta say is thanks to all of the Devs who have worked on this. THANKS GUYS!!!! KEEP THE GREAT WORK GOING!!!! =)
 
Well 4 days running this Rom so far so good random reboot count has been 6 and that's not bad. I do get the 3 drop but fixed while I switch between airplane mode. But I have noticed slow buffering with some sites. with YouTube and Netflix I also get that issue. Besides all that it's good running ICS with working cam and I will keep testing this bad boy. All I gotta say is thanks to all of the Devs who have worked on this. THANKS GUYS!!!! KEEP THE GREAT WORK GOING!!!! =)

Try adding the data toggle to the power widget and cycle that instead of going through airplane mode. I haven't had any issues with my 3g dropping out except while using GPS. And that's on any ROM.

Anyway, if the data idea works report back please.
 
Try adding the data toggle to the power widget and cycle that instead of going through airplane mode. I haven't had any issues with my 3g dropping out except while using GPS. And that's on any ROM.

Anyway, if the data idea works report back please.

Tried it, it's a bit useless the times I tried using it but I think the roaming happens when in low signal places, other than that it's bulletproof with wifi on.
 

Attachments

  • uploadfromtaptalk1362104244608.jpg
    uploadfromtaptalk1362104244608.jpg
    27.7 KB · Views: 107
Thanks for the time you have put in testing stuff out. If you could lay out what the differences between the two are, as far as camera goes, that would be very helpful, to find out what needs to be changed. I have a feeling that the video chat problems are cause the video is not working, it probably has a path now to connect and it just hangs like the video recording does. Cause nothing was changed except cam stuff, check out the pic of what I have changed below. The red means different and the blue means extra, I had to collapse a few folders to get it to fit but that is what was changed.

I just don't have time for testing, what time I have, I am working on the code. If anybody feels froggy, it would be great to get some comparisons of the camera functionality between the 2 ROMs.

adamtos camera build:
http://androidforums.com/triumph-al...amera-updated-2-23-2013-a-12.html#post5571894
My PA camera build:
http://androidforums.com/triumph-al...-6-beta-1-source-15feb2013-3.html#post5577702

For anybody interested about the changes I made, here they are. I updated the kernel to match the Cherry libcamera, by pulling in from the M410 kernel. I went through and rearranged the frameworks files that adamto used from CM7 and found that it was very similar and merged the two leaving what was there from both files. I changed the rest of the proprietary .so files to the Cherry Magnum, except the 3 ril files, liba2dp, libaudio, and libdiag.

NP man.All I can see as the only difference with the camera between your build and his are these things...

With adamto's build the camera rotation is correct from the first time you use it.Also with his all pictures are saved with the date Dec. 31 1969 so they will be in the back of the gallery.

With BSydz's build the camera rotation is incorrect on preview then is corrected after you take your first picture.All pictures save with correct rotation tho even the first when the preview isn't correct.Also it shows correct time and date on pictures taken.

Outside this I see no real difference between the two camera wise.I've had zero reboots with the BSydz's build but I have been using strictly Wi-Fi the past couple days.


As for the theory of the fact that video isn't working is causing the video chat apps to not work it makes sence.But the only reason why I kinda disagree is cause they where working on the 20130127 CM9 build.That's what bugs the hell out of me.If it's not working cause we don't have working video then how did it work before with that same issue.Now the only thing that isn't working with video is that it's not allowing us to record and save a video but we still get a preview.I feel that apps like Skype just use the camera in preview mode to stream the video feed.That is the only way that it would be able to work on one build but not another it seems to me.Now I know that adam is probably tired of me talking about it but it just bugs me you know.It's like your brakes on your car are worn and you replace them but then the brakes don't even work anymore at all lol.(ok that was extreme but it's the only way to compare it)

Anyways BSydz I had a logcat of the 20130127 CM9 build using Skype with video working and a logcat of the 20130223 CM9 build using Skype where video can't be enabled.Maybe there is an answer in the logcat's?
 
Now I know that adam is probably tired of me talking about it but it just bugs me you know.It's like your brakes on your car are worn and you replace them but then the brakes don't even work anymore at all lol.(ok that was extreme but it's the only way to compare it)

I had a technician who kept putting the pas on backward. At first we were wondering why they had a grindy noise, then on the next couple of cars we couldn't beleive he did it again,

By the way, the cars never left the bay fully before we cought the problems.
 
I had a technician who kept putting the pas on backward. At first we were wondering why they had a grindy noise, then on the next couple of cars we couldn't beleive he did it again,

By the way, the cars never left the bay fully before we cought the problems.
ROFL!!!!I would hope not.I've changed the brakes on my car and my nephew helped me(he's older than me btw)...anyways when he put the caliber back on he twisted the brake line causing the brakes to grind into the rotor and not disengage.Lets say the car was smoking til we saw the problem lol.
 
Thanks for the time you have put in testing stuff out. If you could lay out what the differences between the two are, as far as camera goes, that would be very helpful, to find out what needs to be changed. I have a feeling that the video chat problems are cause the video is not working, it probably has a path now to connect and it just hangs like the video recording does. Cause nothing was changed except cam stuff, check out the pic of what I have changed below. The red means different and the blue means extra, I had to collapse a few folders to get it to fit but that is what was changed.http://
I see a change in camera.java.What was the change exactly?Could that affect how the preview that the camera is seeing?
 
re: rotation issues in PA...

I double-checked that I committed the preview rotation fix, and I did. It was the:
enableMsgType(CAMERA_MSG_PREVIEW_FRAME);

on line 625 of cameraHAL.cpp. If you have that as well, you may want to try changing it to:

enableMsgType(CAMERA_MSG_ALL_MSGS);
 
I was wrong about this. Something in frameworks needs an overlay: mediaserver won't load without the android::Overlay::setFd symbol in frameworks, which explains why OverlayHtc is there. The weird thing is it looks like it just blindly calls this symbol without calling the class's constructor...

This symbol is actually coming from libcamera.so, showing up from mediaserver since camera.msm7x30.so now links directly to libcamera.so.

I should have thought to take a look at cm7 overlay source sooner. It looks like our libcamera.so is using the Overlay interface in cm7 frameworks, which appears to load a binary liboverlay.so. This probably explains why there aren't some functions in our overlayLib.c, it's probably not from the same place.

I think the next step is probably trying to use the binary liboverlay.so from cm7.

EDIT: Spoke too soon once again, it looks like we do have overlayLib source in cm7, quite a bit different than current cm9 sources, though.
 
Back
Top Bottom