Last active
January 21, 2020 20:45
-
-
Save jbarr21/aceefbe86b43073ad18e6a4a2e9adaa4 to your computer and use it in GitHub Desktop.
Utilities for your BASH or ZSH profile that enable running ADB commands on multiple emulators/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
# Utilities for your BASH or ZSH profile that enable running ADB commands on multiple emulators/devices | |
function prepend() { while read line; do echo "${1}${line}"; done; } | |
# requires ADB on $PATH | |
madb(){ for SERIAL in `adb devices | sed '1d;$d' | cut -f 1`; do adb -s $SERIAL "$@" | prepend "[$SERIAL] "; done; } | |
# requires https://github.com/ashishb/adb-enhanced | |
madbe(){ for SERIAL in `adb devices | sed '1d;$d' | cut -f 1`; do adbe -s $SERIAL "$@" | prepend "[$SERIAL] "; done; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment