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

adamto,

I just got done doing a test build as dorrey made some changes to the code. On top of his changes I also rolled back our egl files as well back to mantera's

https://github.com/mantera/android_device_motorola_triumph/blob/ics/device_triumph.mk#L185-L194

and removed the following files

https://github.com/MTCM9/android_vendor_motorola_triumph/blob/ics/triumph-vendor-blobs.mk#L164-L230

Also I also removed MISSING_GRALLOC_BUFFERS from the boardconfig per dorrey (I have not pushed all my changes as of yet until I hear back from dorrey)

I did NOT get a crash this time in the camera, however the phone still crashed not sure what to look at now? Here is the logcat

Edit: never mind the camera app still crashed just didn't seen it :p


MTCM9 - Pastebin.com

and here is the ROM
Index of /alpha

Also I deleted the stock libcamera.so and replaced it with the libcamera2.so. camtest didn't build right so I deleted it from the build as it kept having errors.
 
All,

Dorregaray has been in contact with me again. He is making updates once again with the CameraHal and libcamera drivers for the Triumph. He is an incredible individual with lending time to our Team. As long as is he is assisting I will continue to make this my priority! Just so everyone knows with out his help I wouldn't be able to do this work. I will continue to post on here with the updates if we make any. Here is hoping :D
 
All,

Dorregaray has been in contact with me again. He is making updates once again with the CameraHal and libcamera drivers for the Triumph. He is an incredible individual with lending time to our Team. As long as is he is assisting I will continue to make this my priority! Just so everyone knows with out his help I wouldn't be able to do this work. I will continue to post on here with the updates if we make any. Here is hoping :D

That's dedication right there...new evo and still doing it for the triumph...I switched and got galaxy s3 but I'm keeping my triumph...if you need help with testing let me know...I will continue checking in here to help when I can...good luck!
 
All,

Dorregaray has been in contact with me again. He is making updates once again with the CameraHal and libcamera drivers for the Triumph. He is an incredible individual with lending time to our Team. As long as is he is assisting I will continue to make this my priority! Just so everyone knows with out his help I wouldn't be able to do this work. I will continue to post on here with the updates if we make any. Here is hoping :D

I told him you gave up on cam fix to learn more c++. Apparently he found this unnacceptable. Lol. Glad to see he is still lookin at MT. He just release preview one for cm10 on touchpad. Works a lot. Could already be on preview 2 and I don't know it...
 
All,

Dorregaray has been in contact with me again. He is making updates once again with the CameraHal and libcamera drivers for the Triumph. He is an incredible individual with lending time to our Team. As long as is he is assisting I will continue to make this my priority! Just so everyone knows with out his help I wouldn't be able to do this work. I will continue to post on here with the updates if we make any. Here is hoping :D

You and dorregaray have probably already seen this, but here it is anyway: http://forum.xda-developers.com/showpost.php?p=24455374&postcount=2005
 
Well, I just went through and stripped the Triumph stock libcamera.so. I don't know if this will help, but I sure hope so, cause this was a major pain in the butt. I isolated all text contained in the libcamera.so and made it in to a text file so that anybody can use it for reference. I still have no working knowledge of writing drivers but maybe this will help the cause or myself in the future.

Maybe you didn't know about them, but there are some compiler tools to do this for you. The 'strings' command will strip the text out, which it sounds like you did by hand (yuck!). Also, there is the 'readelf' command, which extracts dynamic symbols from an object file (option -s), even if the debugging symbols aren't there. 'objdump' can be useful sometimes as well. If you need the cross compiler version of these commands, they will be arm-ebi-strings or whatnot, but for strings and ELF sections you generally don't need the cross compiler.
 
adamto,
I did NOT get a crash this time in the camera, however the phone still crashed not sure what to look at now? Here is the logcat

Edit: never mind the camera app still crashed just didn't seen it :p

If you want to stop the Camera app from crashing just remove that mCameraFacing logic from CameraPicker.java and replace with:

[HIGH]
mCameraFacing = CameraInfo.CAMERA_FACING_BACK;
[/HIGH]But, I imagine the driver will continue to crash.
 
Maybe you didn't know about them, but there are some compiler tools to do this for you. The 'strings' command will strip the text out, which it sounds like you did by hand (yuck!). Also, there is the 'readelf' command, which extracts dynamic symbols from an object file (option -s), even if the debugging symbols aren't there. 'objdump' can be useful sometimes as well. If you need the cross compiler version of these commands, they will be arm-ebi-strings or whatnot, but for strings and ELF sections you generally don't need the cross compiler.

I'm way behind the other guys. How do you use theese? Would this be run from the build line?
Code:
. build/envsetup.sh && brunch [COLOR=red][B]-s[/B][/COLOR] triumph
 
I'm way behind the other guys. How do you use theese? Would this be run from the build line?
Code:
. build/envsetup.sh && brunch [COLOR=red][B]-s[/B][/COLOR] triumph

Sourcing the envsetup will get you the cross compiler commands, if that's what you're asking. They'll either be arm-none-linux-gnueabi-xxx or arm-eabi-xxx, or you may have both.

The brunch will build everything, but you don't need to do that part to just get the cross compiler executables in your PATH.
 
Sourcing the envsetup will get you the cross compiler commands, if that's what you're asking. They'll either be arm-none-linux-gnueabi-xxx or arm-eabi-xxx, or you may have both.

The brunch will build everything, but you don't need to do that part to just get the cross compiler executables in your PATH.

OK, I'm still kind of a "copy and paster". So as far as I understand it, it's more like when I build a kernel. Where I set PATH=(path to the cross compiler). Instead of setting the path, I just run the program?
 
OK, I'm still kind of a "copy and paster". So as far as I understand it, it's more like when I build a kernel. Where I set PATH=(path to the cross compiler). Instead of setting the path, I just run the program?

You may want to read a basic Linux command line tutorial, but yeah you just run the command, and they usually take a couple arguments, one of which is the file to run on. Most commands will take "-h" for a help listing. So, you might use: "arm-eabi-readelf -s libcamera.so".
 
You may want to read a basic Linux command line tutorial, but yeah you just run the command, and they usually take a couple arguments, one of which is the file to run on. Most commands will take "-h" for a help listing. So, you might use: "arm-eabi-readelf -s libcamera.so".

Yeah, before I started building I dabbled in Linux. The learning curve has been trumendus, but fun in it's own way. I do appreciate the hand holding:D
I think this will be it for the night for me. i hope my next questions will be more inteligent.
 
Maybe you didn't know about them, but there are some compiler tools to do this for you. The 'strings' command will strip the text out, which it sounds like you did by hand (yuck!). Also, there is the 'readelf' command, which extracts dynamic symbols from an object file (option -s), even if the debugging symbols aren't there. 'objdump' can be useful sometimes as well. If you need the cross compiler version of these commands, they will be arm-ebi-strings or whatnot, but for strings and ELF sections you generally don't need the cross compiler.
Thank you. Yeah, that was all hand picked. :( I just started using linux around May when I jacked my phone up. I don't have any knowledge about commands except what I have learned by google search. Thanks again for the tip.
If you want to stop the Camera app from crashing just remove that mCameraFacing logic from CameraPicker.java and replace with:

[HIGH]
mCameraFacing = CameraInfo.CAMERA_FACING_BACK;
[/HIGH]But, I imagine the driver will continue to crash.
These are the errors I get, but camera still works, on the Sharp ROM with a kernel I just finished porting from our sister device. I figure if these are some of the same errors, it might save some time, if they don't matter.

[HIGH]E/Camera ( 905): open rear Camera
E/QualcommCameraHardware( 119): len =1
E/QualcommCameraHardware( 119): sub_camera =0
E/QualcommCameraHardware( 119): Camera device FD: 30
E/mt9p111 ( 119): Inside mt9p111_process_start
E/mt9p111 ( 119): [user] mt9p111_video_config, sfd = 31
E/QualcommCameraHardware( 119): createInstance: enable_test_mode =1
E/mt9p111 ( 119): [user] Entered mt9p111_set_effect, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting effect to 0
E/QualcommCameraHardware( 119): setEffect 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_sharpness, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting sharpness mode to 2
E/mt9p111 ( 119): [user] Entered mt9p111_set_saturation, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting saturation mode to 2
E/mt9p111 ( 119): mt9p111_set_CAF, CAF = 0
E/mm-camera( 119): config_proc_CAMERA_SET_PARM_AEC_ROI: By location (-1,-1)
E/QualcommCameraHardware( 119): native_set_parm: error (No such file or directory): fd 30, type 63, length 16, status 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_antibanding, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting antibanding to 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_exposure_mode, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting exposure mode to 0
E/QualcommCameraHardware( 119): setWhiteBalance= 1
E/mt9p111 ( 119): [user] Entered mt9p111_set_wb, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting wb to 1
E/mt9p111 ( 119): [user] Entered mt9p111_set_ledmod, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting ledmod to 1
E/mt9p111 ( 119): [user] Entered mt9p111_set_brightness, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting brightness to 3
E/mt9p111 ( 119): mt9p111_set_iso, ctrl->sfd = 31, iso = 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_effect, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting effect to 0
E/QualcommCameraHardware( 119): setEffect 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_sharpness, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting sharpness mode to 2
E/mt9p111 ( 119): [user] Entered mt9p111_set_saturation, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting saturation mode to 2
E/mt9p111 ( 119): mt9p111_set_CAF, CAF = 0
E/QualcommCameraHardware( 119): getTouchIndexAec: x=-1 y=-1
E/mm-camera( 119): config_proc_CAMERA_SET_PARM_AEC_ROI: By location (-1,-1)
E/QualcommCameraHardware( 119): native_set_parm: error (No such file or directory): fd 30, type 63, length 16, status 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_antibanding, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting antibanding to 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_exposure_mode, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting exposure mode to 0
E/QualcommCameraHardware( 119): setWhiteBalance= 1
E/mt9p111 ( 119): [user] Entered mt9p111_set_ledmod, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting ledmod to 1
E/mt9p111 ( 119): mt9p111_set_iso, ctrl->sfd = 31, iso = 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_effect, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting effect to 0
E/QualcommCameraHardware( 119): setEffect 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_sharpness, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting sharpness mode to 2
E/mt9p111 ( 119): [user] Entered mt9p111_set_saturation, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting saturation mode to 2
E/mt9p111 ( 119): mt9p111_set_CAF, CAF = 0
E/QualcommCameraHardware( 119): getTouchIndexAec: x=-1 y=-1
E/mm-camera( 119): config_proc_CAMERA_SET_PARM_AEC_ROI: By location (-1,-1)
E/QualcommCameraHardware( 119): native_set_parm: error (Unknown error: 0): fd 30, type 63, length 16, status 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_antibanding, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting antibanding to 3
E/mt9p111 ( 119): [user] Entered mt9p111_set_exposure_mode, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting exposure mode to 0
E/QualcommCameraHardware( 119): setWhiteBalance= 1
E/mt9p111 ( 119): [user] Entered mt9p111_set_ledmod, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting ledmod to 1
E/mt9p111 ( 119): mt9p111_set_iso, ctrl->sfd = 31, iso = 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_effect, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting effect to 0
E/QualcommCameraHardware( 119): setEffect 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_sharpness, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting sharpness mode to 2
E/mt9p111 ( 119): [user] Entered mt9p111_set_saturation, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting saturation mode to 2
E/mt9p111 ( 119): mt9p111_set_CAF, CAF = 0
E/QualcommCameraHardware( 119): getTouchIndexAec: x=-1 y=-1
E/mm-camera( 119): config_proc_CAMERA_SET_PARM_AEC_ROI: By location (-1,-1)
E/QualcommCameraHardware( 119): native_set_parm: error (No such file or directory): fd 30, type 63, length 16, status 0
E/mt9p111 ( 119): [user] Entered mt9p111_set_antibanding, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting antibanding to 3
E/mt9p111 ( 119): [user] Entered mt9p111_set_exposure_mode, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting exposure mode to 0
E/QualcommCameraHardware( 119): setWhiteBalance= 1
E/mt9p111 ( 119): [user] Entered mt9p111_set_ledmod, ctrl->sfd = 31, op_mode = 3
E/mt9p111 ( 119): [user] Setting ledmod to 1
E/mt9p111 ( 119): mt9p111_set_iso, ctrl->sfd = 31, iso = 0
E/mm-camera( 119): config_proc_CAMERA_STOP_SNAPSHOT: ctrl->state = 25
E/OverlayLIB( 217): setPosition failed
[/HIGH]
 
These are the errors I get, but camera still works, on the Sharp ROM with a kernel I just finished porting from our sister device. I figure if these are some of the same errors, it might save some time, if they don't matter.

We are getting an exception that closes the camera app. I believe some xml is misconfigured somewhere, but it doesn't matter too much because there is a pretty easy code workaround.

Unfortunately the phone reboots just as the camera driver is starting the data transfer and we are kind of stuck there.
 
We are getting an exception that closes the camera app. I believe some xml is misconfigured somewhere, but it doesn't matter too much because there is a pretty easy code workaround.

Unfortunately the phone reboots just as the camera driver is starting the data transfer and we are kind of stuck there.

I know I'm talking out my left butt cheek, but would it be resonable to put in needless delays to the camera driver chain? That way it might be possible to see the exact part that failes. I know it's possible, I just don't know how hard it would be.
 
We are getting an exception that closes the camera app. I believe some xml is misconfigured somewhere, but it doesn't matter too much because there is a pretty easy code workaround.

Unfortunately the phone reboots just as the camera driver is starting the data transfer and we are kind of stuck there.

Did you get warnings when you compiled the source code? Maybe some syntax error causing it to crash? But yeah. It's kind of hard to know without seeing the error.
 
Yeah, before I started building I dabbled in Linux. The learning curve has been trumendus, but fun in it's own way. I do appreciate the hand holding:D
I think this will be it for the night for me. i hope my next questions will be more inteligent.
There is no such thing as a dumb question :-)
 
mmm, 5 days with no update... bummer peewee, oh well cm7 has been working pretty good for me. by pretty good I mean not as great as cm9 but damn great any way. Even if this is what I had to work with on my phone I'd keep my phone for another year. Thanks MUCH!
 
mmm, 5 days with no update... bummer peewee, oh well cm7 has been working pretty good for me. by pretty good I mean not as great as cm9 but damn great any way. Even if this is what I had to work with on my phone I'd keep my phone for another year. Thanks MUCH!

Yeah, we have our own angles to development. My idea is to get one going then build upon that. It doesn't help that CM7 and CM9 are so different. I do plan on working on CM9 more in the future. Just not this year. I think chairshot's work will translate well. Then he might move on to CM9. We'll see if he chimes in.
 
mmm, 5 days with no update... bummer peewee, oh well cm7 has been working pretty good for me. by pretty good I mean not as great as cm9 but damn great any way. Even if this is what I had to work with on my phone I'd keep my phone for another year. Thanks MUCH!

Yes I'm in the same line of thinking, hope is fading for CM9/CM10 camera working :(

Still, much thanks for all the hard work by the developers to get where we are now with all the different ROMs so we aren't stuck with stock.
 
Yes I'm in the same line of thinking, hope is fading for CM9/CM10 camera working :(

Still, much thanks for all the hard work by the developers to get where we are now with all the different ROMs so we aren't stuck with stock.

CM9 is still in the works, it's just not my priorety. And I think it's not the other DEV's either. I know that when I get a couple of things done on my end I plan on playing with CM9. I can't promise that I'll work real hard on the camera, but I have some ideas that should improve CM9. And if the other DEVs work on it too then we'll have an even more improved CM9.
 
I want the most stable/reliable CM9 out there.. So which one is better, the CM9 MTDEV from 11/13 or this one? Thanks.


I was using the 11\13 and having no issues. Which other one are you referring to? Right now I'm on the most current cm7...gotta say I like having a camera.. also have 2young kids though. ;)
 
I was using the 11\13 and having no issues. Which other one are you referring to? Right now I'm on the most current cm7...gotta say I like having a camera.. also have 2young kids though. ;)

He isn't referring to anything at all, "this" isn't a rom, only a dev thread for working on the camera specifically to my knowledge. Especially since the topic of the thread states it :D
 
He isn't referring to anything at all, "this" isn't a rom, only a dev thread for working on the camera specifically to my knowledge. Especially since the topic of the thread states it :D

I don't want to cause to much chaos, but if you look hard enough in this thread there is a ROM I posted :D

Edit looks to be the first post on page 7...
 
Back
Top Bottom