VirtualBox

Ticket #6620 (new defect)

Opened 4 years ago

Last modified 5 months ago

Android debugger bridge does not work over USB

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

Description (last modified by frank) (diff)

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

Logs.zip Download (70.2 KB) - added by matteosistisette 2 years ago.

Change History

comment:1 in reply to: ↑ description Changed 4 years ago by ashes

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 Changed 3 years ago by johnpeters

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

comment:3 Changed 3 years ago by NoahY

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 Changed 2 years ago by kwinz

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 Changed 2 years ago by AlexChe

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 2 years ago by AlexChe (next)

comment:6 Changed 2 years ago by matteosistisette

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 Changed 2 years ago by frank

  • Version changed from VirtualBox 3.1.6 to VirtualBox 4.1.14
  • Description modified (diff)

Changed 2 years ago by matteosistisette

comment:8 Changed 2 years ago by matteosistisette

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 Changed 23 months ago by ravnacrta

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 Changed 22 months ago by Odhin

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 Changed 19 months ago by brianbourke75

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 Changed 15 months ago by ayesh

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

comment:13 Changed 11 months ago by brunojcm

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 Changed 8 months ago by androidusb

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 8 months ago by androidusb (previous) (diff)

comment:15 Changed 5 months ago by renanyoy

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 Changed 5 months ago by renanyoy

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

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use