I have a server running inside and android emulator listening in port 8080.

after the port forwarding i was able to connect to the server via my web browser "from the host(my real os)", but only if i put 127.0.0.1:8080, the problem is i can't connect if i put 192.168.1.12:8080 which is my LAN address.

some explication and how to fix it please.

other way to explain the problem: i'm in USA running a server inside my android emulator, i want some one from japan,canada...to be able to access and connect to it. or i want my second laptop to access to my server in first laptop which is the same network.

有帮助吗?

解决方案

resolved,

the thing is that adb accept connection only from 12.0.0.1 no thing else.

so i install android in virtual-Box and redirect connection from 192.162.2.101 "my lan ip address" to 10.0.2.10 "android ip address in the emulator"(i do that in the virtual-box network UI".

and every thing work well.

adb "google emulator" is designed to be used/access in single host.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top