Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
113.39k stars 10.8k forks source link

Virtual display problem created with scrcpy on lower android #5541

Open KSMaan45 opened 4 days ago

KSMaan45 commented 4 days ago

Environment

when we try to launch any app from virtual display it launch on primary display with a toast app doesn't support to launch on secondary display but if we launch it with with adb shell it did launch on secondary display as show in first video with second attempt, otherway around if we manually create virtual display from developers options then launching a app with adb it launch on secondary display fine, so seems like there was some problem with virtual display trusted flag for android 10.

here are the videos :

virtual display created with scrcpy

https://github.com/user-attachments/assets/61496ac1-7af9-49f0-863b-e61f62f9b3a4

virtual display created from developers options

https://github.com/user-attachments/assets/d8c31b3f-7d81-4dc2-8046-e19b5a2b9c31

rom1v commented 4 days ago

OK, I have no control over this behavior. The virtual display creation from developer options is different (it keeps an overlay on the main display), so it probably calls some other code.

Out of curiosity, what happens with a mix of the two:

KSMaan45 commented 4 days ago

OK, I have no control on this behavior. The virtual display creation from developer options is different (it keeps an overlay on the main display), so it probably calls some other code.

Out of curiosity, what happens with a mix of the two:

  • start a new display with scrcpy --new-dsplay=1920x1080, keep it open
  • mirror that new display with scrcpy --display-id=XX
  • start an app from the second window

just tried and it make no difference app still launch on primary display