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

There are going to be issues. This phone is black sheep of moto phones. There was never a proper source for this phone.

Black sheep? More like "bastard stepchild". :)

Don't get me wrong- I spent a year with the little SOB & grew to love it. Then hate it. Then love it again when I didn't think I could. Then the heavens parted & the wife saith "get thyself a new phone". Amen.
 
Upvote 0
11-08 05:21:31.476: E/HAL(129): load: module=/system/lib/hw/camera.msm7x30.so
11-08 05:21:31.476: E/HAL(129): Cannot load library: link_image[1965]: 129 could not load needed library 'libcamera.so' for 'camera.msm7x30.so' (reloc_library[1314]: 129 cannot locate '_ZN7android7Overlay5setFdEi'...
11-08 05:21:31.476: E/HAL(129): )
11-08 05:21:31.476: E/CameraService(129): Could not load camera HAL module

Following tjstyle camera hal.. we (fb0) use /system/lib/hw/camera.fb0.so as wrapper so we not use libcamera.so.. have you try to make camera.triumph.so from tjstyle camera hal source and not use libcamera.so??
 
Upvote 0
Following tjstyle camera hal.. we (fb0) use /system/lib/hw/camera.fb0.so as wrapper so we not use libcamera.so.. have you try to make camera.triumph.so from tjstyle camera hal source and not use libcamera.so??

abenagiel,

I have resolved that error already and our CameraHAL is now loading properly

01-02 10:16:54.699: E/CameraHAL(133): CameraHAL_GetNum_Cameras:
01-02 10:16:54.699: D/CameraHAL(133): CameraHAL_GetNum_Cameras: loading libcamera at 0x7000e9c0
01-02 10:16:54.699: V/QualcommCameraHardware(133): HAL_getNumberOfCameras:
01-02 10:16:54.699: D/CameraHAL(133): CameraHAL_GetNum_Cameras: numCameras:2

I used an edited version of rapmv78's code which allows us to load all the Gingerbread camera files by default based on our triumph-vendor-blobs.mk

Code:
# Prebuilt libraries that are needed to build open-source libraries
PRODUCT_COPY_FILES := \
    vendor/motorola/triumph/proprietary/libaudioalsa.so:obj/lib/libaudioalsa.so \
    vendor/motorola/triumph/proprietary/libcamera.so:obj/lib/libcamera.so \

# Camera
PRODUCT_COPY_FILES += \
    vendor/motorola/triumph/proprietary/libcamera.so:system/lib/libcamera.so \
    vendor/motorola/triumph/proprietary/liboemcamera.so:system/lib/liboemcamera.so \
    vendor/motorola/triumph/proprietary/libgemini.so:system/lib/libgemini.so \
    vendor/motorola/triumph/proprietary/libmmjpeg.so:system/lib/libmmjpeg.so \
    vendor/motorola/triumph/proprietary/libmmipl.so:system/lib/libmmipl.so
With the assistance of dorregaray he showed me how to tear apart the libcamera.so file using the CM9 source code to list all the KEY_MODULES calls that work on our libcamera.so. Based on the output of the libcamera.so files I was able to add our specific proprietary KEY_MODULES into the frameworks_base so our proprietary files are now no longer proprietary. The camera is still not working yet as I am stilling getting some sigv errors but now we are getting much closer. I will be posting more on the complete method on our Wiki as soon as the camera is fully functional.
 
Upvote 0
In response to rsrich, I suppose though, if the wife tells you can have something that she's been holding you off for a long time with, you are left thinking " Ok, where is the bear trap in all this and when is it going to snap shut on my leg"? LOL We men are kinda dolts sometimes. We don't see the real meaning behind what our wives say sometimes. :D:D:D
 
Upvote 0
So does this mean you figured out how to load the camera?

Yes, the camera is now loading and talking properly to Android. The problem Dorregaray is working with me on is the kernel. Right now it's generating an error when launching the camera.apk

11-10 05:38:39.334: E/mt9p111(1632): Inside mt9p111_process_start
11-10 05:38:39.354: E/mt9p111(1632): [user] mt9p111_video_config, sfd = 15
11-10 05:38:39.354: A/libc(1632): Fatal signal 11 (SIGSEGV) at 0x00000168 (code=1)

Dorregaray has added some lines of code to bypass the SIGSEGV error which should have helped stop the camera from crashing but still no dice. We are getting much closer than ever before, but there is still kernel work that needs to be done to resolve the issues. The extra bonus to this as well, is I have also been fixing other issues since I have been building the code so much.

Chairshot figured out how to stop the blasted black screen after some one hangs up on you which I will be adding in my next building, and I have also added in all the Froyo Sharp GPS files. It's still not as fast locks as Sharp but I am getting the accuracy locks down to 3 to 10 feet when outside. There is still more testing needed on this but my first test proved amazing.

Hey g60, do you have an RSS feed or a twitter I can follow for this?

The best RSS feed I have is my github account for pushes I make to the code.

https://github.com/g60madman.atom

I also am trying to keep you guys in the loop as we make progress in this thread.
 
Upvote 0
Yes, the camera is now loading and talking properly to Android. The problem Dorregaray is working with me on is the kernel. Right now it's generating an error when launching the camera.apk

11-10 05:38:39.334: E/mt9p111(1632): Inside mt9p111_process_start
11-10 05:38:39.354: E/mt9p111(1632): [user] mt9p111_video_config, sfd = 15
11-10 05:38:39.354: A/libc(1632): Fatal signal 11 (SIGSEGV) at 0x00000168 (code=1)

Dorregaray has added some lines of code to bypass the SIGSEGV error which should have helped stop the camera from crashing but still no dice. We are getting much closer than ever before, but there is still kernel work that needs to be done to resolve the issues. The extra bonus to this as well, is I have also been fixing other issues since I have been building the code so much.

Chairshot figured out how to stop the blasted black screen after some one hangs up on you which I will be adding in my next building, and I have also added in all the Froyo Sharp GPS files. It's still not as fast locks as Sharp but I am getting the accuracy locks down to 3 to 10 feet when outside. There is still more testing needed on this but my first test proved amazing.



The best RSS feed I have is my github account for pushes I make to the code.

https://github.com/g60madman.atom

I also am trying to keep you guys in the loop as we make progress in this thread.


Thnaks G60 You are getting so close, You will have it soon And i will be mad you will get the camera working on this and will will be switching phones LOL just my luck
 
Upvote 0
  • Like
Reactions: wildplace
Upvote 0
No no no, for one - the camera is loading now. 2 - no sleep for two days makes me say stupid stuff. I'm not really sure what's going on right now... Ooh! Look a keyboard :)

It's not the camera.apk it's the relation of the libcamera.so and the kernel. It's just crashing on the camera.apk because the libcamera.so is being called to work. Go get some sleep John! :D
 
  • Like
Reactions: jjohn7293
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones