Why Android emulators are numbered like 5554

前端 未结 2 1152
日久生厌
日久生厌 2021-01-12 17:08

This might be a totally out of box question. I\'m just wondering why Android emulators are numbered as 5554, 5556 like that.

相关标签:
2条回答
  • 2021-01-12 17:41

    It's the port they are listening on.

    0 讨论(0)
  • 2021-01-12 17:52

    The Android emulators communicate with the Android SDK tools using the network, even though this communication is limited to localhost. This allows installing apps, debugging, etc. When you start your emulator, it listens to the ports 5554 and 5555 for that purpose.

    If you start your emulator while another one is already running, these ports are busy, so the emulator will listen to 5556 and 5557 instead, and so on. The first port number is displayed in the title bar of the emulator so you can see on which port it is based.

    This is very convenient when you have several emulators running at the same time, to emulate different versions of Android or different vendors, as an example.

    0 讨论(0)
提交回复
热议问题