How can I access the Genymotion emulator through an IP address?

When I load my Genymotion emulator, it is assigned an IP address - something like 192.168.56.101 . I install the application on the device and my application launches a small web server on port 8181 .

Previously, I could hit this server at the URL: http://192.168.56.101:8181/ , but after upgrading to Genymotion and Virtual Box, I can no longer do this.

I can use the service through the local url ( http://127.0.0.1:8181 ) if I use adb port forwarding using the adb forward tcp:8181 tcp:8181 , so I know that the service is working.

How to configure your network to access the service through the emulator IP address?

Update

When I run nmap scan on the device, I get the following output:

 C:\WINDOWS\system32>nmap -vv 192.168.56.101 Starting Nmap 7.12 ( https://nmap.org ) at 2016-08-23 12:50 Eastern Daylight Time Initiating ARP Ping Scan at 12:50 Scanning 192.168.56.101 [1 port] Completed ARP Ping Scan at 12:50, 0.50s elapsed (1 total hosts) Initiating Parallel DNS resolution of 1 host. at 12:50 Completed Parallel DNS resolution of 1 host. at 12:50, 0.02s elapsed Initiating SYN Stealth Scan at 12:50 Scanning 192.168.56.101 [1000 ports] Discovered open port 24800/tcp on 192.168.56.101 Discovered open port 5555/tcp on 192.168.56.101 Completed SYN Stealth Scan at 12:50, 1.22s elapsed (1000 total ports) Nmap scan report for 192.168.56.101 Host is up, received arp-response (0.0020s latency). Scanned at 2016-08-23 12:50:34 Eastern Daylight Time for 4s Not shown: 997 closed ports Reason: 997 resets PORT STATE SERVICE REASON 5555/tcp open freeciv syn-ack ttl 64 8181/tcp filtered unknown no-response 24800/tcp open unknown syn-ack ttl 64 MAC Address: 08:00:27:DB:D1:0D (Oracle VirtualBox virtual NIC) Read data files from: C:\Program Files (x86)\Nmap Nmap done: 1 IP address (1 host up) scanned in 4.62 seconds Raw packets sent: 1002 (44.072KB) | Rcvd: 1032 (43.968KB) 

As you can see, port 8181 displayed as filtered. Was there any firewall introduced in Android 5.1 / 6 that could cause this? I can access port 8181 for Android 4.4 emulators, but not for 5.1 / 6 emulators.

+7
android virtualbox genymotion
source share

No one has answered this question yet.

See related questions:

3295
Why is the Android emulator so slow? How can we speed up Android emulator development?
1260
How can I open the url in android browser from my application?
960
How to rotate the Android emulator screen?
703
How to install apk file in android emulator?
620
How to install Google Play services in a Genymotion virtual machine (without drag and drop support)?
332
How do you install Google frameworks (Play, Accounts, etc.) on a Genymotion virtual device?
37
Genymotion Android emulator - adb access?
one
Why adb scans port 5555 through 5585 if adb clients use port 5037 to communicate with the adb server
0
ADB and VBox cloned emulators - not detected
0
Nmap: scan Android smartphone, but all ports are always filtered / closed?

All Articles