Monday, June 1, 2015

networking - Connect android emulator to lan


I try, to connect my android emulator (from sdk) to the lan via a network bridge and a tap interface and with the -qemu option. I need it to use multicast addresse in native library code for communication with IoT devices connected to the lan.


But depending the image version an achitecture (x86 or ARM) I have different behaviours.


For ARM image (Android 7.1.1 armeabi-v7a) the bridge work perfectly. Dhcp client work automaticly after boot time. I can ping the lan gateway, google ... and the multicasting work. But the nic add to the emulator is not present via ip link or ifconfig, it is hidden, and default route is not present !! strange thing. The emulator is no pingable from the outside.



For X86 image (Android 7.1.1 google_apis/x86), the bridge work perfectly. Dhcp client work and the guest nic is configured. I can ping the lan gateway, google ..., the multicasting work, and the nic is visible (eth1). But to ping the gateway or other host, I must use ping -I to specify the nic interface, the emulator use slirp network and it is not pingable from the outside.


It is possible to make the emulator pingable from the outside ?


It is possible to use ping in x86 emulator without to use -I option for ping ?


It is possible to see the network nic attach in the ARM emulator ?


thank for your help.




No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...