-
-
Save vrendina/8bdedf13ff82420364aecbbe1a715da2 to your computer and use it in GitHub Desktop.
Execute adb command on all connected devices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Replace with Android SDK home or path to adb command | |
ANDROID_SDK_HOME="/opt/android-sdk" | |
ANDROID_ADB_COMMAND=$ANDROID_SDK_HOME"/platform-tools/adb" | |
if [ $# -eq 0 ]; then | |
$ANDROID_ADB_COMMAND | |
exit 1; | |
fi | |
for device in `adb devices | grep device$ | cut -f1` | |
do | |
echo "$device $@ ..." | |
$ANDROID_ADB_COMMAND -s $device $@& | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment