-
-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio capture does not work on OnePlus 6T (Android 11) *not on the main user* #4153
Comments
Update Checked logcat and it seems that audio recording is not allowed only for non-main user. If I switch to the main user, audio works fine AudioPolicyIntefaceImpl: getInputForAttr permission denied: recording not allowed for uid 2000 pid 4206 full log:
|
Did you see a "Heap Dump" popup on your device screen when starting Scrcpy? Please try running
Now it throws in |
Unfortunately calling and keeping |
That means This doesn't work because Scrcpy is running with uid 2000, but the Heap Dump dialog belongs to uid 1002000 (if current Android user ID is 10), so Android still don't think Scrcpy is in foreground. I found no method to run Scrcpy in current active Android user (because it's started by ADB, which has uid 2000), or make uid 2000 become foreground (Starting an activity for another Android user does nothing, there is no API to forcefully mark an uid as foreground). I don't think it's solvable. |
Environment
Describe the bug
Audio capture fails with following error
Looks similar to #4015 as
startRecording
method also seem to be modified:My framework.jar: framework.jar.zip
scrcpy -Vverbose output:
The text was updated successfully, but these errors were encountered: