Skip to content

Instantly share code, notes, and snippets.

@j796160836
Last active June 16, 2019 17:26
Show Gist options
  • Select an option

  • Save j796160836/529781cec4de10b969a4 to your computer and use it in GitHub Desktop.

Select an option

Save j796160836/529781cec4de10b969a4 to your computer and use it in GitHub Desktop.
Decompile apk in one command. Copy to /usr/local/bin if you need
#!/bin/bash
if test $# -lt 1 ; then
echo "Usage: $0 <target-apk>"
exit 1
fi
FILE_NAME=$1
FOLDER_NAME=`echo $1 | sed 's/^\(.*\)\.\(.*\)$/\1/'`
mkdir -p $FOLDER_NAME
apktool -f d $FILE_NAME
d2j-dex2jar --force $FILE_NAME -o $FOLDER_NAME/$FOLDER_NAME'_dex.jar'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment