{"id":494,"date":"2011-12-16T10:43:43","date_gmt":"2011-12-16T09:43:43","guid":{"rendered":""},"modified":"2018-11-01T00:53:58","modified_gmt":"2018-10-31T23:53:58","slug":"android-40-virtualbox-networking-issues","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/android-40-virtualbox-networking-issues\/","title":{"rendered":"Android 4.0 on virtualbox &#8211; networking issues"},"content":{"rendered":"<p>Android 4.0 x86 port installed on virtualbox have problem to provide networking services over Internet as it requires wifi adapter. We should solve this issue with following settings:<\/p>\n<ul>\n<li>Installed virtualbox<\/li>\n<li>Download Android x86 ISO&nbsp;image from http:\/\/code.google.com\/p\/android-x86\/downloads\/list. Choose android for eeepc, asus laptop iso does not work and does not allow networking modification (or I&nbsp;do not know how)<\/li>\n<li>Create virtualbox machine and install Android 4.0. You may follow official guide on <a href=\"http:\/\/www.android-x86.org\/documents\/installhowto\">http:\/\/www.android-x86.org\/documents\/installhowto<\/a> or another excellent one at <a href=\"http:\/\/androidspin.com\/2011\/01\/24\/howto-install-android-x86-2-2-in-virtualbox\/\">http:\/\/androidspin.com\/2011\/01\/24\/howto-install-android-x86-2-2-in-virtualbox\/<\/a><\/li>\n<li>Check VBox network adapter settings, in my case it works for PCNET&nbsp;Fast III&nbsp;in a bridged mode<\/li>\n<li>Complete installation and run android machine<\/li>\n<li>Log in<\/li>\n<li>Open applications and run terminal emulator<\/li>\n<\/ul>\n<p><img decoding=\"async\" width=\"600\" height=\"505\" align=\"top\" src=\"\/wp-content\/uploads\/files\/image\/Android\/4_0\/networking\/android4_0-net-1.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>and type<\/p>\n<pre>\r\nip a \r\n<\/pre>\n<p>to display networking adapters. You should be able to see adapter named eth0, as it is displayed on the following picture<\/p>\n<p><img decoding=\"async\" width=\"396\" height=\"194\" src=\"\/wp-content\/uploads\/files\/image\/Android\/4_0\/networking\/android4_0-net-2.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Now, we will assign networking parameters (address, mask, dns server, default gateway). To do that we have two ways available, using the dhcp service, but there have to be a DHCP&nbsp;server available on your LAN. Or to assign IP&nbsp;address <span style=\"font-style: italic;\">manually<\/span>.<\/p>\n<h5>Manual assignments<\/h5>\n<p>Manually type the IP&nbsp;address and the mask from a address pool, which we are using in a LAN environment, where host with virtualbox is connected, in my case:<\/p>\n<pre>\r\nsu\r\nifconfig eth0 192.168.10.250 netmask 255.255.255.0 up\r\n<\/pre>\n<p>then add a default gateway, which is needed for routing packets that are not local and have to be routed out of the LAN<\/p>\n<pre class=\"default prettyprint\"><code><span class=\"pln\">route add <\/span><span class=\"kwd\">default<\/span><span class=\"pln\"> gw 192.168.10.1 dev eth0<\/span><\/code><\/pre>\n<p>and finally we have to check connectivity, for examle by using ping command with target IP&nbsp;address.<\/p>\n<h5>Dynamical assignments<\/h5>\n<p>We have to type<\/p>\n<pre>\r\ndhcpcd eth0\r\n<\/pre>\n<p>and that is all!<\/p>\n<h5>Assigning DNS server address<\/h5>\n<p>Finally, in both cases we have to add the IP&nbsp;address of a DNS&nbsp;server, in my case&nbsp;<\/p>\n<pre class=\"default prettyprint\"><code><span class=\"pln\">setprop net<\/span><span class=\"pun\">.<\/span><span class=\"pln\">dns1 <\/span><span class=\"lit\">158.193.152.2<\/span><span class=\"pln\"><br \/><\/span><\/code><\/pre>\n<p>and check ping connectivity, but now using DNS&nbsp;name of a target host (www.google.com for example).<\/p>\n<h5>Final notes<\/h5>\n<p>Unfortunatelly, all these settings are lost after reboot and we have to set up them again!<\/p>","protected":false},"excerpt":{"rendered":"<p>Android 4.0 x86 port installed on virtualbox have problem to provide networking services over Internet as it requires wifi adapter. We should solve this issue with following settings:<\/p>","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[685],"tags":[],"class_list":["post-494","post","type-post","status-publish","format-standard","hentry","category-linux_-_howto-en"],"taxonomy_info":{"category":[{"value":685,"label":"Linux - HOWTO"}]},"featured_image_src_large":false,"author_info":{"display_name":"admin","author_link":"https:\/\/nil.uniza.sk\/en\/author\/admin\/"},"comment_info":3,"category_info":[{"term_id":685,"name":"Linux - HOWTO","slug":"linux_-_howto-en","term_group":0,"term_taxonomy_id":683,"taxonomy":"category","description":"","parent":0,"count":71,"filter":"raw","cat_ID":685,"category_count":71,"category_description":"","cat_name":"Linux - HOWTO","category_nicename":"linux_-_howto-en","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=494"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/494\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}