Repository navigation
Conversation
|
This is awesome! Nice work! |
rom1v
force-pushed
the
dev
branch
2 times, most recently
from
January 27, 2022 18:02
7e8a942 to
c0de365
Compare
Add an option --otg to run scrcpy with only physical keyboard and mouse simulation (HID over AOA), without mirroring and without requiring adb. To avoid adding complexity into the scrcpy initialization and screen implementation, OTG mode is implemented totally separately, with a separate window. PR #2974 <#2974>
|
@rom1v Would it be possible to also add mirroring to this OTG mode which doesn't require USB debugging? This would be especially useful for broken screens :'D thanks in advance |
Collaborator
Author
|
@BachoSeven This is not possible without installing an app on the device and authorizing capture, so that would not work with a broken screen. |
|
I tried installing scrcpy v1.22 on Ubuntu 20.04 thru snap but the terminal shows my scrcpy is still v1.12? How do I run v1.22 in Ubuntu 20.04? |
Collaborator
Author
Uninstall the one from the distribution ( |
rom1v
added a commit
that referenced
this pull request
Feb 3, 2026
Originally, the default scrcpy window always displayed the video stream. Since the OTG mode window only contains the scrcpy logo, it was implemented as a separate component [1]. Later, the --no-video option was added [2] to control the device without mirroring (while still using an adb connection, unlike OTG mode). To support this, sc_screen gained the ability to display a window containing only the scrcpy logo, like in OTG mode. As a result, the main sc_screen component can now be reused in OTG mode, allowing removal of the OTG-specific duplicate implementation (sc_screen_otg). [1] commit 91418c7 [2] commit 8c650e5 Refs #2974 <#2974> Refs #3978 <#3978>
rom1v
added a commit
to rom1v/scrcpy
that referenced
this pull request
Feb 4, 2026
Originally, the default scrcpy window always displayed the video stream. Since the OTG mode window only contains the scrcpy logo, it was implemented as a separate component [1]. Later, the --no-video option was added [2] to control the device without mirroring (while still using an adb connection, unlike OTG mode). To support this, sc_screen gained the ability to display a window containing only the scrcpy logo, like in OTG mode. As a result, the main sc_screen component can now be reused in OTG mode, allowing removal of the OTG-specific duplicate implementation (sc_screen_otg). [1] commit 91418c7 [2] commit 8c650e5 Refs Genymobile#2974 <Genymobile#2974> Refs Genymobile#3978 <Genymobile#3978>
rom1v
added a commit
that referenced
this pull request
Feb 4, 2026
Originally, the default scrcpy window always displayed the video stream. Since the OTG mode window only contains the scrcpy logo, it was implemented as a separate component [1]. Later, the --no-video option was added [2] to control the device without mirroring (while still using an adb connection, unlike OTG mode). To support this, sc_screen gained the ability to display a window containing only the scrcpy logo, like in OTG mode. As a result, the main sc_screen component can now be reused in OTG mode, allowing removal of the OTG-specific duplicate implementation (sc_screen_otg). [1] commit 91418c7 [2] commit 8c650e5 Refs #2974 <#2974> Refs #3978 <#3978> PR #6649 <#6649>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an option
--otgto run scrcpy with only physical keyboard (#2632) and mouse (#2916) simulation, without mirroring and without requiring adb (USB debugging), as if the computer keyboard and mouse were plugged directly to the device via an OTG cable.scrcpy --otg # Pass the serial if several USB devices are available scrcpy --otg -s 0123456789abcdefThis opens a window (with just the scrcpy logo, there is no mirroring), which when focused forwards the keyboard and mouse to the device:
The mouse capture works the same way as in "normal" mode (as explained in #2916):
Like
--hid-keyboardand--hid-mouse,--otgonly works if the device is connected by USB, and is currently only supported on Linux.