scrcpy: OTG on Windows 10/11 (libusb error: Operation not supported or unimplemented on this platform)
Environment
- OS: Windows 10 Pro & Windows 11 Pro
- scrcpy version:
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
Dependencies (compiled / linked):
- SDL: 2.0.22 / 2.0.22
- libavcodec: 59.18.100 / 59.18.100
- libavformat: 59.16.100 / 59.16.100
- libavutil: 57.17.100 / 57.17.100
- libusb: - / 1.0.26
- installation method: choco install scrcpy
- device model: Samsung Galaxy Tab S7+ (SM-T970)
- Android version: 13
- More details: - USB cable from PC to Tablet - problem recreated with two systems (Win10 vs Win11) and two tablets (both same model/release) with and without adb installed
Describe the bug While screen remoting works great (impressively clean implementation!), I am unable to get --otg mode to work. It appears like an incompatibility or limitation in Windows? There are a number of issues that smell similar but have cryptic titles and slightly different output, so I’ve made this as a new issue.
My aim is to get a clear answer as to whether otg support for windows is confirmed a no-go or not.
PS ~> scrcpy --otg
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
INFO: Killing adb daemon (if any)...
INFO: USB device: 0D6F385C3731 (046d:c08b) Logitech G502 HERO SE
WARN: On this platform, libusb does not have hotplug capability; device disconnection will not be detected properly
ERROR: REGISTER_HID: libusb error: Entity not found
WARN: Register HID keyboard failed
PS (admin) ~> scrcpy --otg -M
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
INFO: Killing adb daemon (if any)...
INFO: USB device: 0D6F385C3731 (046d:c08b) Logitech G502 HERO SE
WARN: On this platform, libusb does not have hotplug capability; device disconnection will not be detected properly
ERROR: REGISTER_HID: libusb error: Entity not found
WARN: Register HID mouse failed
PS (admin) ~> scrcpy --otg -Vdebug
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
INFO: Killing adb daemon (if any)...
DEBUG: Open USB device 04e8:6860: libusb error: Operation not supported or unimplemented on this platform
DEBUG: USB device found:
DEBUG: --> 0D6F385C3731 (046d:c08b) Logitech G502 HERO SE
INFO: USB device: 0D6F385C3731 (046d:c08b) Logitech G502 HERO SE
WARN: On this platform, libusb does not have hotplug capability; device disconnection will not be detected properly
ERROR: REGISTER_HID: libusb error: Entity not found
WARN: Register HID keyboard failed
PS (admin) ~> scrcpy --otg -s 0D6F385C3731 -Vdebug
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
INFO: Killing adb daemon (if any)...
DEBUG: Open USB device 04e8:6860: libusb error: Operation not supported or unimplemented on this platform
DEBUG: USB device found:
DEBUG: --> 0D6F385C3731 (046d:c08b) Logitech G502 HERO SE
INFO: USB device: 0D6F385C3731 (046d:c08b) Logitech G502 HERO SE
WARN: On this platform, libusb does not have hotplug capability; device disconnection will not be detected properly
ERROR: REGISTER_HID: libusb error: Entity not found
WARN: Register HID keyboard failed
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 1
- Comments: 18 (1 by maintainers)
Commits related to this issue
- Add FAQ section about HID/OTG on Windows Refs #3654 <https://github.com/Genymobile/scrcpy/issues/3654> — committed to Genymobile/scrcpy by rom1v a year ago
- Add FAQ section about HID/OTG on Windows Refs #3654 <https://github.com/Genymobile/scrcpy/issues/3654> — committed to Genymobile/scrcpy by rom1v a year ago
- Add FAQ section about HID/OTG on Windows Refs #3654 <https://github.com/Genymobile/scrcpy/issues/3654> — committed to Genymobile/scrcpy by rom1v a year ago
I just tried this on my Windows 11 and Galaxy S22 Ultra. It didn’t worked at first, but reading the other issues I saw users complaining about different ADB/Device drivers for their devices.
With the official Samsung Android USB drivers installed it didn’t work. I uninstalled this package from Control panel, then I uninstalled the drivers from Windows Device Manager.
After uninstalling all drivers, it works:
Windows 11 + S22 Ultra Android 13 + without official Samsung Android drivers - it works excellent.
With the official Samsung drivers I get the following error:
@geekaz01d I recommend you to try different ADB drivers for your device and see if it works. Some documentation about USB drivers from Google: https://developer.android.com/studio/run/oem-usb#Drivers. Maybe you find something there
Offtopic: @rom1v I appreciate all your work, excellent application and blog posts about the app development. I learned a lot from you! Thank you a lot for your hard work!
It seems it does not detect your device over USB (but it happens to detect a mouse, so of course it does not work).
On Windows, it works, except when it does not. 😉
Try without USB debugging enabled (#3050), or try on Linux.
I just added a FAQ entry: https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#hidotg-issues-on-windows
Ok, I’ve played a little bit more with the drivers, and at least for me, with the Google USB Driver everything works (
ADB
,scrcpy
,scrcpy --otg
), but you need to do some extra steps to install them.android_winusb.inf
from unzipped folder -> Choose Android ADB Interfacehttps://user-images.githubusercontent.com/3103859/210287349-fd0e3cbc-5506-4d75-a4a9-f6baada2ceeb.mp4
If scrcpy can’t be made to work with those samsung drivers, it would be nice if it could detect them to identify the issue. Thanks
Hey guys, i’m using a workbased laptop (HP EliteBook Win10) and a workbased tablet (Panasonic FZ-A3) and i would love to use the keyboard / mouse HID configuration, since i can’t root my tablet or make USB Debugging work.
Here’s what i get:
What do i choose in the tablet for the USB: File Transfer / PTP / Nothing ? Thanks.
Thank you for the details 👍
In Ubuntu 22.04, the packaged scrcpy version (1.21) is too old (it’s 1.24 in Ubuntu 22.10). Uninstall the package and install the latest version manually: https://github.com/Genymobile/scrcpy/blob/master/BUILD.md#simple