VirtualBox

Opened 14 years ago

Closed 8 years ago

#6620 closed defect (obsolete)

Android debugger bridge does not work over USB

Reported by: Tim W Owned by:
Component: USB Version: VirtualBox 4.1.14
Keywords: adb Cc: timw@…
Guest type: Windows Host type: Linux

Description (last modified by Frank Mehnert)

Firstly thank you for making VirtualBox. It is a truly amazing piece of software. I have noticed in both VirtualBox 3.1.6 and 3.2 beta that I am unable to use adb to connect to a usb device through virtualbox. I am using Lucid Lynx Linux 64bit host with a Windows XP 32-bit guest. The XP guest has the android sdk installed and I am trying to use adb to debug the device. I can connect the device and the adb drivers can be installed. Furthermore the command "adb devices" reveals that adb detects the device (tested on both a HTC Hero and X10). However commands such as "adb logcat" and "adb shell" result in adb printing "- waiting for device -" forever.

E.g: C:\android-sdk-windows\tools>adb devices List of devices attached CB511ED1D8 device

C:\android-sdk-windows\tools>adb logcat

  • waiting for device -
  • waiting for device -
  • waiting for device -
  • waiting for device -

...

Attachments (1)

Logs.zip (70.2 KB ) - added by matteo sisti sette 12 years ago.

Download all attachments as: .zip

Change History (18)

in reply to:  description comment:1 by joao.amaro@gmail.com, 13 years ago

Replying to tw33:

Firstly thank you for making VirtualBox. It is a truly amazing piece of software. I have noticed in both VirtualBox 3.1.6 and 3.2 beta that I am unable to use adb to connect to a usb device through virtualbox. I am using Lucid Lynx Linux 64bit host with a Windows XP 32-bit guest. The XP guest has the android sdk installed and I am trying to use adb to debug the device. I can connect the device and the adb drivers can be installed. Furthermore the command "adb devices" reveals that adb detects the device (tested on both a HTC Hero and X10). However commands such as "adb logcat" and "adb shell" result in adb printing "- waiting for device -" forever.

E.g: C:\android-sdk-windows\tools>adb devices List of devices attached CB511ED1D8 device

C:\android-sdk-windows\tools>adb logcat

  • waiting for device -
  • waiting for device -
  • waiting for device -
  • waiting for device -

...

Same problem here with VirtualBox 3.2.8 r64453 and ubuntu 10.10 as Host, Windows XP as guest

comment:2 by johnpeters, 13 years ago

Same problem with VirtualBox 4.0.8 and Debian Wheezy as Host, Windows 7 as guest

comment:3 by NoahY, 13 years ago

Just looking for an answer to this problem myself... turns out, turning off USB 2.0 allows me to connect with adb.exe shell. Maybe someone can confirm?

1) close the virtual machine 2) in settings>USB, uncheck the 2.0 box 3) start vm 4) open cmd, try running adb.exe shell from adb directory.

comment:4 by kwinz, 12 years ago

Still not fixed: tried disconnecting, reconnecting, switch etc. to no avail

usb 2.0

Android mass storage device works
adb devices shows the Android phone,
but it is "offline" and adb shell and adb logcat don't work

usb 1.0

Android mass storage does not work.
adb devices shows nothing

Please fix this!

comment:5 by AlexChe, 12 years ago

VirtualBox: 4.1.8 r75467 Host: Windows 7 Ultimate 64-bit Guest: Windows XP Professional SP3

USB 2.0 EHCI setting is enabled: 'adb devices' lists the connected device 'adb -d logcat' loops spawning '- waiting for device -'

USB 2.0 EHCI setting is disabled: 'adb devices' lists the connected device 'adb -d logcat' output the device log and other ADB functionality basically works.

Version 0, edited 12 years ago by AlexChe (next)

comment:6 by matteo sisti sette, 12 years ago

I think I have the same problem here: Windows 7 64bit guest on Ubuntu 11.10 host. VB 4.1.10

I haven't tried with adb directly, but I'm using Flash Builder 4.6 on the guest and trying to debug an AIR app on Android. No way to get it to work. It lists the device but says it is "offline".

comment:7 by Frank Mehnert, 12 years ago

Description: modified (diff)
Version: VirtualBox 3.1.6VirtualBox 4.1.14

by matteo sisti sette, 12 years ago

Attachment: Logs.zip added

comment:8 by matteo sisti sette, 12 years ago

Yes I do have the Extension Package installed. However, when I attach my webcam (it's a builtin webcam and it is seen as a USB device) I get the warning that it is a USB 2.0 device which could be faster if attached to a USB2.0 port!! I mention this because it means something is wrong with USB 2.0 support (unless the builtin webcam internally is actually attached to a usb 1.0 port which I strongly doubt)

comment:9 by ravnacrta, 12 years ago

Same problem here, VirtualBox 4.1.16 r78094

Host: Windows 7 Home Premium 64-bit
Guest: Windows 7 Home Premium 64-bit

USB 2.0 EHCI setting is enabled:
'adb devices' lists the connected device
'adb -d logcat' loops spawning '- waiting for device -'

USB 2.0 EHCI setting is disabled:
'adb devices' lists nothing

tried plugging, unplugging, restarting etc.. i can copy files to the phone if i unmount the sd card in the phone, so the usb is actually working. I have the same usb drivers installed in guest as in host which works with adb. I've tried with two phones, one old Samsung Galaxy Spica I5700 with Android 2.2, one new HTC Evo3D with 2.3. VmWare player also works ok.. :(

Does adb work for anyone?

comment:10 by Shawn, 12 years ago

Same issue here - detected by 'adb devices' but 'adb install' hangs. My workaround is to copy the generated apk file over to the device's storage and install from there. I hope this gets fixed soon though.

comment:11 by Brian Bourke-Martin, 12 years ago

I am also having this issue. Seems like there are "parts" of the usb communications which for some reason or another are not making it through.

ubuntu 12.04 host (VBox 4.2.0)
Windows 7 guest
Phone Samsung Captivate

comment:12 by ayesh, 11 years ago

I have the same problem.
Host OS: Windows 7 x64 ultimate
Guest OS: CentOS 6.3 x64
Virtual Box 4.2.6

comment:13 by Bruno, 11 years ago

Same problem here... Host: Ubuntu 12.04.2 LTS - 64 bits Guest: Win7 SP1 - 32 bits

Any hope on this? If you need anything, just ask.

comment:14 by androidusb, 11 years ago

Got it to work (Host: Win7 / Guest: Debian Wheezy)

Assuming you have your USB device properly set up in the VM settings, open a root shell in the guest and enter the following:

echo Y > /sys/module/usbcore/parameters/old_scheme_first

Afterwards, reconnect your phone via USB.

Additional info: you must run adb as root in order to be able to connect to your phone:

user@guest:~$ adb kill-server
root@guest:~# adb -d shell
shell@android:/ $

Good luck!

Last edited 11 years ago by androidusb (previous) (diff)

comment:15 by renanyoy, 10 years ago

same problem, I've tried everything, but I can't debug my android devices. host: ubuntu 13.04 guest: windows 8

till it's fixed, I can't use VirtualBox and I need to dual boot on windows.

comment:16 by renanyoy, 10 years ago

my bad, I had forgot to install the google usb drivers on the guest (windows)...

comment:17 by aeichner, 8 years ago

Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use