1

I'm studying the ADB commands using an android emulator called MEmuPlay. I got it working with one emulator running, I could start and connect to the device and send some commands using adb.exe

The problem now is when I open 2+ emulators, when I run "adb devices" I can see all emulators, but I can't identify which device in that list is MEmu_1 or MEmu_2 or Bluestacks.

There is a way to maybe create an alias to X device based in the process ID or something that I can know exactly which device I want to send messages? OR maybe force it to have an specific name in that device list?

Thank you!

Kyore
  • 388
  • 2
  • 7
  • 29

1 Answers1

0

The numbers after emulator- in the adb devices output are TCP ports those emulator instances are listening at for the adb commands.

You have not provided much information about your specific environment, so I would keep my answer pretty generic as well.

In order to associate an emulator instance (identified by a name provided as a command line parameter during start or a window title at runtime) with a TCP port number that instance is listening at you just need to cross-link the outputs of ps and netstat in a unix based environment or tasklist and `netstat in a windows environment by process ID column.

Alex P.
  • 30,437
  • 17
  • 118
  • 169