-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
--stay-awake isn't working on Pixel3a (Android 11) #2612
Comments
The option only works when the device is plugged in: (this is a limitation of the Android option) |
Thanks for the quick feedback! This device is plugged-in.. direct USB If you're looking at that -s and PORT line in my command - I have a script that will list all of the connected devices via adb and let me select which one to mirror. It does work with connected and wireless devices - but this device is usb
|
FWIW -- here's the full script I use in case it'll benefit anyone else too.. I often have several devices connected so it'll prompt me which one to mirror. Let me know if you see any issues with how I'm running scrcpy.. I'm unsure about the encoding param - don't remember what caused me to try that. I think due to some really laggy starts at one point. screenMirror.sh
|
The feature Read the value: adb shell settings get global stay_on_while_plugged_in Write the value: adb shell settings put global stay_on_while_plugged_in 7 # enable
adb shell settings put global stay_on_while_plugged_in 0 # disable |
I see.. the developer 'stay awake while charging' setting. I guess I could just call those commands before and after running scrcpy.. I'll give that a try thanks |
scrcpy calls them if you pass |
--stay-awake also fails on my Oneplus 8 Pro on Android 12, if I try the ADB command from above:
Then I get:
SCRCPY says:
|
|
Setting "Disable Permission Monitoring" (developer option) works for me on OnePlus 8 PRO on Android 12. Now the ADB shell commands no longer fail either. |
It is effective for my OnePlus 13. After using the USB connect OnePlus debug, then disconnect the USB Connect and use it to use WiFi Connect. |
still getting error on android 12 even after disabling permission monitoring |
Environment
Describe the bug
--stay-awake doesn't appear to be working for me. After whatever display timeout period, the screen goes black and I can't get it to come back on again. I can however close the scrcpy window and re-open and the screen will display fine again.
I'm running a Pixel3aXL running Android 11
Here's the command I use to launch scrcpy
The text was updated successfully, but these errors were encountered: