farmerbb / SecondScreen

Better screen mirroring for Android devices
Apache License 2.0
304 stars 55 forks source link

Support for multiple simulated displays #76

Open 4nric opened 3 years ago

4nric commented 3 years ago

Android 10+ can simulate up to 4 displays with Force Desktop mode enabled. scrcpy can be used to access them separately. Currently, I open apps to a specific display manually through adb because Taskbar currently only launches apps on one specific display (or sometimes unpredictable).

Sample to simulate 4 displays with Full HD resolution and 160 dpi:

adb shell settings put global overlay_display_devices "1920x1080/160\;1920x1080/160\;1920x1080/160\;1920x1080/160\"

To list available displays:

adb shell dumpsys display | findstr "mDisplayId="

Sample to launch an app manually (-S: force-closed first) in full screen to a specific display:

adb shell am start-activity -S --display (#) --windowingMode 1 com.android.chrome

browntownington commented 3 years ago

@4nric what's your question exactly?

puspamadak commented 1 year ago

@4nric Thanks for this trick. Now I can finally multitask on my Android. Can you tell me how to stop chrome & launch another activity?