Genymobile / Genymobile/scrcpy

i just wanna try the camera mirorring feature, but it just won't work (clearly i have no idea)

Open
#4,512 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
150k
Forks
13.7k
Avg merge
4d 13h
Merged PRs (30d)
2

Description

**Environment**
- OS: Windows 11
- scrcpy version: v2.3.1
- installation method: unzip windows release
- device model: vivo v27 V2331
- Android version: 13 (Funtouch 13)

**Describe the bug**
A clear and concise description of what the bug is.
I was trying to use my phone as a camera input because my laptop webcam ain't that good, then i install scrcpy v2.3.1,plug my phone onto laptop, and enable the usb debugging. it says error (yeah i don't know how to prevent this so i got here)

```
C:\produktif\scrcpy-win64-v2.3.1>scrcpy --video-source=camera
scrcpy 2.3.1
INFO: Camera video source: control disabled
INFO: Camera video source: microphone audio source selected
INFO: ADB device found:
INFO: --> (usb) 10DD3M045P0004Q device V2231
C:\produktif\scrcpy-win64-v2.3.1\scrcpy-server: 1 file pushed, 0 skipped. 72.9 MB/s (66007 bytes in 0.001s)
[server] INFO: Device: [vivo] vivo V2231 (Android 13)
[server] INFO: Using camera '0'
INFO: Renderer: direct3d
ERROR: Demuxer 'video': stream disabled due to connection error
ERROR: Demuxer error
[server] ERROR: Exception on thread Thread[video,5,main]
java.lang.SecurityException: Given calling package android does not match caller's uid 2000
at android.os.Parcel.createExceptionOrNull(Parcel.java:3025)
at android.os.Parcel.createException(Parcel.java:3009)
at android.os.Parcel.readException(Parcel.java:2992)
at android.os.Parcel.readException(Parcel.java:2934)
at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:6145)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:7689)
at android.app.ContextImpl$ApplicationContentResolver.acquireProvider(ContextImpl.java:3503)
at android.content.ContentResolver.acquireProvider(ContentResolver.java:2542)
at android.provider.Settings$ContentProviderHolder.getProvider(Settings.java:2955)
at android.provider.Settings$NameValueCache.getStringForUser(Settings.java:3182)
at android.provider.Settings$Global.getStringForUser(Settings.java:16183)
at android.provider.Settings$Global.getString(Settings.java:16157)
at android.hardware.camera2.vivo_ext.VivoCameraUtils.sendStartPreviewBroadCast(VivoCameraUtils.java:199)
at android.hardware.camera2.CameraManager.openCameraDeviceUserAsync(CameraManager.java:782)
at android.hardware.camera2.CameraManager.openCameraForUid(CameraManager.java:1047)
at android.hardware.camera2.CameraManager.openCameraForUid(CameraManager.java:1068)
at android.hardware.camera2.CameraManager.openCamera(CameraManager.java:883)
at com.genymobile.scrcpy.CameraCapture.openCamera(CameraCapture.java:241)
at com.genymobile.scrcpy.CameraCapture.init(CameraCapture.java:86)
at com.genymobile.scrcpy.SurfaceEncoder.streamScreen(SurfaceEncoder.java:55)
at com.genymobile.scrcpy.SurfaceEncoder.lambda$start$0$com-genymobile-scrcpy-SurfaceEncoder(SurfaceEncoder.java:253)
at com.genymobile.scrcpy.SurfaceEncoder$$ExternalSyntheticLambda0.run(Unknown Source:4)
at java.lang.Thread.run(Thread.java:1012)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.ContentProviderHelper.getContentProvider(ContentProviderHelper.java:174)
at com.android.server.am.ActivityManagerService.getContentProvider(ActivityManagerService.java:7408)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2851)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3164)
at android.os.Binder.execTransactInternal(Binder.java:1346)

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the reported command, `scrcpy --video-source=camera`, on the listed vivo V2231 device and Android 13 environment. Start at `CameraCapture.openCamera()` and compare the failure with the Android camera stack trace; done means determining whether the device-specific camera error can be reproduced and documenting or correcting the resulting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.