The Android emulator is based on QEMU. Even if the emulator version is so ancient, there appears to be support for passing USB devices from the host. It does not seem to be available for ARM devices though, the emulated ARM machine does not have a USB controller. (I have already tried enabling all USB host controllers for the goldfish_armv7 kernel based on Linux 3.4, without luck. The default emulator goldfish_armv7 kernel does not even have Host USB enabled.)
如果你不局限于异常低价竞标,并且可以使用x86,那么我建议检查,其图像可使用标准 i386 (or x86_64)。 这也通过在的上使用KVERS延伸,提高了性能。
To passthrough a USB device with of vendor ID 1234 and device ID abcd, you can run the emulator command:
emulator -avd x86-machine -qemu -usb -usbdevice host:1234:abcd
或者,在使用QEMU时:
qemu-system-i386 -m 1G -cdrom android-x86.iso -usb -usbdevice host:1234:abcd
您需要读/批准<代码>/dev/bus/usb/XXX/YYYYY,因为您可以制定一种例如:
SUBSYSTEM!="usb", GOTO="end_skip_usb"
ATTRS{idVendor}=="1234", ATTRS{idProduct}=="abcd", TAG+="uaccess"
LABEL="end_skip_usb"
现在,在插入USB装置后,贵方应承认一个USB装置。 测试的是在一个有安乐S864.3图像的含水层安装。