Skip to content

Instantly share code, notes, and snippets.

@mthierry
Created February 18, 2017 02:50
Show Gist options
  • Save mthierry/bcddc4fc6bc7330652dca0c582fbe295 to your computer and use it in GitHub Desktop.
Save mthierry/bcddc4fc6bc7330652dca0c582fbe295 to your computer and use it in GitHub Desktop.
#set -x
#pkg=$(aapt dump badging $1|awk -F" " '/package/ {print $2}'|awk -F"'" '/name=/ {print $2}')
#act=$(aapt dump badging $1|awk -F" " '/launchable-activity/ {print $2}'|awk -F"'" '/name=/ {print $2}')
#adb shell am start -n $pkg/$act
#package=`aapt dump badging $* | grep package | awk '{print $2}' | sed s/name=//g | sed s/\'//g`
#activity=`aapt dump badging $* | grep Activity | awk '{print $2}' | sed s/name=//g | sed s/\'//g`
#echo
package=com.android.camera2
activity=com.android.camera.CameraActivity
echo package : $package
echo activity: $activity
echo
echo Launching application on device....
echo
adb shell am start -n $package/$activity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment