How to make the default camera android app work on QSB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to make the default camera android app work on QSB

2,291 Views
PSC1z
Contributor I

Hi all,

 

If I plug-in a USB UVC camera, the kernel can recognize the camera but the

default camera android app crash while opening the app on Adeneo Embedded

Gingerbread Release 4.0. Do any one know how to make the default app works with

uvc compatible camera?

Labels (1)
0 Kudos
2 Replies

1,366 Views
PSC1z
Contributor I

Hi Daiane,

 

Thanks for your help. I've sure that I've enabled UVC support in kernel.

Below is the console message and logcat when the camera is plugin and start the camera app.

 

Console:
# setprop front_camera_name uvc
# setprop front_camera_orient 180
# usb 1-1.3: new high speed USB device using fsl-ehci and address 6
hub 1-1:1.0: unable to enumerate USB device on port 3
usb 1-1.3: new high speed USB device using fsl-ehci and address 7
uvcvideo: Found UVC 1.00 device USB2.0 Camera (1871:0306)
input: USB2.0 Camera as /devices/platform/fsl-ehci.1/usb1/1-1/1-1.3/1-1.3:1.0/in
put/input6

logcat:
I/EventHub( 2129): New keyboard: device->id=0x10006 devname='USB2.0 Camera' propName='hw.keyboards.65542.devname' keylayout='/system/usr/keylayout/qwerty.kl'
I/EventHub( 2129): New device: path=/dev/input/event6 name=USB2.0 Camera id=0x10006 (of 0x7) index=7 fd=156 classes=0x1
I/InputReader( 2129): Device added: id=0x10006, name=USB2.0 Camera, sources=00000101
I/InputReader( 2129): Device reconfigured: id=0x10002, name=da9052_tsi, display size is now 1024x768
I/InputManager-Callbacks( 2129): No input device calibration properties found for device USB2.0 Camera.
I/InputManager-Callbacks( 2129): No virtual keys found for device da9052_tsi.
I/SurfaceFlinger( 2129): mHw->getFormat() 4
I/ActivityManager( 2129): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.camera/.Camera } from pid 2211
I/ActivityManager( 2129): Start proc com.android.camera for activity com.android.camera/.Camera: pid=2411 uid=10028 gids={1006, 1015}
D/installd( 2095): DexInv: --- BEGIN '/system/app/Camera.apk' ---
D/dalvikvm( 2419): creating instr width table
D/dalvikvm( 2419): DexOpt: load 23ms, verify+opt 105ms
D/installd( 2095): DexInv: --- END '/system/app/Camera.apk' (success) ---
W/dalvikvm( 2411): Exception Ljava/lang/NullPointerException; thrown while initializing Lcom/android/camera/CameraSettings;
D/AndroidRuntime( 2411): Shutting down VM
W/dalvikvm( 2411): threadid=1: thread exiting with uncaught exception (group=0x2aac0560)
E/AndroidRuntime( 2411): FATAL EXCEPTION: main
E/AndroidRuntime( 2411): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 2411):     at com.android.camera.Camera.onCreate(Camera.java:891)
E/AndroidRuntime( 2411):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 2411):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
E/AndroidRuntime( 2411):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
E/AndroidRuntime( 2411):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 2411):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
E/AndroidRuntime( 2411):     at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2411):     at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2411):     at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 2411):     at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2411):     at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 2411):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 2411):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 2411):     at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 2411): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 2411):     at com.android.camera.CameraSettings.<clinit>(CameraSettings.java:63)
E/AndroidRuntime( 2411):     ... 14 more
W/ActivityManager( 2129):   Force finishing activity com.android.camera/.Camera
W/ActivityManager( 2129): Activity pause timeout for HistoryRecord{2b0b9510 com.android.camera/.Camera}
I/Process ( 2411): Sending signal. PID: 2411 SIG: 9
I/ActivityManager( 2129): Process com.android.camera (pid 2411) has died.
W/InputManagerService( 2129): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@2b288e30
W/ActivityManager( 2129): Activity destroy timeout for HistoryRecord{2b0b9510 com.android.camera/.Camera}
request_suspend_state: mem (0->3) at 178411850753 (1970-01-02 00:02:47.622076375 UTC)

I/power   ( 2129): *** set_screen_state 0
D/SurfaceFlinger( 2129): About to give-up screen, flinger = 0x1decc8


Daiane Angolini said:

Make sure your kernel can handle UVC cameras:

  • Enable the UVC camera
Device Drivers  --->
                  <*> Multimedia support  --->
                          [*]   Video capture adapters  --->
                                  [*]   V4L USB devices  --->
                                          <*>   USB Video Class (UVC)

And try to include this prop

setprop front_camera_name uvc
setprop front_camera_orient 180

 

I'm not sure this will work for QSB, since I'm not sure what is supported on this release. Please, try it and let me know your logcat result

0 Kudos

1,367 Views
daiane_angolini
NXP Employee
NXP Employee
Make sure your kernel can handle UVC cameras:

  • Enable the UVC camera
Device Drivers  --->
                  <*> Multimedia support  --->
                          [*]   Video capture adapters  --->
                                  [*]   V4L USB devices  --->
                                          <*>   USB Video Class (UVC)

And try to include this prop

setprop front_camera_name uvc
setprop front_camera_orient 180

 

I'm not sure this will work for QSB, since I'm not sure what is supported on this release. Please, try it and let me know your logcat result

0 Kudos