I am trying to configure a Android x86 running machine using Oracle VirtualBox so that it works with Eclipse. I am having some trouble in making my virtual machine "online". I connected the phone to adb by typing the following in the Android Terminal Emulator:
ifconfig eth0 192.168.40.1 netmask 255.255.255.0 route add default gw 192.168.40.1 dev eth0
Afterwards, I switched to cmd and typed
adb connect localhost
But when I try to run my test code using Eclipse on the virtual Android, it does not appear in the Android Device Chooser Menu. Furthermore, when I typed adb devices in cmd, this was the response:
List of devices attached localhost:5555 offline
The other thing that worries me is that each time after I shut down the VM, I have to type the ifconfig and route add commands again in the terminal when I restart, in order to connect to the device.
What can I do to make the device online?
EDIT:
In case it matters, the VM is configured to communicate over a NAT Network. This is what my Port Forwarding Rules look like: Protocol: TCP
Host IP: *
Host Port: 5555
Guest IP: *
Guest Port: 5555
EDIT2
http://stackoverflow.com/questions/10680417/error-device-offline http://stackoverflow.com/questions/10680417/error-device-offline
http://stackoverflow.com/questions/5584976/android-device-chooser-my-device-seems-offline http://stackoverflow.com/questions/5584976/android-device-chooser-my-device-seems-offline