Skip to content

Instantly share code, notes, and snippets.

@mileskrell
Created February 21, 2019 15:44
Show Gist options
  • Save mileskrell/30ef06e12a4984923dbf3e2565537660 to your computer and use it in GitHub Desktop.
Save mileskrell/30ef06e12a4984923dbf3e2565537660 to your computer and use it in GitHub Desktop.
HOWTO set up nice Android Studio run configurations

Make a script like this:

#!/bin/bash

sh -c "$1 $2 $3 $4 $5 $6 $7"

if [ $? != "0" ]; then
    printf "Clearing data failed! Running anyway..."
fi

exit 0

Make an "external tool":

  • Program:
    • the above script
  • Args:
    • adb -s SERIAL shell pm clear PACKAGE
      • e.g. adb -s emulator-5558 shell pm clear edu.rutgers.css.Rutgers.alpha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment