Last active
April 25, 2018 10:17
-
-
Save m4xp1/f58be2cb4d6fc3fb5ff7fd1a9c6fcd02 to your computer and use it in GitHub Desktop.
Adb alias
This file contains 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 characters
# Add in end file ~/.bashrc | |
findapp() { adb shell pm list packages | grep "$1" | cat -v | sed -e 's/package://g' -e 's/\^M//g'; } | |
# findapp [shortName] out: com.example.package | |
findps() { adb shell ps | grep "$1"; } | |
# findps [shortName] out: process info if exist | |
stopapp() { adb shell am force-stop "$1"; } | |
# stopapp com.example.package | |
clearapp() { adb shell pm clear "$1"; } | |
# clearapp com.example.package out: Success | |
rmapp() { adb uninstall "$1"; } | |
# rmapp com.example.package out: Success | |
pullapp() { path=`adb shell pm path "$1" | cat -v | sed -e 's/package://g' -e 's/\^M//g'`; adb pull "$path" "$2"; if [ "$3" = "-d" ]; then apktool d "$2"; fi } | |
# pullapp com.example.package fileName.apk [-d] out: pull apk then decompile it in current folder if set -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment