I am trying to figure out how to change Android Studio's Emulator so that it can be reached from a different IP from the host machine. Currently I can access it at localhost:5554. I am trying to start a listener on port 64006 of the emulator but anything I send to that port from my host machine doesn't reach the Android because it is running on port 5554 and listening on port 64006 within that.
1 Answer
SOLUTION
I was able to fix this issue by doing the following:
- Telnet onto the emulator (telnet localhost portNum)
- Auth using the auth command and token in your user folder (.emulator_console_auth_token)
- Use the redir command once authenticated "redir add tcp:123:456" (This command says to send anything destined for host port 123 to port 456 on the android emulator)
socat
to forward a TCP port from your ethernet interface to the emulator localhost port.