Connecting VirtualBox virtual machines via IP address android-x86

Source: Internet
Author: User

As long as you can find the system in the virtual machine through the IP address, you can do a lot of things, such as:
ADB debugging, or using NC commands to transfer some files or folders, etc...
The following is an example of debugging android-x86 in the ADB connection VirtualBox:

Installing Android-x86

First of all you have to install the android-x86, this is not much to say, many tutorials on the web
However, it is worth mentioning that after the installation, when entering the system, if no point tricks will be stuck in the Welcome screen, installed without, not
The workaround is: On the Welcome screen, start below the status bar, and then click:
Top left-upper right-bottom right-bottom left
Click once with the mouse, will automatically skip the Welcome screen

View the IP address of the Android-x86

In this example, the VirtualBox default network configuration is used
Enter the android-x86 system, open the terminal emulator,

Then enter the "su" command to get root permissions, will pop up the prompt, you look at the selection
When Root is obtained, the terminal prompt becomes "#"
Enter the "netstat" command to print out some network configuration and IP address information:

, the IP address of the android-x86 in this example is: "10.0.2.15"
Remember this IP, you'll use it later.

Configure port forwarding for a virtual machine system's network

On the system to be configured: Android-x86, right-click, select Settings
In the left menu group of the Settings window that appears, click on the network item, and then click on the Port Forwarding button:

Then click on the right "+" button in the new window to add a rule:

Where the host IP is the best to fill this machine host, Port casually, but if it is the ADB connection, it is best to use 5555, because ADB connect by default is 5555 port
subsystem IP, fill in the second step to use the IP address obtained by Netstat, the port is arbitrary

After configuration, click OK to restart the android-x86 in the virtual machine

ADB connection android-x86 System

After starting your android-x86, open the terminal emulator and enter:

susetprop service.adb.tcp.port5555stop adbdstart adbd

Command explanation:
Su: Get root permissions, to execute the following command must be root identity, otherwise invalid
SetProp ... : Set up an ADB configuration for an Android system that uses the network for ADB debugging
Stop ADBD and start adbd: restart ADB service

So android-x86 is configured OK, in your host (non-virtual machine), open a command line (cmd/terminal), enter:

connect127.0.0.1

When the connection is successful, you will be prompted:

connectedto 127.0.0.1:5555

Then enter ADB devices to view connected devices:

Listof127.0.0.1:5555  device

Note "127.0.0.1:5555" after the hint, if it is a device, then the link is successful, otherwise if the offline is not connected

Final input: adb shell
Entering the Android-x86 terminal control, this command succeeds means that it is absolutely successful.
Here is a diagram of these steps:

Summarize:
The main use of the VirtualBox port forwarding function, which will all access to the local port of a set of data all redirect to the virtual machine system's set port
This enables access to the native 5555 port (in this case), which actually accesses the android-x86 5555 port

Connecting VirtualBox virtual machines via IP address android-x86

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.