Reputation: 306
On my Windows 7 host system I have a virtualbox with Windows 7 as guest.
My goal is to work with android emulator (running at host) from virtual machine. I setted the next port forwarding settings (see the picture below). vm port forwarding settings
Unfortunately the next cmd:
adb connect 127.0.0.1:5554
Gives me the next output:
unable to connect to 127.0.0.1:5554: cannot connect to 127.0.0.1:5554: No connection could be made because the target machine actively refused it. (10061)
Also, if I use real ip of my host Windows system (ethernet interface):
C:\Users\windows>adb connect 106.125.38.92:5554
connected to 106.125.38.92:5554
But adb devices gives me that android emulator device is offline:
C:\Users\windows>adb devices
List of devices attached
106.125.38.92:5554 offline
What steps I missed ?
Upvotes: 1
Views: 6688
Reputation: 306
I found another solution for my problem.
I have installed Android x86 virtual machine in VBox (with image from https://www.osboxes.org/android-x86/).
Attached both of the Windows vm and Android vm to NatNetwork (previously created).
windows eth0 10.0.2.4
android eth0 10.0.2.5
As a result, adb connect from Windows vm to Android vm works fine.
C:\>adb connect 10.0.2.5:5555
connected to 10.0.2.5:5555
C:\>adb devices
List of devices attached
10.0.2.5:5555 device
Upvotes: 2