Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top