Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
110.62k stars 10.6k forks source link

Some bugs when connecting via wireless adb #5365

Open kmizmal opened 1 week ago

kmizmal commented 1 week ago

Environment

Describe the bug

Start on the lock screen page, and it will automatically disconnect after unlocking. The log is: [server] INFO: Device screen turned off WARN: Device disconnected Press Enter to continue... You can directly enter the mobile desktop after reconnecting for a short time, but it will automatically disconnect after a while, and the log is also [server] INFO: Device screen turned off WARN: Device disconnected Full log: scrcpy 2.7 https://github.com/Genymobile/scrcpy INFO: ADB device found: INFO: --> (tcpip) 192.168.153.62:6666 device PJE110 E:\study\bash\adb\scrcpy-server: 1 file pushed, 0 skipped. 128.2 MB/s (71200 bytes in 0.001s) [server] INFO: Device: [OnePlus] OnePlus PJE110 (Android 14) [server] ERROR: Could not change "stay_on_while_plugged_in" com.genymobile.scrcpy.util.SettingsException: Could not access settings: put global stay_on_while_plugged_in 7 at com.genymobile.scrcpy.util.Settings.execSettingsPut(Settings.java:24) at com.genymobile.scrcpy.util.Settings.putValue(Settings.java:59) at com.genymobile. scrcpy.util.Settings.getAndPutValue(Settings.java:78) at com.genymobile.scrcpy.Server.initAndCleanUp(Server.java:99) at com.genymobile.scrcpy.Server.lambda$startInitThread$2(Server.java:237) at com.genymobile.scrcpy.Server$$ExternalSyntheticLambda3.run(D8$$SyntheticClass:0) at java.lang.Thread.run(Thread.java:1012) Caused by: java.io.IOException: Command [settings, put, global, stay_on_while_plugged_in, 7] returned with value 255 at com.genymobile.scrcpy.util.Command.exec (Command.java:16) at com.genymobile.scrcpy.util.Settings.execSettingsPut(Settings.java:22) ... 6 more INFO: Renderer: direct3d INFO: Texture: 1080x2376 [server] INFO: Device screen turned off WARN: Device disconnected Press Enter to continue...

rom1v commented 1 week ago

This has nothing to do with wireless, you don't have permissions to change the settings for --stay-awake: #4346