For server apps I meant e.g. kWS, or Tiny Web Server.
I'm trying to fully understand Android Emulator's virtual routing setup, so that hopefully I will be able to test networked apps with emulators in the future.
I'm following the linked guide's "interconnecting emulator instances" section for example:
- A is my development machine
- B is my first emulator instance, running on A
I see that I can open 10.0.2.2 in emulator B's browser, to access a server running on A.
I also see that I can telnet to emulator B, to set redir rules so requests to A can be routed to emulator B.
However, when trying to connect from A, to a server running on emulator B,
I realized that I wasn't able to launch server apps installed to emulator B and make them listen to 10.0.2.15.
As a result, I wasn't able to test and make sure my redir rules work.
Is this intended behavior for Android AVD emulators? Or did I miss something?
Must I develop my own app to listen to 10.0.2.15 regardless of the emulator's ethernet IP, and test with redir rules from A to B?
Or is there a way to launch server apps like kWS to listen to 10.0.2.15, perhaps by configuring emulator B to show 10.0.2.15 in adb shell's ifconfig (wlan0) instead of 192.168.xx.xx?
My emulators (B,C) both show different IPs with prefix 192.168.xx.xx (different subnets, irrelevant to my local LAN setups, nor are they related to A's physical/virtual ethernet adapter setups).
Any insight would be appreciated; thanks!