If there is only one device and one emulator, you can use the -d and -e options to send commands to the real device and emulator.
Device:
adb -d shell
Emulator:
adb -e shell
Alternatively, you can use the -s <serialNumber> option to direct commands to a specific emulator / device instance:
$ adb devices List of devices attached emulator-5554 device 123456789b52315f device $ adb -s emulator-5554 shell $ adb -s 123456789b52315f shell
For other options read the docs . Hope this helps.
ozbek source share