Skip to content

Instantly share code, notes, and snippets.

@ToxicBakery
Last active March 22, 2021 10:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ToxicBakery/140cc9962a3be7f1533a6eed29ba3cc8 to your computer and use it in GitHub Desktop.
Save ToxicBakery/140cc9962a3be7f1533a6eed29ba3cc8 to your computer and use it in GitHub Desktop.
# Run ADB commands against all devices in parallel. Remove `&` from line 9 to run sequentially.
# http://stackoverflow.com/a/17882578/1286667
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment