How to set up network on VirtualBox for Android 2.3

前端 未结 4 816
失恋的感觉
失恋的感觉 2020-12-08 23:16

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 m

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 23:51

    An answer for Android 4.0, which is a combination of Goyuix's advice and other information on the internet.

    1. download the ASUS eeepc iso
    2. Choose Linux 2.6 32bit and PC-net fast III in the VM settings in Virtual Box.
    3. Install the OS. Create a "bootable" "primary" partition, and install OS as "read write".
    4. In Android 4.0 there's no Ethernet configuration in the settings page. Instead:
    5. Hit Alt+F1 to bring up the console.
    6. Type "netcfg". You should see "eth0" in the list.
    7. Follow the instructions here. For the sake of SO community they're reproduced as below:
    8. execute ifconfig eth0 up. (Note it is not "ipconfig"!)
    9. execute dhcpcd -LK -d eth0.
    10. Find out the DNS server's address in your network. In a typical setup this is the "default gateway" address of ipconfig on the host machine. Now execute setprop net.dns1 192.168.56.1, substitute the correct IP address.
    11. Hit Alt+F7 to exit the console. It's still says "no connection" at the bottom right. But internet is working. Open the browser to verify.

提交回复
热议问题