Genymotion accesses the computer's localhost

Source: Internet
Author: User

Genymotion is used for Android testing. genymotion is run in virtualbox. virtualbox establishes a connection between the two. in Linux, ifconfig shows a virtual network card called vboxnet0, the IP address is 192.168.56.1. The address allocated by Android in genymotion is 192.168.56.101.

You need to access the loopback On the host. in the simulator, the access is successful through 192.168.56.1 or 10.0.3.2. (Google simulator uses 10.0.2.2)

The premise is that WiFi is enabled in the simulator, which is enabled by default.

I successfully accessed the server through 10.0.3.2, but it was previously a big headache. I first failed to access the server I wrote through 127.0.0.1 on my computer. I checked the network port, firewall, and iptables rules, after a large circle, we found that the IP address bound to the original server was not 127.0.0.1, but a static IP address set by ourselves, such as 192.168.1.5. Access to 192.168.1.5 on the computer was successful, but not in the simulator.

Finally, the solution is found on stack overflow.

A python file directory browser is attached below to create a simple file directory:

$ Python-M simplehttpserverserving HTTP on 0.0.0.0 port 8000
You can use this to conveniently Check network connectivity.

 

Genymotion accesses the computer's localhost

Related Article

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.