adb unable to connect to Android-x86 in VirtualBox today
Asked Answered
A

4

17

I WAS successfully installed Android-x86-v3.2-eeepc in VirtualBox for a while. And it is a good method to help me to debug USB host applications on Android. The installation of such configuration is:

  • Install VirtualBox
  • Install Android-x86-v3.2-eeepc image into virtual HDD in VBOX
  • Set network as "host-only"
  • Enter console, type "dhcpcd eth0" to get IP address, like "192.168.56.101"
  • Go to console of host, type "adb connect 192.168.56.101"

Normally, it should be all right to get connected to adb daemon running in Android-in-VBox.

Today, it suddenly prompts me as following:

C:\>adb connect 192.168.56.101
unable to parse 192.168.56.101 as <host>:<port>

I tried to ping its IP. It has a fast response. I tried to enforce IP and port.

C:\>adb connect 192.168.56.101:5554
unable to connect to 192.168.56.101:5554

I have no idea about its root cause. I checked the firewall, VirtualBox is on the Exception List. It still doesn't work.

PC Configuration: Windows XP VirtualBox V4.1

Anomalistic answered 4/9, 2012 at 9:14 Comment(1)
read this meta.stackexchange.com/questions/82825/…Dentation
A
17

To connect Android virtual machine with adb follow these step

  1. On Android home screen, press ALT+F1 (Left alt). This will open a terminal with root access.

  2. Inside the terminal, type dhcpcd eth0. Execute the command twice, if you get an error or no result. This will give you an IP addresss. Now press ALT+F7 for close the terminal.

  3. Verify your IP address using the command ping <your IP Address>

  4. From the android terminal, type adb tcpip 5555. This will restart adb in tcpip mode.

  5. From your main OS terminal, type adb connect <your IP address>

Adactylous answered 19/9, 2013 at 20:56 Comment(3)
It worked! These are the steps that I was looking for. Thanks!Payne
Thanks, it worked for me. But the IP address set by dhcpcd eth0 was not useful (it was 169.254.114.151). I needed to use dhcpcd eth1 instead. Also, after entering the command it did not returned the IP address. I entered ifconfig eth1 to find the IP address (in front of inet addr field). By the way, I am using android-x86 6.0-r3 image.Atli
Got dhcpcd not foundFabozzi
C
3

I use bridged networking for the second adapter and use that IP address; i.e. adb connect 192.168.1.20. You can get the IP in Settings->About Phone->Status.

Curitiba answered 19/4, 2013 at 16:32 Comment(0)
H
0

ALT+F1 trick looks good, but didn't work for me.

  1. I did run androvmConfiguration app, clicked Save, and then confirmed reboot action.
  2. After reboot, i did shutdown and turned off VirtualBox, and started AndroVMPlayer.
  3. Now adb connect <your IP address> worked for me!
Haemachrome answered 25/4, 2016 at 21:31 Comment(0)
B
-1

It works for me instead of my local machine IP I inserted the android terminal IP i.e 192.168.56.101

Blucher answered 18/11, 2016 at 10:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.