scrcpy
scrcpy copied to clipboard
Force desktop mode Android 10
Hello, suggestion to make force desktop mode work on scrcpy? Would be a great feature.
You mean "DeX" or something like that? https://github.com/Genymobile/scrcpy/issues/397#issuecomment-628191039
Dex is only for samsung. I'm using oneplus where dex is not available. But theres a feature of Android 10 called "Forced desktop mode" from developers option. Is it possible to make it work in scrcpy? I tried the solution from dex request but unfortunately it doesn't work.
Oh, indeed, I have this option on my OnePlus 7 Pro. I don't know how it works though (what happens once it's enabled?).
Using scrcpy, it only mirrors the phone screen.

It should look like this. Left side u can add app shortcut to desktop. Right side opens the app installed in your phone.
Using scrcpy, it only mirrors the phone screen.
That's expected before Android 10: https://github.com/Genymobile/scrcpy/blob/master/README.md#display
But it should work on Android 10 :/
Any message in the console?
The secondary display that would show desktop mode isn't online, so scrcpy can't connect to it
[server] ERROR: Exception on thread Thread[main,5,main]
com.genymobile.scrcpy.InvalidDisplayIdException: There is no display having id 1
at com.genymobile.scrcpy.Device.<init>(Device.java:46)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:20)
at com.genymobile.scrcpy.Server.main(Server.java:177)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:362)
[server] ERROR: Try to use one of the available display ids:
[server] ERROR: scrcpy --display 0
So, u mean there is no work around for this? Anyway, thanks for your help.
I kind of found a workaround. I'm using a pixel3 xl.
Using this app called SecondScreen you can force the screen of the device to change - https://play.google.com/store/apps/details?id=com.farmerbb.secondscreen.free&hl=en_US
A couple of notes on this:
- By default it forces the screen orientation to landscape. This might be fine but it does not seem to go away until reboot. I'm using 'Use System Settings' and letting scrcpy control this.
- Launch scrcpy after you've changed the screen setting of the app for scrcpy to show the screen in the right size.
- I'm still playing with the sizing but you can have a much bigger screen with this desktop mode or not. If you want desktop mode you just need to load the launcher that supports it. Taskbar for example and I'm sure there are others.
I am using scrcpy with 4 monitors other than my phone's screen. I do that by simply simulating virtually secondary displays using the global setting overlay_display_devices which used in developer settings "Simulate Secondary Displays". I can simulate up to 4 3840x2160 displays by this command
adb shell settings put global overlay_display_devices 3840x2160/480\;3840x2160/480\;3840x2160/480\;3840x2160/480
and then run this command to find each display's id so I can mirror it by --display ID (every time I change the overlay_display_devices value it gives the displays new ids)
adb shell dumpsys display | findstr /r /c:"Display [0-9][0-9]*"
my problem is that with the simulated displays my phone screen gets crammed with semi-transparent displays. I wish if scrcpy can trick the phone that it is connected to some sort of external display or at least simulate non-visible screens that don't pop up on the main (phone) screen.
I enabled force desktop mode with the new taskbar 6.0 to give the external displays a taskbar and SecondaryDisplays to quickly test dpi and hide nav bar or android 10 gestures bill.

@i39MT Thank you for the trick.
However, on my OnePlus 7 Pro, if a add a simulated secondary display, mirroring it displays a blank screen.
@i39MT Thank you for the trick.
However, on my OnePlus 7 Pro, if a add a simulated secondary display, mirroring it displays a blank screen.
Have you enabled "Enable freeform windows" and "Force activities to be resizable" in dev settings?
@i39MT Thank you for the trick. However, on my OnePlus 7 Pro, if a add a simulated secondary display, mirroring it displays a blank screen.
Have you enabled "Enable freeform windows" and "Force activities to be resizable" in dev settings?
I have the same problem, both enables ("Enable freeform windows" and "Force activities to be resizable") it displays a blank screen only.. (Redmi note 7 - MIUI 12 - Android 10 [EU rom]) EDIT: When the device is locked i can see a desktop lock screen, when unlocked goes black again

@i39MT Thank you for the trick. However, on my OnePlus 7 Pro, if a add a simulated secondary display, mirroring it displays a blank screen.
Have you enabled "Enable freeform windows" and "Force activities to be resizable" in dev settings?
I have the same problem, both enables ("Enable freeform windows" and "Force activities to be resizable") it displays a blank screen only.. (Redmi note 7 - MIUI 12 - Android 10 [EU rom]) EDIT: When the device is locked i can see a desktop lock screen, when unlocked goes black again
![]()
I got the same lockscreen when I lock my phone. The black screen might be because the default launcher, change it to something like nova launcher or taskbar v6.0.
@i39MT Thank you for the trick. However, on my OnePlus 7 Pro, if a add a simulated secondary display, mirroring it displays a blank screen.
Have you enabled "Enable freeform windows" and "Force activities to be resizable" in dev settings?
I have the same problem, both enables ("Enable freeform windows" and "Force activities to be resizable") it displays a blank screen only.. (Redmi note 7 - MIUI 12 - Android 10 [EU rom]) EDIT: When the device is locked i can see a desktop lock screen, when unlocked goes black again
![]()
I got the same lockscreen when I lock my phone. The black screen might be because the default launcher, change it to something like nova launcher or taskbar v6.0.
right now i am using nova launcher, will try with taskbar 6.0
Where in the Android 10 source code do I configure default open to force desktop mode?
Hi, How do you remove app icon, added on desktop from "Add app shortcut" ?? It seems to there is no way to remove any added shortcut...
Im not sure actually im using taskbar as my home app so it can assign a specific launcher to ur phones screen while managing the additional display with a much more optimized interface.
Im not sure actually im using taskbar as my home app so it can assign a specific launcher to ur phones screen while managing the additional display with a much more optimized inter
I am using scrcpy with 4 monitors other than my phone's screen. I do that by simply simulating virtually secondary displays using the global setting overlay_display_devices which used in developer settings "Simulate Secondary Displays". I can simulate up to 4 3840x2160 displays by this command
adb shell settings put global overlay_display_devices 3840x2160/480\;3840x2160/480\;3840x2160/480\;3840x2160/480and then run this command to find each display's id so I can mirror it by --display ID (every time I change the overlay_display_devices value it gives the displays new ids)
adb shell dumpsys display | findstr /r /c:"Display [0-9][0-9]*"my problem is that with the simulated displays my phone screen gets crammed with semi-transparent displays. I wish if scrcpy can trick the phone that it is connected to some sort of external display or at least simulate non-visible screens that don't pop up on the main (phone) screen.
I enabled force desktop mode with the new taskbar 6.0 to give the external displays a taskbar and SecondaryDisplays to quickly test dpi and hide nav bar or android 10 gestures bill.
would you help me sir, i have compeleted all your steps when i reached to display's id i types the display id's like --Display 0 and press enter the command doesn't recognised. sir please help i want use my pc as secondary diplay as android dex in android 10
what do you got when you type:
adb shell dumpsys display | findstr /r /c:"Display [0-9][0-9]*"
On Tue, Dec 1, 2020, 14:27 Mksuthar-de [email protected] wrote:
Im not sure actually im using taskbar as my home app so it can assign a specific launcher to ur phones screen while managing the additional display with a much more optimized inter
I am using scrcpy with 4 monitors other than my phone's screen. I do that by simply simulating virtually secondary displays using the global setting overlay_display_devices which used in developer settings "Simulate Secondary Displays". I can simulate up to 4 3840x2160 displays by this command adb shell settings put global overlay_display_devices 3840x2160/480;3840x2160/480;3840x2160/480;3840x2160/480
and then run this command to find each display's id so I can mirror it by --display ID (every time I change the overlay_display_devices value it gives the displays new ids) adb shell dumpsys display | findstr /r /c:"Display [0-9][0-9]*"
my problem is that with the simulated displays my phone screen gets crammed with semi-transparent displays. I wish if scrcpy can trick the phone that it is connected to some sort of external display or at least simulate non-visible screens that don't pop up on the main (phone) screen.
I enabled force desktop mode with the new taskbar 6.0 to give the external displays a taskbar and SecondaryDisplays to quickly test dpi and hide nav bar or android 10 gestures bill.
[image: Screenshot (2)] https://user-images.githubusercontent.com/66570391/83979084-6a889f00-a914-11ea-83ec-13ad0b2b96b6.png
would you help me sir, i have compeleted all your steps when i reached to display's id i types the display id's like --Display 0 and press enter the command doesn't recognised. sir please help i want use my pc as secondary diplay as android dex in android 10
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Genymobile/scrcpy/issues/1413#issuecomment-736460051, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP34RF6JUE4UNKKUHEI3RB3SSTHJNANCNFSM4NGF2DYA .
what do you got when you type: adb shell dumpsys display | findstr /r /c:"Display [0-9][0-9]" … On Tue, Dec 1, 2020, 14:27 Mksuthar-de @.*> wrote: Im not sure actually im using taskbar as my home app so it can assign a specific launcher to ur phones screen while managing the additional display with a much more optimized inter I am using scrcpy with 4 monitors other than my phone's screen. I do that by simply simulating virtually secondary displays using the global setting overlay_display_devices which used in developer settings "Simulate Secondary Displays". I can simulate up to 4 3840x2160 displays by this command adb shell settings put global overlay_display_devices 3840x2160/480;3840x2160/480;3840x2160/480;3840x2160/480 and then run this command to find each display's id so I can mirror it by --display ID (every time I change the overlay_display_devices value it gives the displays new ids) adb shell dumpsys display | findstr /r /c:"Display [0-9][0-9]" my problem is that with the simulated displays my phone screen gets crammed with semi-transparent displays. I wish if scrcpy can trick the phone that it is connected to some sort of external display or at least simulate non-visible screens that don't pop up on the main (phone) screen. I enabled force desktop mode with the new taskbar 6.0 to give the external displays a taskbar and SecondaryDisplays to quickly test dpi and hide nav bar or android 10 gestures bill. [image: Screenshot (2)] https://user-images.githubusercontent.com/66570391/83979084-6a889f00-a914-11ea-83ec-13ad0b2b96b6.png would you help me sir, i have compeleted all your steps when i reached to display's id i types the display id's like --Display 0 and press enter the command doesn't recognised. sir please help i want use my pc as secondary diplay as android dex in android 10 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1413 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP34RF6JUE4UNKKUHEI3RB3SSTHJNANCNFSM4NGF2DYA .
i got Display 0 : Display 11:
Then:
scrcpy --display 0
scrcpy --display 11
Then:
scrcpy --display 0 scrcpy --display 11
i typed this says scrcpy : unknown option --display
what do you got when you type: adb shell dumpsys display | findstr /r /c:"Display [0-9][0-9]" … On Tue, Dec 1, 2020, 14:27 Mksuthar-de @.*> wrote: Im not sure actually im using taskbar as my home app so it can assign a specific launcher to ur phones screen while managing the additional display with a much more optimized inter I am using scrcpy with 4 monitors other than my phone's screen. I do that by simply simulating virtually secondary displays using the global setting overlay_display_devices which used in developer settings "Simulate Secondary Displays". I can simulate up to 4 3840x2160 displays by this command adb shell settings put global overlay_display_devices 3840x2160/480;3840x2160/480;3840x2160/480;3840x2160/480 and then run this command to find each display's id so I can mirror it by --display ID (every time I change the overlay_display_devices value it gives the displays new ids) adb shell dumpsys display | findstr /r /c:"Display [0-9][0-9]" my problem is that with the simulated displays my phone screen gets crammed with semi-transparent displays. I wish if scrcpy can trick the phone that it is connected to some sort of external display or at least simulate non-visible screens that don't pop up on the main (phone) screen. I enabled force desktop mode with the new taskbar 6.0 to give the external displays a taskbar and SecondaryDisplays to quickly test dpi and hide nav bar or android 10 gestures bill. [image: Screenshot (2)] https://user-images.githubusercontent.com/66570391/83979084-6a889f00-a914-11ea-83ec-13ad0b2b96b6.png would you help me sir, i have compeleted all your steps when i reached to display's id i types the display id's like --Display 0 and press enter the command doesn't recognised. sir please help i want use my pc as secondary diplay as android dex in android 10 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1413 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP34RF6JUE4UNKKUHEI3RB3SSTHJNANCNFSM4NGF2DYA .
i got Display 0 : Display 11:
sir do you have youtube channel ? i will be very helpful you give me a tutorial of each step
what do you got when you type: adb shell dumpsys display | findstr /r /c:"Display [0-9][0-9]" … On Tue, Dec 1, 2020, 14:27 Mksuthar-de @.*> wrote: Im not sure actually im using taskbar as my home app so it can assign a specific launcher to ur phones screen while managing the additional display with a much more optimized inter I am using scrcpy with 4 monitors other than my phone's screen. I do that by simply simulating virtually secondary displays using the global setting overlay_display_devices which used in developer settings "Simulate Secondary Displays". I can simulate up to 4 3840x2160 displays by this command adb shell settings put global overlay_display_devices 3840x2160/480;3840x2160/480;3840x2160/480;3840x2160/480 and then run this command to find each display's id so I can mirror it by --display ID (every time I change the overlay_display_devices value it gives the displays new ids) adb shell dumpsys display | findstr /r /c:"Display [0-9][0-9]" my problem is that with the simulated displays my phone screen gets crammed with semi-transparent displays. I wish if scrcpy can trick the phone that it is connected to some sort of external display or at least simulate non-visible screens that don't pop up on the main (phone) screen. I enabled force desktop mode with the new taskbar 6.0 to give the external displays a taskbar and SecondaryDisplays to quickly test dpi and hide nav bar or android 10 gestures bill. [image: Screenshot (2)] https://user-images.githubusercontent.com/66570391/83979084-6a889f00-a914-11ea-83ec-13ad0b2b96b6.png would you help me sir, i have compeleted all your steps when i reached to display's id i types the display id's like --Display 0 and press enter the command doesn't recognised. sir please help i want use my pc as secondary diplay as android dex in android 10 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1413 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP34RF6JUE4UNKKUHEI3RB3SSTHJNANCNFSM4NGF2DYA .
sir do you have youtube channel ? i will be very helpful you give me a tutorial of each step
scrcpy : unknown option --display
Then use the latest version.
scrcpy : unknown option --displayThen use the latest version.
i am using latest version btw would you suggest me any tutorial video. plzzz
What is the result of scrcpy --version?
dependencies:
- SDL 2.0.12
- libavcodec 58.91.100
- libavformat 58.45.100
- libavutil 56.51.100
You missed the first line, where the scrcpy version is printed (above "dependencies") :smile: