Android x86 porting, unable to make it work

ε祈祈猫儿з 提交于 2019-11-29 21:26:10

I solved the problem. This is what I do to get internet connection.

In my case, the gateway address was 192.168.0.254 and the DNS server was 192.168.0.10. I select an IP address for the VirtualBox host from the unused ones (192.168.0.250).

1) First of all, I set my VirtualBox network configuration:

Attached to: Bridged Adapter

Adapter type: PCnet-FAST III

2) After that, I start Android from VirtualBox; after boot, I open a root shell, pressing Alt+F1

3) Here, I use these commands:

ifconfig eth0 up 192.168.0.250
route add default gw 192.168.0.254 dev eth0
setprop net.dns1 192.168.0.10

4) Now, I return to Android (Alt + F7), and I can surf on internet!

Unfortunately, this process must be followed each time you start Android


In order to obtain gateway and DNS IP addresses, from Windows you can use this command

ipconfig /all

You must refer to your network card

osexp2000

After some research, I found simplest way to solve this! The Key is dhcpcd and dns setting.

  1. Config VirutalBox network card as Bridged Adapter. Adapter type: PCnet-FAST III (Maybe other type is ok, i did not test)

  2. Start Android from VirtualBox; after boot, open a root shell by pressing Alt+F1, type following command:

    dhcpcd
    
  3. Type following command to set DNS server:

    setprop net.dns1 yourDnsServerIp
    

finish!

Brandon

This worked for me:

attached to: NAT
PCnet-Fast III
  1. press ctrl-f1
  2. type dhcpcd eth0
  3. type setprop net.dns1 [your DNS for your internet provider] mine is 75.75.75.75
  4. press ctrl-f7 to go back to GUI

For Honeycomb, make sure Virtualbox is set to use PCNET III drivers. Then you can bring up ethernet manually. Apps like market and sync still do not work, as it seems they are looking for the WLAN interface to be up.

In my case i had to be on a cable connection. It would not connect through wi-fi at any point. It may be a help to someone who had the same problem.

I used the following configuration in VM:

Bridged Adapter PCnet-FAST III

Then on the running emulator:

Start by pressing ctrl+f1

type: setprop net.dns1 *yourDns (something like 192.168.1.1 without the *)

(if you dont know your dns, bring up the commandline by running cmd.exe and type: ipconfig/all, scroll down to where it says DNS servers

press ctrl+f7 to go back to the emulator

Edit: It seems that you have to type "dhcpcd eth0" aswell, depending on your internet provided. I did not have to use it in 2/3 places, but it may be required.

You don't need to port anything to run Android x86 on your computer, assuming that you're trying to run it inside VirtualBox with a host OS of Windows 7.

Make a new VM with a hard drive and about 8 MB of video RAM (see the VirtualBoxHowTo page for even more VirtualBox settings). Then, attach the eeepc ISO to the VM and boot from the CD-ROM drive by hitting F12 at the Oracle BIOS screen. Next, select "Installation" with your arrow keys and press Enter.

Walk through the process (tutorials abound), shutdown the VM, remove the ISO, and boot the virtual machine.

I just wrote several paragraphs about pitfalls with Android x86 so you might want to take a look at the blog entries. I don't know if including a link here would be considered spamming so leave a comment if you want the URL.

Sample tutorial for installing Android x86: http://brunocosta.com/blog/pt/2011/11/02/speeding-up-android-development-with-android-x86-and-virtualbox/

Check the drivers compiled in the kernel. That must be the reason.IIRC you had to have the drivers for VirtualBox compiled in the kernel (or as a module) to get that to work. As Honeycomb was, according to Google, a mess, I wouldn't doubt that the kernel doesn't have that support. I'll try to check on that myself later today and I'll update this answer accordingly.

In my case I had local network so my router acts as dhcp server

So in VirtualBox,

 set network to bridge
 PCNET Fast III (may be others work I have not tested)

to switch to console type Ctrl + F1

then on command line type

setprop net.dns1 dnsserveraddress

in my case I did

setprop net.dns1 8.8.8.8

8.8.8.8 is google dns ..

and it worked thereafter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!