Skip to content
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

OTG error and Hid errors #3098

Open
BiskottoScriptato opened this issue Mar 8, 2022 · 12 comments
Open

OTG error and Hid errors #3098

BiskottoScriptato opened this issue Mar 8, 2022 · 12 comments

Comments

@BiskottoScriptato
Copy link

  • [✓] I have read the FAQ.
  • [✓] I have searched in existing issues.

Environment

  • OS: Windows 11 x64
  • scrcpy version: 1.23
  • installation method: Downloaded the folder from github
  • device model: S7
  • Android version: 8

When i try to use the otg i get this error:

scrcpy 1.23 https://github.com/Genymobile/scrcpy
INFO: Killing adb daemon (if any)...
ERROR: Could not find any USB device

and when i try to use the command --hid-keyboard i get this:

ERROR: On Windows, it is not possible to open a USB device already open by another process (like adb).
ERROR: Therefore, -K/--hid-keyboard and -M/--hid-mouse may only work in OTG mode (--otg).

@rom1v
Copy link
Collaborator

rom1v commented Mar 8, 2022

Is USB debugging enabled on your device or not? On Windows, there is a problem if USB debugging is not enabled: #3050.

@gilxion117
Copy link

I'm also having this problem. USB debugging is already enabled in my Phone. I'm using Samsung Galaxy S20 FE on Windows 7 Pro.

@BiskottoScriptato
Copy link
Author

Is USB debugging enabled on your device or not? On Windows, there is a problem if USB debugging is not enabled: #3050.

yes it's enabled

@oaksoftYH
Copy link

I'm also having the same problem and my debug is active.

@laminedown
Copy link

I find a little solution on windows 11.

1- run scrcpy in OTG : scrcpy --otg -s xxxxxxxx
2- back to your shell & force close the process with CTRL + C
3- run scrcpy, now you should got scrcpy without the keyboard

@MatthijsMarco
Copy link

MatthijsMarco commented Apr 15, 2022

I can confirm the same behavior. USB debugging is enabled, with the normal non-otg version working as intended. It doesn't seem to find my device either.

INFO: Killing adb daemon (if any)...
ERROR: Multiple (5) USB devices:
.
. (Devices left out for privacy, but my Android device is not among them.)
.
ERROR: Select a device via -s (--serial)

Is there any progress on this issue? Thanks!

@Abdullah-onGit
Copy link

facing same issue, can able to mirror screen and able to use keyboard and mouse.
but scrcpy --otg not working. getting below error
INFO: Killing adb daemon (if any)...
ERROR: Could not find any USB device

@fw-real
Copy link

fw-real commented Mar 31, 2023

how do i even mirror screen and use keyboard/mouse controls for me only one of them works in windows10

@rom1v
Copy link
Collaborator

rom1v commented Mar 31, 2023

how do i even mirror screen and use keyboard/mouse controls

(You mean keyboard/mouse HID controls, I guess.) Yes, on Windows you can't have both mirroring and HID.

See https://github.com/Genymobile/scrcpy/blob/master/doc/hid-otg.md

Note: On Windows, it may only work in OTG mode, not while mirroring (it is not possible to open a USB device if it is already open by another process like the adb daemon).

@fw-real
Copy link

fw-real commented Mar 31, 2023

how do i even mirror screen and use keyboard/mouse controls

(You mean keyboard/mouse HID controls, I guess.) Yes, on Windows you can't have both mirroring and HID.

See https://github.com/Genymobile/scrcpy/blob/master/doc/hid-otg.md

Note: On Windows, it may only work in OTG mode, not while mirroring (it is not possible to open a USB device if it is already open by another process like the adb daemon).

is it possible to use the linux wsl instead so i can mirror and have the keyboard/mouse hid controls at the same time

@rom1v
Copy link
Collaborator

rom1v commented Mar 31, 2023

is it possible to use the linux wsl instead so i can mirror and have the keyboard/mouse hid controls at the same time

I don't know, I never tried wsl.

But a LiveCD/LiveUSB of a linux distribution should be sufficient to test. You could download the latest Ubuntu, "burn" it to USB key (with rufus for example), and boot on your USB.

@TangentSquared
Copy link

I have an interesting case of solving this problem. I have Samsung Galaxy M02. In my windows pc I did not have the Samsung USB Driver and the scrcpy --otg did not work, so I installed the driver and even after that it did not work. Then, I deleted the driver and tried again. This time it magically works as it should. I don't know why did this happen but you can try this method if you are having problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants