# Camera force closes



## 00negative (Jul 25, 2011)

I have successfully compiled AOSP for Galaxy Nexus Toro, it boots fine, it connects to wireless networks and wifi and bluetooth fine but I can't get the camera to work at all. It force closes as soon as you click the icon, any ideas? Suggestions on things to check?

Also I have root but it doesn't automatically load the Superuser.apk, I have to install it from the market which isn't a huge deal but if I ever wanted to post the rom I would prefer to iron that out as well if any one can recommend things to check there.


----------



## razorloves (Jun 7, 2011)

sounds like you're missing the camera prop. i would check that first. it's this one https://android.goog...tary/Android.mk

for the superuser apk and su binary, you can just clone the repos here https://github.com/ChainsDD


----------



## 00negative (Jul 25, 2011)

razorloves said:


> sounds like you're missing the camera prop. i would check that first. it's this one https://android.goog...tary/Android.mk
> 
> for the superuser apk and su binary, you can just clone the repos here https://github.com/ChainsDD


Thanks for reply. I assume that info for the camera is pulled from the phone using the extract script but how do you know that those are the latest and will work for a current build? For example I know the camera is updated in 4.2 will that info have to be pulled from a 4.2 image from another device since there won't be an official image released for 4.2 for toro device?


----------



## razorloves (Jun 7, 2011)

00negative said:


> Thanks for reply. I assume that info for the camera is pulled from the phone using the extract script but how do you know that those are the latest and will work for a current build? For example I know the camera is updated in 4.2 will that info have to be pulled from a 4.2 image from another device since there won't be an official image released for 4.2 for toro device?


You're welcome.
Unfortunately, all the proprietary binaries are not provided here like they should be. https://developers.g...d/nexus/drivers
So, just pull the missing binaries from the latest google factory image or ota. Whichever is newest. There is of course good ole cyanogenmod to count on also. Meaning, they will be doing this to, so if there's a problem with an old binary not working, and your running out of ideas on how to fix, then you can take a peak at what they do to fix it.

The camera apk that you mentioned is part of aosp source. So when Google releases source for 4.2 in a few weeks, we will be able to build a 4.2 ROM. But we will have to continue using the 4.1.2 binaries until there's a new ota or until Google gives us some.


----------



## imnuts (Jun 9, 2011)

Make sure that the proprietary binary "fRom" is going to /system/bin and not /system/xbin. Depending on which version you downloaded, it may be going to the wrong location. It is fixed on the latest proprietaries, but not some of the initial ones.


----------



## 00negative (Jul 25, 2011)

imnuts said:


> Make sure that the proprietary binary "fRom" is going to /system/bin and not /system/xbin. Depending on which version you downloaded, it may be going to the wrong location. It is fixed on the latest proprietaries, but not some of the initial ones.


Thanks for suggestion. Looks like fRom is going to /system/bin.

But still not getting it to work, it seems like any of the apks that I am calling in the device make file aren't working (FCs). The Superuser.apk is force closing and so is the Camera but it states that the 'Gallery has unexpectedly closed' when I try and open the Camera. If I try and open the actually Gallery that seems to work fine though. I pulled some of those proprietary binaries, like the ducati-m3.bin, from cm10 would that cause the issue?


----------



## razorloves (Jun 7, 2011)

00negative said:


> Thanks for suggestion. Looks like fRom is going to /system/bin.
> 
> But still not getting it to work, it seems like any of the apks that I am calling in the device make file aren't working (FCs). The Superuser.apk is force closing and so is the Camera but it states that the 'Gallery has unexpectedly closed' when I try and open the Camera. If I try and open the actually Gallery that seems to work fine though. I pulled some of those proprietary binaries, like the ducati-m3.bin, from cm10 would that cause the issue?


Should be fine that you grabbed them from the cm10 ROM for your phone.

Would help to see a logcat with these errors, starting from power up. And even a copy of your ROM if you want to pm me a link to it.


----------



## 00negative (Jul 25, 2011)

razorloves said:


> Should be fine that you grabbed them from the cm10 ROM for your phone.
> 
> Would help to see a logcat with these errors, starting from power up. And even a copy of your ROM if you want to pm me a link to it.


Here is a logcat from boot, I didn't have this connected to wifi or data when running the logcat so there are some warnings etc related to connectivity that I am not worried about. It does look like it starts the Camera but then it has errors that the num_cameras = 0 and that it can't find camera properties.

I attached it as a txt file so you could search it easier but if you would prefer a different method let me know.


----------

