Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does VirtualBox not detect my Android device?

Using VirtualBox 4.2.12, I've set up a Lubuntu 13.04 VM on a Windows 7 host. I specified a USB filter for my Galaxy S, but neither the VM nor VirtualBox detects it.

After searching the internet, I found vboxmanage list usbhost, which does not show my device connected. However, adb devices does list the device, and I can see it in Device Manager. All drivers on the host are up to date.

It seems to me that if I can get VirtualBox to recognize the device, I shouldn't have a problem getting the VM to. So, how come VirtualBox doesn't?

like image 784
Robert Li Avatar asked Jun 04 '13 03:06

Robert Li


1 Answers

I got it working. There were a couple of things that I learned that might be helpful. First of all, I was following this guide.

VirtualBox currently has problems with USB 3 ports. Check that your device is plugged into a USB 2 port. After I did that, my device was able to be detected by vboxmanage list usbhost on my Windows host.

Unfortunately, this didn't completely solve my issue. VirtualBox would list the phone under the Devices menu, and I could select it, but Lubuntu gave me no indication that a device was connected. In fact, lsusb and adb devices both came up empty. I ran dmesg and found this error message:

[ 846.648000] usb 1-1: new high speed USB device using ehci_hcd and address 1
[ 846.675000] usb 1-1: device descriptor read/64, error -32
[ 846.884000] usb 1-1: device descriptor read/64, error -32

I found the following thread and set this variable, which solved my problem.

echo Y | sudo tee /sys/module/usbcore/parameters/old_scheme_first

EDIT I discovered that the problem came up again during restart. After a LOT of trial and error, I found that each time I start up, I have to connect the Android device, then set the old_scheme_first variable, then disconnect and reconnect the device before the VM would recognize it. It's an annoying process, so if anyone has any insight, I'd appreciate it. On the other hand, it's a VM, so I won't have to restart it often =)

like image 144
Robert Li Avatar answered Oct 18 '22 13:10

Robert Li