Last active
December 12, 2015 03:19
-
-
Save PaulKinlan/4706201 to your computer and use it in GitHub Desktop.
Launch the same page across multiple connected Android devices. ./devicelab.sh http://paul.kinlan.me/
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 | |
# Usage: | |
# Open browser on all connected devices - | |
# ./devicelab.sh | |
# Open a url on all connected devices - | |
# ./devicelab.sh http://paul.kinlan.me/ | |
adb kill-server | |
port=9220 | |
for i in `adb devices|egrep -o [a-f0-9]{16}`; do | |
echo "Connecting to $i http://localhost:$port" | |
adb -s $i forward tcp:$port localabstract:chrome_devtools_remote | |
if [ $# -gt 0 ] | |
then | |
adb -s $i shell am start -a android.intent.action.VIEW -d $1 | |
fi | |
let port++ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment