Skip to content

Instantly share code, notes, and snippets.

@tdurand
Forked from PaulKinlan/devicelab.sh
Created February 26, 2013 23:01
Show Gist options
  • Save tdurand/5043183 to your computer and use it in GitHub Desktop.
Save tdurand/5043183 to your computer and use it in GitHub Desktop.
#!/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