Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
109.86k stars 10.55k forks source link

Demuxer 'video' error and "Given calling package android does not match caller's uid 2000" #4969

Open lianeci opened 4 months ago

lianeci commented 4 months ago

Environment

Describe the bug I have been searching for fixes in related issue posts but to no avail... Please help!

D:\Applications\scrcpy-win64-v2.4>scrcpy --video-source=camera --no-audio --camera-fps=60
scrcpy 2.4 <https://github.com/Genymobile/scrcpy>
INFO: Camera video source: control disabled
INFO: ADB device found:
INFO:     -->   (usb)  10AE4B18U5003TH                 device  V2302
D:\Applications\scrcpy-win64-v2.4\scrcpy-server: 1 file pushed, 0 skipped. 61.5 MB/s (69007 bytes in 0.001s)
[server] INFO: Device: [vivo] vivo V2302 (Android 14)
INFO: Renderer: direct3d
[server] INFO: Using camera '0'
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:3071)
        at android.os.Parcel.createException(Parcel.java:3055)
        at android.os.Parcel.readException(Parcel.java:3038)
        at android.os.Parcel.readException(Parcel.java:2980)
        at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:6649)
        at android.app.ActivityThread.acquireProvider(ActivityThread.java:8312)
        at android.app.ContextImpl$ApplicationContentResolver.acquireProvider(ContextImpl.java:3771)
        at android.content.ContentResolver.acquireProvider(ContentResolver.java:2560)
        at android.provider.Settings$ContentProviderHolder.getProvider(Settings.java:3106)
        at android.provider.Settings$NameValueCache.getStringForUser(Settings.java:3351)
        at android.provider.Settings$Global.getStringForUser(Settings.java:17224)
        at android.provider.Settings$Global.getString(Settings.java:17198)
        at android.hardware.camera2.vivo_ext.VivoCameraUtils.sendOpenCloseCameraBroadcast(VivoCameraUtils.java:172)
        at android.hardware.camera2.CameraManager.openCameraDeviceUserAsync(CameraManager.java:873)
        at android.hardware.camera2.CameraManager.openCameraForUid(CameraManager.java:1171)
        at android.hardware.camera2.CameraManager.openCameraForUid(CameraManager.java:1193)
        at android.hardware.camera2.CameraManager.openCamera(CameraManager.java:983)
        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:184)
        at com.android.server.am.ActivityManagerService.getContentProvider(ActivityManagerService.java:7833)
        at android.app.IActivityManager$Stub.onTransact$getContentProvider$(IActivityManager.java:12683)
        at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3244)
        at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3264)
rom1v commented 4 months ago

4639

lianeci commented 4 months ago

I already tried the solutions in the thread but nothing worked. Does that mean the issue can't be resolved right now?