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

This is completely out of topic but I would appreciate if someone could help me.

I dropped and broke my Triumph so I'm getting a replacement one, and I was wondering if the nandroid backups I've made so far are going to work with the new phone? Also if I would need to restore the phone back to the "original stock VM rom" and stock recovery.
Thanks for all the help in advance guys.
 
This is completely out of topic but I would appreciate if someone could help me.

I dropped and broke my Triumph so I'm getting a replacement one, and I was wondering if the nandroid backups I've made so far are going to work with the new phone? Also if I would need to restore the phone back to the "original stock VM rom" and stock recovery.
Thanks for all the help in advance guys.
Sorry about the phone. Restoring your previous backups to your replacement should work fine, as long as you still have those backups. Same exact phone and hardware. There may be some conflicts, such as having a different serial number and things like that.
Not sure I understand your second question.
 
This is completely out of topic but I would appreciate if someone could help me.

I dropped and broke my Triumph so I'm getting a replacement one, and I was wondering if the nandroid backups I've made so far are going to work with the new phone? Also if I would need to restore the phone back to the "original stock VM rom" and stock recovery.
Thanks for all the help in advance guys.

Backups should work fine I think, and VM doesn't care about the stock image on the original phone. If you want to and are able to, it doesn't hurt to do it.
 
Sorry about the phone. Restoring your previous backups to your replacement should work fine, as long as you still have those backups. Same exact phone and hardware. There may be some conflicts, such as having a different serial number and things like that.
Not sure I understand your second question.

Backups should work fine I think, and VM doesn't care about the stock image on the original phone. If you want to and are able to, it doesn't hurt to do it.

Thanks guys you answered all my questions I appreciate it! You guys rock!
 
ZipLip, there haven't been many updates lately on the camera because MikeRL is sick with (and correct me if I'm wrong) bronchitis. Or maybe the Lupus. I don't know.

There haven't been any updates because I am stupid busy and the heavy hitters have left for the Evo V. I have been trying to learn how to make Android apps so I can maybe build and correctostuff as things arise.

Like I said, I'm stupid busy (emphisis on the stupid part) with life, work and family. I wanted to spit out some ROMs to get them out there, but I don't just want to put out what is already out there without making some kind of usefull change.

Watch out for what BSydz and Rukin are doing as they have been rocking some code for JB.
 
I installed CM9 to check out the camera status. Did some poking around and it seems that the camera may be crapping out at auto-focus. You can leave camera open all day and it will work fine, but when you click the button to take a picture the first thing to pop up in logcat is:
[HIGH]
V/FocusManager(20420): Start autofocus.
I/CameraHAL( 131): camera_auto_focus+++: device 0x19130
[/HIGH]
The camera continues to display to the screen then you get the ANR dialog and some more info in logcat. If you force close the camera continues to run in the background. When starting the camera app I see "E/QualcommCameraHardware( 131): AutoFocus is not supported" in logcat which could be why it's timing out during focus even though the camera does support autofocus.

The video orientation is not rotated correctly in the camera app. During startup you can see both cameras detected and one has "orientation=180". If I'm not mistaken cam ID 0 is the rear and cam ID 1 is the front. Can you make the rear camera rotate correctly or am I not identifying these correctly?

I have the full logcat and traces here:
http://mozzwald.homelinux.net/triumph/cam-logcat.txt
http://mozzwald.homelinux.net/triumph/cam-traces.txt

On a side note, is there an mtdev irc channel? I'm always on freenode and would be nice to toss ideas in a live environment instead of a forum.
 
I installed CM9 to check out the camera status. Did some poking around and it seems that the camera may be crapping out at auto-focus. You can leave camera open all day and it will work fine, but when you click the button to take a picture the first thing to pop up in logcat is:
[HIGH]
V/FocusManager(20420): Start autofocus.
I/CameraHAL( 131): camera_auto_focus+++: device 0x19130
[/HIGH]
The camera continues to display to the screen then you get the ANR dialog and some more info in logcat. If you force close the camera continues to run in the background. When starting the camera app I see "E/QualcommCameraHardware( 131): AutoFocus is not supported" in logcat which could be why it's timing out during focus even though the camera does support autofocus.

The video orientation is not rotated correctly in the camera app. During startup you can see both cameras detected and one has "orientation=180". If I'm not mistaken cam ID 0 is the rear and cam ID 1 is the front. Can you make the rear camera rotate correctly or am I not identifying these correctly?

I have the full logcat and traces here:
http://mozzwald.homelinux.net/triumph/cam-logcat.txt
http://mozzwald.homelinux.net/triumph/cam-traces.txt

On a side note, is there an mtdev irc channel? I'm always on freenode and would be nice to toss ideas in a live environment instead of a forum.

I've always wanted to join an MTDEV irc channel, as I am frequently on freenode as well. Unfortunately when I talked to G60 he said that he could not start one because his work blocks IRC communications and his phone didn't get good enough reception to use AndChat. Some of the best dev work I've done came form bouncing ideas in an IRC chatroom. If you want to start one, that would be cool. I can't promise I'd be on it 24/7 but I would definitely frequent it.
 
I installed CM9 to check out the camera status. Did some poking around and it seems that the camera may be crapping out at auto-focus. You can leave camera open all day and it will work fine, but when you click the button to take a picture the first thing to pop up in logcat is:
[HIGH]
V/FocusManager(20420): Start autofocus.
I/CameraHAL( 131): camera_auto_focus+++: device 0x19130
[/HIGH]
The camera continues to display to the screen then you get the ANR dialog and some more info in logcat. If you force close the camera continues to run in the background. When starting the camera app I see "E/QualcommCameraHardware( 131): AutoFocus is not supported" in logcat which could be why it's timing out during focus even though the camera does support autofocus.

The video orientation is not rotated correctly in the camera app. During startup you can see both cameras detected and one has "orientation=180". If I'm not mistaken cam ID 0 is the rear and cam ID 1 is the front. Can you make the rear camera rotate correctly or am I not identifying these correctly?

I have the full logcat and traces here:
http://mozzwald.homelinux.net/triumph/cam-logcat.txt
http://mozzwald.homelinux.net/triumph/cam-traces.txt

On a side note, is there an mtdev irc channel? I'm always on freenode and would be nice to toss ideas in a live environment instead of a forum.
Yeah, and it craps out after the focus too. I remade the camera app with the focus commented out and got a click.
Since then I haven't had time to look at anything. Not like ir really know what I'm doing. (I do appreciate the encouragement guys). If you entry, I can tell you what little I do know. PM me
 
Yeah, and it craps out after the focus too. I remade the camera app with the focus commented out and got a click.
Since then I haven't had time to look at anything. Not like ir really know what I'm doing. (I do appreciate the encouragement guys). If you entry, I can tell you what little I do know. PM me

It seems to stop when the autofocus call is sent to the camera. Do you have your remade camera app somewhere for download? I still haven't setup a build environment yet (other than kernel).

I've always wanted to join an MTDEV irc channel, as I am frequently on freenode as well. Unfortunately when I talked to G60 he said that he could not start one because his work blocks IRC communications and his phone didn't get good enough reception to use AndChat. Some of the best dev work I've done came form bouncing ideas in an IRC chatroom. If you want to start one, that would be cool. I can't promise I'd be on it 24/7 but I would definitely frequent it.

I jumped into an empty #mtdev channel on irc.freenode.net if anyone wants to join. There's a logbot there so you can read what happened while your gone (irc.freenode.net logfiles - www.mozzwald.com). Not sure if it works behind a firewall but there is a webchat for irc at freenode Web IRC (qwebirc)

To get around my firewall at work I ssh to my home linux server and always have irssi running.
 
It seems to stop when the autofocus call is sent to the camera. Do you have your remade camera app somewhere for download? I still haven't setup a build environment yet (other than kernel).



I jumped into an empty #mtdev channel on irc.freenode.net if anyone wants to join. There's a logbot there so you can read what happened while your gone (irc.freenode.net logfiles - www.mozzwald.com). Not sure if it works behind a firewall but there is a webchat for irc at freenode Web IRC (qwebirc)

To get around my firewall at work I ssh to my home linux server and always have irssi running.

If I have the app still I'll post it for you. I didn't commit the change as I just wanted to do the one thing. As far as IRC, I haven't done one before LOL I would have to look it up,
 
I installed CM9 to check out the camera status. Did some poking around and it seems that the camera may be crapping out at auto-focus. You can leave camera open all day and it will work fine, but when you click the button to take a picture the first thing to pop up in logcat is:

Auto focus was disabled at QualcommCameraHardware.cpp:759 (that false is an auto focus bool). I turned this on, and it's getting a bit further, still failing. It's getting into takePicture(), but is getting receive_camframe_error_timeout, which is coming from the blob.
 
Auto focus was disabled at QualcommCameraHardware.cpp:759 (that false is an auto focus bool). I turned this on, and it's getting a bit further, still failing. It's getting into takePicture(), but is getting receive_camframe_error_timeout, which is coming from the blob.

Tested this out tonight. It does try to autofocus (I can hear the camera focusing) then it will sit indefinitely until you touch the screen then it prompts to close the camera app. I previously tested dsmryder's camera.apk with focusing disabled and it would at least flash before trying to take picture. I made sure to turn on flash with this test and it does not flash after/during focusing.
 
Auto focus was disabled at QualcommCameraHardware.cpp:759 (that false is an auto focus bool). I turned this on, and it's getting a bit further, still failing. It's getting into takePicture(), but is getting receive_camframe_error_timeout, which is coming from the blob.

Thanks guys. If I knew more about this I would have probably have seen this easily, sounds like you did. If there is anything I can do for you, let me know.
 
Auto focus was disabled at QualcommCameraHardware.cpp:759 (that false is an auto focus bool). I turned this on, and it's getting a bit further, still failing. It's getting into takePicture(), but is getting receive_camframe_error_timeout, which is coming from the blob.
What are you talking about when you say "the blob"?
Tested this out tonight. It does try to autofocus (I can hear the camera focusing) then it will sit indefinitely until you touch the screen then it prompts to close the camera app. I previously tested dsmryder's camera.apk with focusing disabled and it would at least flash before trying to take picture. I made sure to turn on flash with this test and it does not flash after/during focusing.
So are you guys, building the ROM or just the module? If you are building the ROM, you need to delete the libcamera.so and rename licamera2.so to libcamera.so. You will also want to put any changes from camerhal in to libcamera2, that is the libcamera2.so we build.

One thing I was working on was getting away from the htcoverlay and using a proper overlay.cpp and .h, but now for the life of me I can't figure out where I got the overlay files from, I think it was mantera. But when I use that overlay, the cameraHal has errors about being able to dequeue the buffer, but works just like with the htcoverlay.

Gotta go, just thought I would throw those couple things out there.
 
What are you talking about when you say "the blob"?

A 'blob' is the proprietary precompiled drivers that interface with the hardware and is provided by the manufacturer.

So are you guys, building the ROM or just the module? If you are building the ROM, you need to delete the libcamera.so and rename licamera2.so to libcamera.so. You will also want to put any changes from camerhal in to libcamera2, that is the libcamera2.so we build.

I didn't know that needed to be done. Why don't we just replace libcamera sources with libcamera2? Or were you just trying to keep things separate until we find what works?

I notice now that there's several places where QualcommCameraHardware.cpp exists (hardware/qcom/camerahal, hardware/qcom/libcamera2, hardware/msm7k/libcamera) and there are some differences b/w the files. Are these all being built and used? Can we just symlink the files so there's only one copy that needs to be modified? Not sure if the compiler will complain about that.
 
A 'blob' is the proprietary precompiled drivers that interface with the hardware and is provided by the manufacturer.



I didn't know that needed to be done. Why don't we just replace libcamera sources with libcamera2? Or were you just trying to keep things separate until we find what works?

I notice now that there's several places where QualcommCameraHardware.cpp exists (hardware/qcom/camerahal, hardware/qcom/libcamera2, hardware/msm7k/libcamera) and there are some differences b/w the files. Are these all being built and used? Can we just symlink the files so there's only one copy that needs to be modified? Not sure if the compiler will complain about that.

Unless someone tells me not to, I'll make sure the libraries are the set wee used in CM7. I have already checked their dependencies so i know they are complete.
 
What are you talking about when you say "the blob"?

So are you guys, building the ROM or just the module? If you are building the ROM, you need to delete the libcamera.so and rename licamera2.so to libcamera.so. You will also want to put any changes from camerhal in to libcamera2, that is the libcamera2.so we build.

One thing I was working on was getting away from the htcoverlay and using a proper overlay.cpp and .h, but now for the life of me I can't figure out where I got the overlay files from, I think it was mantera. But when I use that overlay, the cameraHal has errors about being able to dequeue the buffer, but works just like with the htcoverlay.

Gotta go, just thought I would throw those couple things out there.

mozzwald is right, in our case the blob is liboemcamera.so. You will see in QualcommCameraHardware, this library is dlopen()ed and these LINK_* functions are the blob interface. I was trying to track this down a little bit, but couldn't figure this out: where did our liboemcamera.so come from? It may be important that it is in sync with the kernel camera code and QualcommCameraHardware. Do you know if what we have checked in for these three pieces is from the same place?

Ah I was wondering about libcamera.so/libcamera2.so. I was going to try the other one but ran out of time last night.

Hmm, don't know much about overlays yet. Is there a problem with the htcoverlay?
 
Unless someone tells me not to, I'll make sure the libraries are the set wee used in CM7. I have already checked their dependencies so i know they are complete.

Just to make sure I understand, the cm9 kernel now has the original motorola camera code? If so, that makes sense, and also please check liboemcamera.so.
 
I've tried both libcamera and libcamera2, tried the cm9, cm7, and stock liboemcamera.so. Same results with all. QualcommCameraHardware enters native_stop_video() and is getting hung up there (the ioctl is failing):

V/QualcommCameraHardware( 131): enableMsgType E
V/QualcommCameraHardware( 131): takePicture(463)
I/QualcommCameraHardware( 131): stopPreviewInternal E: 1
V/QualcommCameraHardware( 131): cancelAutoFocusInternal E
V/QualcommCameraHardware( 131): cancelAutoFocusInternal X: not in progress
V/QualcommCameraHardware( 131): in native_stop_video
I/QualcommCameraHardware( 131): native_stop_video: E
D/AudioHardwareMSM7X30( 131): msm_route_stream(PCM_PLAY,5,8,1)
D/AudioHardwareMSM7X30( 131): AudioStreamOutMSM72xx::standby()
D/AudioHardwareMSM7X30( 131): Deroute pcm out stream
E/AudioHardwareMSM7X30( 131): updateDeviceInfo: E rx_device 6 and tx_device 11
D/AudioHardwareMSM7X30( 131): No active voicecall/playback, disabling cur_rx 6
D/AudioHardwareMSM7X30( 131): value of device and enable is 6 0 ALSA dev id:8
D/AudioHardwareMSM7X30( 131): No active voicecall/recording, disabling cur_tx 11
D/AudioHardwareMSM7X30( 131): value of device and enable is 11 0 ALSA dev id:17
E/AudioHardwareMSM7X30( 131): updateDeviceInfo: X cur_rx 6 cur_tx 11
I/InputDispatcher( 234): Application is not responding: Window{2bc388c0 com.android.camera/com.android.camera.Camera paused=false}. 5017.0ms since event, 5009.7ms since wait started
I/Process ( 234): Sending signal. PID: 760 SIG: 3
I/dalvikvm( 760): threadid=3: reacting to signal 3
I/dalvikvm( 760): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 234): Sending signal. PID: 234 SIG: 3
I/dalvikvm( 234): threadid=3: reacting to signal 3
I/dalvikvm( 234): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 234): Sending signal. PID: 315 SIG: 3
I/dalvikvm( 315): threadid=3: reacting to signal 3
I/dalvikvm( 315): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 234): Sending signal. PID: 390 SIG: 3
I/dalvikvm( 390): threadid=3: reacting to signal 3
I/dalvikvm( 390): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 234): Jit: resizing JitTable from 4096 to 8192
D/dalvikvm( 234): GC_EXPLICIT freed 1589K, 40% free 4640K/7623K, paused 3ms+5ms
V/QualcommCameraHardware( 131): getInstance E
I/QualcommCameraHardware( 131): receive_camframe_error_timeout: E
I/Process ( 234): Sending signal. PID: 358 SIG: 3
I/dalvikvm( 358): threadid=3: reacting to signal 3
I/dalvikvm( 358): Wrote stack traces to '/data/anr/traces.txt'
E/ActivityManager( 234): ANR in com.android.camera (com.android.camera/.Camera)
E/ActivityManager( 234): Reason: keyDispatchingTimedOut
E/ActivityManager( 234): Load: 10.07 / 3.5 / 1.25
E/ActivityManager( 234): CPU usage from 9160ms to 3170ms ago:
E/ActivityManager( 234): 9.1% 358/android.process.media: 6.5% user + 2.6% kernel / faults: 65 minor
E/ActivityManager( 234): 2.6% 131/mediaserver: 1.5% user + 1.1% kernel / faults: 39 minor
E/ActivityManager( 234): 2.5% 128/surfaceflinger: 1.3% user + 1.1% kernel / faults: 3 minor
E/ActivityManager( 234): 1.6% 234/system_server: 1.5% user + 0.1% kernel / faults: 22 minor
E/ActivityManager( 234): 1.5% 760/com.android.camera: 1.1% user + 0.3% kernel / faults: 264 minor
E/ActivityManager( 234): 1.1% 102/mmcqd: 0% user + 1.1% kernel
E/ActivityManager( 234): 1.1% 154/adbd: 0.1% user + 1% kernel
E/ActivityManager( 234): 0.6% 16/kinteractiveup: 0% user + 0.6% kernel
E/ActivityManager( 234): 0.6% 17/knteractive_dow: 0.6% user + 0% kernel
E/ActivityManager( 234): 0.6% 745/logcat: 0.3% user + 0.3% kernel
E/ActivityManager( 234): 0.5% 52/kgsl-3d0/0: 0% user + 0.5% kernel
E/ActivityManager( 234): 0.5% 96/mmcqd: 0% user + 0.5% kernel
E/ActivityManager( 234): 0.5% 749/logcat: 0.1% user + 0.3% kernel
E/ActivityManager( 234): 0.1% 4/events/0: 0% user + 0.1% kernel
E/ActivityManager( 234): 0% 93/acdb_cb_thread: 0% user + 0% kernel
E/ActivityManager( 234): 0% 127/rild: 0% user + 0% kernel
E/ActivityManager( 234): 0% 315/com.android.systemui: 0% user + 0% kernel / faults: 14 minor
E/ActivityManager( 234): 0% 390/com.android.phone: 0% user + 0% kernel / faults: 16 minor
E/ActivityManager( 234): 98% TOTAL: 12% user + 8.6% kernel + 77% iowait
E/ActivityManager( 234): CPU usage from 528ms to 1045ms later:
E/ActivityManager( 234): 5.8% 358/android.process.media: 2.9% user + 2.9% kernel / faults: 4 minor
E/ActivityManager( 234): 5.8% 722/MediaScannerSer: 2.9% user + 2.9% kernel
E/ActivityManager( 234): 5.6% 234/system_server: 1.8% user + 3.7% kernel
E/ActivityManager( 234): 3.7% 268/InputDispatcher: 1.8% user + 1.8% kernel
E/ActivityManager( 234): 100% TOTAL: 7.6% user + 5.7% kernel + 86% iowait
D/dalvikvm( 234): GC_FOR_ALLOC freed 755K, 40% free 4632K/7623K, paused 42ms
I/dalvikvm-heap( 234): Grow heap (frag case) to 13.182MB for 635812-byte allocation
I/Adreno200-EGLSUB( 128): <CreateImage:893>: Android Image
I/Adreno200-EGLSUB( 128): <GetImageAttributes:1102>: RGBA_8888
I/Adreno200-EGLSUB( 128): <CreateImage:893>: Android Image
I/Adreno200-EGLSUB( 128): <GetImageAttributes:1102>: RGBA_8888
I/InputDispatcher( 234): Dropped event because the current application is not responding and the user has started interacting with a different application.
W/ActivityManager( 234): Force finishing activity com.android.camera/.Camera
D/AudioHardwareMSM7X30( 131): value of device and enable is 6 1 ALSA dev id:8
I/ActivityManager( 234): Killing ProcessRecord{2bc2e2e8 760:com.android.camera/10007}: user's request
W/AudioFlinger( 131): session id 9 not found for pid 131
I/WindowManager( 234): WIN DEATH: Window{2bc388c0 com.android.camera/com.android.camera.Camera paused=true}
I/ActivityManager( 234): Process com.android.camera (pid 760) has died.
I/WindowManager( 234): WIN DEATH: Window{2bc39a58 SurfaceView paused=false}
I/Adreno200-EGLSUB( 410): <ConfigWindowMatch:2078>: Format RGBA_8888.
D/AudioHardwareMSM7X30( 131): msm_route_stream(PCM_PLAY,5,8,1)
W/InputManagerService( 234): Got RemoteException sending setActive(false) notification to pid 760 uid 10007
I/Adreno200-EGLSUB( 128): <CreateImage:893>: Android Image
I/Adreno200-EGLSUB( 128): <GetImageAttributes:1102>: RGBA_8888
E/QualcommCameraHardware( 131): native_stop_video: ioctl failed. ioctl return value is -1
E/QualcommCameraHardware( 131): stopPreviewInternal: failed to stop preview
I/QualcommCameraHardware( 131): stopPreviewInternal X: 1
V/QualcommCameraHardware( 131): mSnapshotFormat = PICTURE_FORMAT_JPEG
V/QualcommCameraHardware( 131): initRaw E
V/QualcommCameraHardware( 131): initRaw E: picture size=2592x1944
V/QualcommCameraHardware( 131): Thumbnail Size Width 320 Height 240
V/QualcommCameraHardware( 131): native_set_parm: fd 27, type 1, length 88
E/QualcommCameraHardware( 131): Camframe timed out. Not receiving any frames from camera driver
V/QualcommCameraHardware( 131): initRaw, jpeg_rotation = 0
V/QualcommCameraHardware( 131): initRaw: yOffset = 0, mCbCrOffsetRaw = 5059584, mRawSize = 7589376
D/dalvikvm( 358): GC_CONCURRENT freed 1683K, 60% free 2859K/7107K, paused 4ms+4ms
 
Back
Top Bottom