Android r10.2 UVC Camera problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Android r10.2 UVC Camera problem

跳至解决方案
2,218 次查看
ToxicAvenger
Contributor III

Hello,

I'm using custom board based on i.MX53 QSB, and Android r10.2. I'm trying to get UVC camera to work.

My camera is recognised as WebCam-HM2055

Camera is visible, when it is connected:

uvcvideo: Found UVC 1.00 device WebCam-HM2055 (058f:5608)

input: WebCam-HM2055 as /devices/platform/fsl-ehci.0/usb1/1-1/1-1:1.0/input/input3

Also /dev/video0 is created.

Also Android application: openxc/android-webcam · GitHub

gets preview from camera, but when I try to open system application "Camera", i have exception:

I/ActivityManager( 2367): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.camera/.Camera } from pid 2422

I/SurfaceFlinger( 2367): mHw->getFormat() 4

I/ActivityManager( 2367): Start proc com.android.camera for activity com.android.camera/.Camera: pid=2695 uid=10030 gids={1006, 1015}

I/WindowManager( 2367): Setting rotation to 1, animFlags=1

I/ActivityManager( 2367): Config changed: { scale=1.0 imsi=0/0 loc=en_US touch=3 keys=1/1/2 nav=1/1 orien=2 layout=34 uiMode=17 seq=4}

W/dalvikvm( 2695): Exception Ljava/lang/NullPointerException; thrown while initializing Lcom/android/camera/CameraSettings;

D/AndroidRuntime( 2695): Shutting down VM

W/dalvikvm( 2695): threadid=1: thread exiting with uncaught exception (group=0x2aac0560)

E/AndroidRuntime( 2695): FATAL EXCEPTION: main

E/AndroidRuntime( 2695): java.lang.ExceptionInInitializerError

E/AndroidRuntime( 2695):        at com.android.camera.Camera.onCreate(Camera.java:891)

E/AndroidRuntime( 2695):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)

E/AndroidRuntime( 2695):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)

E/AndroidRuntime( 2695):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)

E/AndroidRuntime( 2695):        at android.app.ActivityThread.access$1500(ActivityThread.java:117)

E/AndroidRuntime( 2695):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)

E/AndroidRuntime( 2695):        at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 2695):        at android.os.Looper.loop(Looper.java:123)

E/AndroidRuntime( 2695):        at android.app.ActivityThread.main(ActivityThread.java:3683)

E/AndroidRuntime( 2695):        at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 2695):        at java.lang.reflect.Method.invoke(Method.java:507)

E/AndroidRuntime( 2695):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)

E/AndroidRuntime( 2695):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

E/AndroidRuntime( 2695):        at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 2695): Caused by: java.lang.NullPointerException

E/AndroidRuntime( 2695):        at com.android.camera.CameraSettings.<clinit>(CameraSettings.java:63)

E/AndroidRuntime( 2695):        ... 14 more

W/ActivityManager( 2367):   Force finishing activity com.android.camera/.Camera

I/WindowManager( 2367): Setting rotation to 0, animFlags=1

I/ActivityManager( 2367): Config changed: { scale=1.0 imsi=0/0 loc=en_US touch=3 keys=1/1/2 nav=1/1 orien=1 layout=34 uiMode=17 seq=5}

W/ActivityManager( 2367): Activity pause timeout for HistoryRecord{2b1c6258 com.android.camera/.Camera}

D/dalvikvm( 2367): GC_EXPLICIT freed 456K, 45% free 4072K/7303K, external 1402K/4560K, paused 58ms

W/ActivityManager( 2367): Activity destroy timeout for HistoryRecord{2b1c6258 com.android.camera/.Camera}

I would like to get this camera working in Android system, not only in openxc android webcam application


Best regards,

Toxis


标签 (4)
0 项奖励
回复
1 解答
1,441 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

The freescale R10.4 BSP can be downloaded from http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX535&nodeId=018rH3ZrDR988D&fpsp=1&...

Run-time software -> Operating System Software-Board Support Packages -> IMX5X_R10_4_ANDROID_SOURCECODE

I searched the R10.4 release, and attached all "UVC" named patches here. You can check if they had been applied in your BSP.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,441 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

The R10.2 BSP is too older, you'd better update to R10.4. UVC camera had been verified on that release.

0 项奖励
回复
1,441 次查看
ToxicAvenger
Contributor III

Hello,

How to get 10.4? Adeneo have only 10.3.

Is there any option to apply camera patches from 10.4 to 10.2? I have many modification in 10.2 to work with custom board.

Regards,

Toxic

0 项奖励
回复
1,442 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

The freescale R10.4 BSP can be downloaded from http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX535&nodeId=018rH3ZrDR988D&fpsp=1&...

Run-time software -> Operating System Software-Board Support Packages -> IMX5X_R10_4_ANDROID_SOURCECODE

I searched the R10.4 release, and attached all "UVC" named patches here. You can check if they had been applied in your BSP.

0 项奖励
回复