When there is multiple Android-devices connected with Linux computer (using Linux Mint 20.2 Cinnamon, which is based on appropriate Ubuntu 20.04 LTS version) and scrcpy v1.12 then how to keep multiple devices awake?
When one device connected, then I used:
adb shell svc power stayon true
... and it worked.
When multiple devices, then there will be an error message:
error: more than one device/emulator
Tried find a solution, but no luck so far. Tried to connect devices one at a time and then run, but it didn't work. Having one device using OxygenOS 9.0.6, which is based on Android appropriate version. Second device has LineageOS 18.1, which is based on Android 11.
Using following commands to connect with multiple devices:
scrcpy -s <ID1> -m 1024 -S&
scrcpy -s <ID2> -S&
The -S will turn of device screen, once it is connected. I would like to keep screen on at computer, while using scrcpy, but device screen should be turned off at the same time.
Tried also GUI but it didn't help either. One device with Android 9 has screen always on, but another device with Android 11 will time out and also scrcpy window will turn off. I know, that there is a shortcut key CTRL+O at scrcpy, which helps to turn off device screen or using -S will do it immediately after connecting.
Any idea, how to solve this?