Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Launch the same page across multiple connected Android devices. ./devicelab.sh http://paul.kinlan.me/
#!/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
You can’t perform that action at this time.