The Android system only accesses the PC by default via IP (10.0.2.2), and the PC does not have direct access to the Android emulator system via IP. To achieve communication between PC and Android simulator system and Android Simulator, it is necessary to use port redirection (redir).
Let's talk about the Telnet client installation required for Port redirection:
Windows:
Install the Telnet client. If it is not installed, you can enable the Telnet client feature by locating the Telnet client menu item under open or close system functionality in Windows Program management.
Linux:
Install the Telnet client yourself.
PC The computer does not have direct access Android the cause of the simulator system
The Android system sets the PC IP to 10.0.2.2 for communication and 10.0.2.15/127.0.0.1. However, the PC does not specify an IP for the Android emulator system, so the PC can only communicate with the Android emulator via port redirection.
AVD Android Simulator System