Created
January 2, 2018 13:47
-
-
Save tmiyamon/b36c497402aaeff24a8412aa44e4e65f to your computer and use it in GitHub Desktop.
Get apk from device and decompile it
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
#/bin/sh | |
APK_PACAKGE=$(adb shell pm list packages | peco | cut -d ':' -f 2) | |
mkdir -p $APK_PACAKGE | |
cd $APK_PACAKGE | |
APK_PATH=$(echo $APK_PACAKGE | xargs adb shell pm path | cut -d ':' -f 2 | tr '\r' ' ' ) | |
echo $APK_PATH | xargs adb pull | |
APK=$(echo $APK_PATH | awk -F / '{print $NF}') | |
APK_NAME=${APK%.*} | |
d2j-dex2jar -f -o $APK_NAME.jar $APK_NAME.apk | |
mkdir jar | |
cd jar | |
unzip ../$APK_NAME.jar | |
jad -o -r -sjava -ddecomp \**/*.class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment