-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support samsung dex mirroring #898
Comments
This would be great! DeX on Windows offers this functionality, so it shouldn't be to difficult to somehow trick the phone into displaying in Dex mode |
i think this would only be useful if it would be possible to use drm-content in scrcpy |
Not really. Dex can do much more than playing Netflix. |
scrcpy is already absolutely amazing - I love it! |
See #397 |
Could you test the new |
Here is a win64 release for the current SHA256
(replace these two files in the v1.12.1 release) |
I have tested it on my samsung galaxy note10+,
Display 0 works like usual
Display 2 has only black screen. And it doesn't have any response. |
OK, thank you for the test 👍 So this flag is not set (whatever it means) for Dex… 😞 |
Cool, thanks 👍 (While you're here, could you test rotation with |
Rotation worked but the launcher did not adjust itself. That might be a limitation with the Dex launcher though. Clicks worked as expected too. If we can find a way to trigger Dex manually, this would be perfect. scrcpy with a high bit rate seems to be much smoother than the Dex application. |
Yes, that's expected, this is just a local rotation, for applications like Camera or video conferencing apps which keep their system orientation but rotate their widgets (in that case, it is convenient to rotate the display manually). To rotate the app, it's
(TBH, I don't really know what Dex is, so I hope other people will find a way 😉) |
Sorry, I only checked single clicks previously and they worked. But double-clicking doesn't work when rotated. And right-click does not work in any state.
|
Dex is the Samsung's "Android desktop mode" and it's triggered if you attach an external monitor to a Samsung smartphone with a cable. In practice you have a desktop computer using only your smartphone and an external monitor. What @DishanRajapaksha means with "trigger Dex manually" (I guess since I'm looking for this solution too) is to make the smartphone to think that and external monitor is attached but without attaching an HDMI cable to the smartphone. It could be the final perfect solution to have a wireless "Android desktop mode" :) |
A double-click outside the device content (in the black borders) resizes so that black borders are removed. But the display rotation was not taken into account to detect the content. Use the content size instead of the frame size to fix the issue. Ref: <#898 (comment)>
Oh, good catch! Fixed by 9f4735e.
Right-click is bound to BACK, because on "normal" devices, there is no meaningful "right-click". 😕
Dex maybe does not support rotation at all. If you use |
Ah yes. I forgot that. Dex has some right-click menus just like what you'd find in Windows. Also, Dex freeform windows have 'resize' cursor icon when the cursor is moved to window edges. That's not triggering in scrcpy.
I think this is the case, nothing happens in the Dex window when I press Ctrl+r.
Yes. Device display apps get changed. |
Did you try running the |
If you can build scrcpy, you could play with the source code to do some tests: scrcpy/app/src/input_manager.c Lines 494 to 497 in 9f4735e
😉 |
Thank you. I'll fiddle around and see what I can do 😄 |
Released in v1.13. |
As far as I understood, the only way right now to make Dex run is either to have an HDMI cable connected or as @DishanRajapaksha mentioned, using the Windows Dex program, which defeats the purpose... I mean, the original question by @subjectdenied is if it can run on Linux. The original Dex program (which is needed as @DishanRajapaksha mentioned) has no Linux version. Did you @webian find any solution yet? I'm not sure if I'm missing something, but I don't see the solution to the main question of this issue. |
Another new way recently added by Samsung is to cast Dex wirelessly to a TV or a Windows PC supporting Miracast (or a monitor with a wireless dongle I suppose). |
Miracasting doesn't support input unfortunately. I couldn't figure out a way at least on my Windows PC with the Connect app. I have seen some people talking about tricking the phone to think that an HDMI is connected using a dummy HDMI plug. See this link for more info. I wonder if we can do do it virtually? Make the phone think an HDMI is connected suing an app? |
I found this post but the linked apk doesn't work. Its a post from 2013, so that's expected I guess. |
Exactly @DishanRajapaksha, we need an HDMI Virtual Switch. Some software that make the phone (more precisely Dex) think HDMI cable is connected. Then we can use Dex with scrcpy wirelessly. |
@DishanRajapaksha I think the app you mentioned works only on rooted devices. It actually doesn't do much. It just runs this command I was able to decompile the app and this is the code of the main activity:
Someone with access to a rooted Samsung device should be able to test this hypothesis. I have also taken a look at the logs and the local loop back traffic while using the windows program. It seems that samsung are able to achieve this by communicating with some system app on the device. It's maybe worth it to try and reverse engineer what they are doing. The communication appears to be secured with an authentication mechanism tho... tbc |
Hello guys, any news on this? Is there by chance a way to have samsung dex streamed through scrcpy without using a hdmi cable? |
You should read #1887 (for Android 10+). |
Thank you, I'll check that, but I was interested specifically in streaming samsung dex and not android desktop mode. |
@wokawoka If your linux device have wifi capabilities, you can try miraclecast as display sink, launch wireless dex to it, then stream dex by running |
@4nric |
@wokawoka Glad it works! I was not able to test it myself as I don't have a Linux laptop nor a PC running Linux with wifi capabilities. |
Hi! Is there a way to run miracast locally without other devices? (like dummy/fake miracast) I'm using a mid range device (A50) with flagship based firmware, so I can't use the HDMI adapter. There are 2 ways left, wireless and DEX on PC, I have a usb wi-fi adapter but it sucks, it can reset the Miracast connection at any time. Using Dex on PC is only possible on Windows and MacOS, Linux was left without support. It would be nice to make the phone think that it is connected to a miracast device) |
Is there a way to display screen in 1080P without using dex please ? |
as there is currently no way to use "samsung dex for pc" on linux desktops, it would be great to be able to use scrcpy for it
The text was updated successfully, but these errors were encountered: