Adb shell and adb push for specific avd

I have an emulator running in eclipse, as well as a real device connected via usb on my computer. So, in my DDMS, it shows 2 devices with two different names (one real and one emulator)

How can I indicate on which device my ADB commands will be executed? (I do not have enough parameter to indicate the name of the device)

+6
source share
1 answer

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.

+15
source

Source: https://habr.com/ru/post/958465/


All Articles