Issue
When I try to use USB passthrough as described in https://androidstudio.googleblog.com/2020/08/emulator-30024-canary.html,
emulator -avd Pixel_3a_API_30_x86 -qemu -usb -device usb-host,vendorid=076B,productid=3821
I get the error message 'usb-host' is not a valid device model name
. According to the Google link, USB passthrough should be supported from emulator version 30.0.24 and my emulator reports version 30.5.3.0 (build_id 7196367).
Has anyone succeeded in getting this to work?
Solution
No! Same with Android emulator version 30.5.4.0 (build_id 7243153).
If I look binary into the Linux version of the qemu emulator file,
I can still find the usb-host option. But it is totally left out
in the Windows Version.
So I guess Google must have switched the usb-host
support in Windows off.
Unfortunately the last Release Notes from the emulator is
from 30.4.5 (February 23, 2021)
Also I can't find any hint about this in the android-review AOSP Don't know where else to look!?
[Update:]
I think I've found it, on the GitHub AOSP Mirror and android-review AOSP.
From Erwin Jansen committed on 3 Mar:
Revert "Enable usb host redirection for Windows"
# Libusb support on windows is not what we would like it to be
LIBUSB_FLAGS="--disable-libusb --disable-usb-redir"
It looks like the USB Pass Through Feature on Windows was just too buggy.
So, If one would get back to Version 30.5.2 (build_id 7175973) (Feb 27, 2021)
the usb-host will still be a valid device model name.
The DL was taking from a Canary Channel.
But it looks like Google is still working on it...
[Update 10.12.21]
Since Emulator Version 31.1.4 google implemented some new features and tools
to pass USB through.
I couldn't find the -list-usb parameter with emulator -help, but it works
if you run:
emulator -list-usb
VID:PID 058f:6387 (Bus 1, Port 5.1.1)
Manufacturer:
Product:
SerialNumber: 40A0FE0A
With this information, you can use the -usb-passthrough parameter
(-usb-passthrough vendorid=VID,productid=PID[,hostbus=BUS,hostport=PORT])
emulator -netdelay none -netspeed full -avd Pixel_4_API_31 -usb-passthrough vendorid=058f,productid=6387,hostbus=1,hostport=5.1.1
but it shows the error:
ERROR | Cannot load Android USB Assistant Driver for USB device "vendorid=058f". USB pass-through might not work.
Again a new tool Google added, with the prebuilt Windows drivers for USB passthroug one could try it again. Downloadable directly from the AOSP (tgz)
run as admin:
Install_Drivers.bat
Installing Android USB Assistant...
call Android_USB_Assistant_Install.bat
Microsoft PnP Utility
Processing inf : Android_USB_Assistant.inf
Successfully installed the driver.
Driver package added successfully.
Published name : oem89.inf
Total attempted: 1
Number successfully imported: 1
Installing Android Emulator USB Passthrough Assistance Driver
SERVICE_NAME: UsbAssist
TYPE : 1 KERNEL_DRIVER
STATE : 1 STOPPED
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
[SC] DeleteService SUCCESS
SERVICE_NAME: UsbAssist
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 0
FLAGS :
But trying it again, still shows the same error.
Answered By - NewBit
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.