Issuing adb Commands
You can issue adb commands from a command line on your development machine or from a script. The usage is:
adb [-d|-e|-s <serialNumber>] <command>
When you issue a command, the program invokes an adb client. The client is not specifically associated with any emulator instance, so if multiple emulators/devices are running, you need to use the -d
option to specify the target instance to which the command should be directed. For more information about using this option, see
Directing Commands to a Specific Emulator/Device Instance.