anbox/anbox

Use emulated camera?

Open

#727 aperta il 26 mag 2018

Vedi su GitHub
 (73 commenti) (17 reazioni) (0 assegnatari)C++ (1160 fork)batch import
enhancementhelp wantedsession manager

Metriche repository

Star
 (8720 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Hi, What is the support status for the emulated camera? Can be faked from an image or from the host webcam? I'm using Anbox under Arch Linux, with some modifications to run in LXC 3, using the latest commit a88faed6d3.

I'm trying to scan a QR code for WhatsApp, but when it tries to open the camera the window crashes:

05-26 21:43:19.267   118   130 I ActivityManager: START u0 {cmp=com.whatsapp/.qrcode.QrCodeActivity} from uid 10049 on display 0
05-26 21:43:19.377   456   456 I ToolbarWidgetWrapper: Progress display unsupported
05-26 21:43:19.751    35   761 D         : HostConnection::get() New Host Connection established 0x7fd77162c380, tid 761
05-26 21:43:19.782   456   747 D OpenGLRenderer: endAllActiveAnimators on 0x7f8b0cf03800 (ar$a) with handle 0x7f8b0cd60220
05-26 21:43:20.250   118   139 I ActivityManager: Displayed com.whatsapp/.qrcode.QrCodeActivity: +975ms
05-26 21:43:20.578   456   461 I art     : Do partial code cache collection, code=59KB, data=61KB
05-26 21:43:20.578   456   461 I art     : After code cache collection, code=46KB, data=53KB
05-26 21:43:20.578   456   461 I art     : Increasing code cache capacity to 256KB
05-26 21:43:27.649    47    47 I MediaPlayerService: MediaPlayerService::getOMX
05-26 21:43:27.649   118   771 I OMXClient: MuxOMX ctor
05-26 21:43:27.649   118   771 E ACodec  : Unable to instantiate a decoder for type 'audio/vorbis' with err 0xfffffffe.
05-26 21:43:27.649   118   771 E ACodec  : signalError(omxError 0xfffffffe, internalError -2)
05-26 21:43:27.649   118   771 E MediaCodec: Codec reported err 0xfffffffe, actionCode 0, while in state 1
05-26 21:43:27.649   118   769 E SoundPool: Unable to load sample
05-26 21:43:27.650   118   172 W AudioService: onLoadSoundEffects(), Error -2147483648 while loading samples
05-26 21:43:27.654    47   104 I MediaPlayerService: MediaPlayerService::getOMX
05-26 21:43:27.654   118   772 I OMXClient: MuxOMX ctor
05-26 21:43:27.654   118   772 E ACodec  : Unable to instantiate a decoder for type 'audio/vorbis' with err 0xfffffffe.
05-26 21:43:27.654   118   772 E ACodec  : signalError(omxError 0xfffffffe, internalError -2)
05-26 21:43:27.654   118   772 E MediaCodec: Codec reported err 0xfffffffe, actionCode 0, while in state 1
05-26 21:43:27.655   118   769 E SoundPool: Unable to load sample
05-26 21:43:27.712    40    40 I CameraService: CameraService::connect call (PID -1 "com.whatsapp", camera ID 0) for HAL version default and Camera API version 1
05-26 21:43:27.712    40    40 E CameraService: CameraService::connect X (PID 456) rejected (invalid camera ID 0)
05-26 21:43:27.713   456   456 W CameraBase: An error occurred while connecting to camera 0: Service not available
05-26 21:43:27.726   118   129 W ActivityManager: Duplicate finish request for ActivityRecord{749800c u0 com.whatsapp/.qrcode.QrCodeActivity t4 f}
05-26 21:43:27.945    35   189 D PermissionCache: checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (135 us)
05-26 21:43:27.980   118   129 D         : HostConnection::get() New Host Connection established 0x7f8b0dd5a8c0, tid 129
05-26 21:43:28.011    35    35 E EGL_emulation: tid 35: eglCreateSyncKHR(1315): error 0x3004 (EGL_BAD_ATTRIBUTE)
05-26 21:43:28.101   456   456 W GooglePlayServicesUtil: Google Play Store is missing.
05-26 21:43:31.225   118   118 W WindowManager: Attempted to remove non-existing token: android.os.Binder@54a2828
05-26 21:43:31.274    35   777 D         : HostConnection::get() New Host Connection established 0x7fd77162c640, tid 777
05-26 21:43:34.728   118   118 W WindowManager: Attempted to remove non-existing token: android.os.Binder@fbf7941

I tested some properties, like hw.camera and qemu.sf.fake_camera, but none of them seem to produce any effect.

Guida contributor