Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Virtual Device Manager - Webcam0 on 4.4.2 not working

I've configured a virtual 4.4.2 (arm) Android Device in the AVD (Full Settings below) and need to use my webcam to test the camera.

The camera app starts and crashes instantly (Camera has stopped working).

I get the following log output:

10-28 05:43:41.220      370-548/system_process I/ActivityManager﹕ Start proc com.android.camera for activity com.android.camera/.Camera: pid=1136 uid=10030 gids={50030, 1028, 1015}
10-28 05:43:42.100    1136-1150/com.android.camera V/CameraHolder﹕ open camera 0
10-28 05:43:42.100       60-125/? E/CameraService﹕ CameraService::connect X (pid 1136) rejected (invalid cameraId 0).
10-28 05:43:42.110    1136-1150/com.android.camera W/CameraBase﹕ An error occurred while connecting to camera: 0
10-28 05:43:42.110    1136-1150/com.android.camera E/CameraHolder﹕ fail to connect Camera
    java.lang.RuntimeException: Fail to connect to camera service
            at android.hardware.Camera.native_setup(Native Method)
            at android.hardware.Camera.<init>(Camera.java:351)
            at android.hardware.Camera.open(Camera.java:310)
            at com.android.camera.CameraHolder.open(CameraHolder.java:131)
            at com.android.camera.Util.openCamera(Util.java:267)
            at com.android.camera.Camera$4.run(Camera.java:1100)
            at java.lang.Thread.run(Thread.java:841)
10-28 05:43:42.120    1136-1150/com.android.camera W/dalvikvm﹕ threadid=11: thread exiting with uncaught exception (group=0xb1ab5ba8)
10-28 05:43:42.120    1136-1150/com.android.camera E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-87
    Process: com.android.camera, PID: 1136
    java.lang.RuntimeException: openCamera failed
            at com.android.camera.Util.openCamera(Util.java:272)
            at com.android.camera.Camera$4.run(Camera.java:1100)
            at java.lang.Thread.run(Thread.java:841)
     Caused by: com.android.camera.CameraHardwareException: java.lang.RuntimeException: Fail to connect to camera service
            at com.android.camera.CameraHolder.open(CameraHolder.java:135)
            at com.android.camera.Util.openCamera(Util.java:267)
            at com.android.camera.Camera$4.run(Camera.java:1100)
            at java.lang.Thread.run(Thread.java:841)
     Caused by: java.lang.RuntimeException: Fail to connect to camera service
            at android.hardware.Camera.native_setup(Native Method)
            at android.hardware.Camera.<init>(Camera.java:351)
            at android.hardware.Camera.open(Camera.java:310)
            at com.android.camera.CameraHolder.open(CameraHolder.java:131)
            at com.android.camera.Util.openCamera(Util.java:267)
            at com.android.camera.Camera$4.run(Camera.java:1100)
            at java.lang.Thread.run(Thread.java:841)

AVD-Settings:

Name: Samsung_Galaxy_S3_API_19

CPU/ABI: ARM (armeabi-v7a)

Path: D:\Users\rowi1de\.android\avd\Samsung_Galaxy_S3_API_19.avd

Target: Android 4.4.2 (API level 19)

Skin: galaxy_s3_blue

SD Card: D:\Users\rowi1de\.android\avd\Samsung_Galaxy_S3_API_19.avd\sdcard.img

Snapshot: no

hw.dPad: no

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: Samsung Galaxy S3

vm.heapSize: 64

skin.dynamic: no

hw.device.manufacturer: User

hw.gps: yes

hw.audioInput: yes

hw.cpu.model: cortex-a8

tag.id: default

hw.camera.back: webcam0

hw.mainKeys: yes

AvdId: Samsung_Galaxy_S3_API_19

hw.camera.front: none

hw.lcd.density: 320

runtime.scalefactor: auto

hw.gsmModem: yes

avd.ini.displayname: Samsung Galaxy S3 API 19

snapshot.present: no

hw.device.hash2: MD5:e6de262aae26d1ce2c8a8b656265afbc

hw.ramSize: 1536

hw.trackBall: no

hw.battery: yes

hw.camera: yes

hw.sdCard: yes

tag.display: Default

runtime.network.latency: none

hw.keyboard: yes

hw.touchScreen: yes

hw.sensors.proximity: yes

disk.dataPartition.size: 200M

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes

Any idea how to fix this?

Regards, Robert

like image 810
Robert W. Avatar asked Oct 28 '15 09:10

Robert W.


1 Answers

Use Genymotion for testing app it work like AVD and you can use Camera in Genymotion.

You can check on Link About Genymotion and features of Genymotion. Click here

like image 185
Anil Avatar answered Nov 11 '22 08:11

Anil