Android studio: connect Android emulator to private network -


i'm new android development , hope can me out.

i use android studio in linux develop upnp application. on pc, there 2 networks, 1 connects internet eth0 , connects private network eth1.

when launch application, can find upnp servers locate in network connect eth0 not 1 connect eth1.

by looking @ setting redirection through emulator console, found way redirect network port 1900 android emulator , application can find upnp server in private network.

android console: type 'help' list of commands ok redir add udp:1900:1900 ok redir add udp:51844:51844 ok redir add tcp:80:80 ko: can't setup redirection, port used program on host 

the problem it's not possible redirect protocol tcp port 80 streaming video.

my questions are:

1- there way tell android emulator listen on eth1 , not eth0. or if possible listen both eth0 , eth1.

2- if not, how can redirect port 80 in order streaming video app?

thanks help.

i've got similar problem before. (but time changed android x86 on vm instead.)

for question 1:

1- there way tell android emulator listen on eth1 , not eth0. or if possible listen both eth0 , eth1.

just idea, sudo ip link set eth0 down , start android emulator, guess emulator should binding eth1, start eth0 again. sorry i'm not working on linux , not verify.

2- if not, how can redirect port 80 in order streaming video app?

it seems 80 port being used on linux pc, figure out process using , stop tentatively.

do sudo netstat -nlp | grep 80, , may nginx or apache think. after sudo killall your_server, redir add tcp:80:80 may work.

besides, if eth0 works well, may not need bother redir. use iptables , set necessary forwarding eth0 eth1 instead. following link may help: https://help.ubuntu.com/community/iptableshowto


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -