-
-
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
OTG on Windows 10/11 (libusb error: Operation not supported or unimplemented on this platform) #3654
Comments
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. |
Let's begin with USB debugging off, default mode:
Well that's no good. Let's enable USB debugging.
Cool. But not the problem. Let's try again, to remember where we began:
Right. disables USB debugging again
The exact same behavior? So the problem is still with scrcpy. What benefit would trying on linux offer? |
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! |
Ok, I've played a little bit more with the drivers, and at least for me, with the Google USB Driver everything works (
scrcpy_google_adb_driver.mp4 |
I installed Ubuntu 22.04 on my laptop and tested scrcpy...
|
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 |
This is definitely the key to the issue. USB Debugging has to be on, because it is using the adb device to connect. Once I found that device and forced it to use the downloaded google version, I was able to get it to work. A window pops up with an android icon and I have mouse control of the tablet. Importantly, the devices in my devmgr are totally different than your screencap. I had to unhide stuff and go deep. So the challenge for scrcpy on windows is to either implement the known good driver or test around the more commonly installed one. This brute force method you found is a fairly heavy handed workaround. Great work! |
(not in OTG mode) (or maybe you're saying that this is necessary for the driver to work?) |
I just added a FAQ entry: https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#hidotg-issues-on-windows |
Hey guys, What do i choose in the tablet for the USB: File Transfer / PTP / Nothing ? Thanks. |
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. |
This is true. Because Windows USB API is bad, programs have to use an allowlist to determine which device is accessible. Usually, they only include the Windows built-in composite device driver ( I had previously filed a bug for Chrome at https://crbug.com/1127206, and I have created a PR for libusb (libusb/libusb#1331) to fix that. |
Could you please retry with scrcpy v2.4? Refs #4713 (comment) |
Hi! Good evening, I am addressing this post because I have been reading and reading posts related to this topic about this problem for approximately 4 hours. I am going to clarify that this took a lot of time for me because I don't know English, I only speak Spanish and therefore I use Google Translate to better understand everything they say. Having said that, I want to say that my problem is the following, when I want to use the OTG mode, when typing that command in the CMD it gives me the same error as several of those who commented and I tried many things and I still can't solve it, I want to use the OTG mode on my Xiaomi redmi note 11 cell phone and I can't do it yet, I have only been able to use the normal mode. |
It detected your logitech gaming mouse as USB device. Pass the serial of your Xiaomi phone:
|
It'd be nice if it could detect these HID type of devices and ignore them, or have a config file where it could be manually listed to eliminate requiring a special command line each time. |
Yes, it should only list adb devices. It's not that straightforward to detect unambiguously IIRC). PR welcome. There is an environment variable |
|
Hello, I want to have the image of the phone screen and control the phone with the otg function with the mouse and keyboard, is this possible? |
I'm confused by the OTG mode. |
Except on Windows. I guess it's possible to patch the driver using Zidig but I haven't tried. |
Environment
- 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.
The text was updated successfully, but these errors were encountered: