Skip to content

Instantly share code, notes, and snippets.

@Mercandj
Last active September 20, 2019 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mercandj/4d6da5200961ccd52f64b8942c898f1e to your computer and use it in GitHub Desktop.
Save Mercandj/4d6da5200961ccd52f64b8942c898f1e to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
DEVICE=$1
URL=$2
if [[ "$DEVICE" = "" ]] ; then
printf "Missing device arg\n"
printf "First arg should be the device\n"
printf "Second arg should be the url\n"
adb devices
exit 0
fi
if [[ "$URL" = "" ]] ; then
printf "Missing URL as arg\n"
printf "First arg should be the device\n"
printf "Second arg should be the url\n"
adb devices
exit 0
fi
adb -s $1 shell am start -a android.intent.action.VIEW -d ${URL}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment