Skip to content

Instantly share code, notes, and snippets.

@joaohenriiquee
Created August 9, 2017 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joaohenriiquee/ddf4f4f48a257a49d2553ff42e395d80 to your computer and use it in GitHub Desktop.
Save joaohenriiquee/ddf4f4f48a257a49d2553ff42e395d80 to your computer and use it in GitHub Desktop.
Run your android app on multiple connected devices - cordova
#!/bin/bash
# Script adb+
# Usage
# You can run any command adb provides on all your currently connected devices
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command>
#
# Examples
# ./adb+ version
# ./adb+ install apidemo.apk
# ./adb+ uninstall com.example.android.apis
adb devices | while read line
do
if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ]
then
device=`echo $line | awk '{print $1}'`
cordova run android --target=$device
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment