Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up network on VirtualBox for Android 2.3

I'm trying to install a VirtualBox virtual machine for developing on Android 2.3 (Gingerbread) but I cannot properly configure the internet connection.

I followed many tutorials on the web and tried to apply some workaround suggested here on StackOverflow (for example Android x86 porting, unable to make it work ), but I still can't connect from my Android machine.

Some details:

  • When I execute netcfg on android console it returns only the lo interface (127.0.0.1).
  • The iso image I'm using is "android-x86-2.3-RC1-asus_laptop.iso" downloaded from http://www.android-x86.org/download. I use it on a Lenovo notebook with Windows 7 (but I've tried also on Ubuntu 11.04 Natty).
  • I've tried to setup both host-only and bridged interface on my virtual machine, but they don't seem to work.
like image 471
davioooh Avatar asked Feb 13 '12 08:02

davioooh


People also ask

How do I connect my phone to VirtualBox?

Ensure that your VM has a USB controller added in its hardware configuration, and that Virtualbox Guest Additions are installed in the VM. Once you've done this, you'll see a USB icon at the bottom of your VM's window. Click on that, then select your Android device to give control of it to the VM.

How do I choose which networking mode to use in VirtualBox?

In VirtualBox Manager you can configure the DHCP server by choosing File, Tools, Network Manager. The Network Manager window lists all host-only networks which are presently in use. Select the network name and then use the DHCP Server tab to configure DHCP server settings.


1 Answers

If you are going to be using VirtualBox, you need to use the eeepc.iso image not the asus-laptop.iso image.

Also, you will want to double check a few settings on your VM to make sure they are configured correctly:

  • OS Type: Linux 2.6
  • Memory: 256MB or more
  • Sound: Sound Blaster 16
  • Network: NAT or Bridged, the adapter must be PC-net-FAST III

From http://www.android-x86.org/documents/virtualboxhowto

I also found the following two things to be very helpful:

  • Disable Mouse Integration (under the Machine Menu)
  • Once the VM has started, open the app drawer and launch Settings. Find the ethernet section and enable it. You should see an eth0 device you can configure.
like image 85
Goyuix Avatar answered Sep 19 '22 22:09

Goyuix