문제

I need test a simple USB Host android application similar to this:

UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
...  
HashMap<String, UsbDevice> deviceList = manager.getDeviceList();
UsbDevice device = deviceList.get("deviceName");

However, due to lack of real device which support USB Host I need to run this on a emulator or Android x86 (Android v4.2) virtual machine.

What are the options on testing a USB Host application without the need of real phone.

UPDATE:

Ok, I tested with an Andoid-x86 ICS on VMware player, and it seems that I can see USB being detected:

dmesg | grep "usb"

Then I see

scsi2: usb-storage 1-1:1.0

Then when I disconnect the device and run dmesg again

I see:

usb 1-1: USB disconnected, device number 2

도움이 되었습니까?

해결책

I dont think there are enough options for this see Emulator Limitations

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top