0

I have one login script written to login to my device, when multiple devices are connected, how to run that script in particular device.

login.sh

adb shell input text abc@def.com
adb shell input keyevent 61
adb shell input text abc123
adb shell input keyevent 61

1 Answers1

0

When multiple devices are connected you can retrieve the list with adb devices :

$ adb devices
List of devices attached
017296d5904c        device
192.168.56.101:5555 device

Then, you can target a particular device by using the -s option :

adb -s 017296d5904c shell input keyevent 61

source

The final step is to iterate on your devices list with a for loop and run your commands.