Created
December 15, 2015 09:07
-
-
Save xgouchet/36720fad6125127db052 to your computer and use it in GitHub Desktop.
Revisions
-
xgouchet renamed this gist
Dec 15, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
xgouchet created this gist
Dec 15, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ ######################################################################### # Kill a running android process function adb_kill { if [[ -z $1 ]]; then echo "Usage : adb_kill com.example.application" else process=`adb shell ps | grep $1` if [[ -n $process ]]; then pid=`echo $process | awk '{print $2}'` echo "Killing process $pid" adb shell "run-as $1 kill $pid" else echo "App $1 not launchd" fi fi }