AndroidStudio: always runs on all connected devices

How to configure AndroidStudio so that the application runs on all connected devices without an additional request, even when I constantly connect new devices / delete old ones?

Please note that this requires a slightly different approach than this solution , since according to their procedure the device selection dialog appears again if you

  • connect another device

or

  • restart android studio
+7
android android-studio adb
source share
2 answers

I found a bash script that worked fine for me for some time:

adb devices | while read line do if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ] then device=`echo $line | awk '{print $1}'` echo "$device $@ ..." adb -s $device $@ fi done 

All credits are transferred to github christopherperry user. For more information check out this link:

https://gist.github.com/christopherperry/3208109

Hope this helps.

+2
source share

The answer is almost the same as the solution. The only thing to do is to โ€œcheckโ€ the checkbox โ€œAlways use the same device for future launchesโ€ As highlighted in the picture

Be sure to select all devices before the first click.

+1
source share

All Articles