Skip to content

Instantly share code, notes, and snippets.

@kabouzeid
Last active September 16, 2016 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kabouzeid/7bb87c0e52c38ec8b8372fa176c74049 to your computer and use it in GitHub Desktop.
Save kabouzeid/7bb87c0e52c38ec8b8372fa176c74049 to your computer and use it in GitHub Desktop.
Bash script to quickly decompile an APK. Required tools dex2jar and apktool can be installed via homebrew. Tested on OSX.
#!/bin/bash
apkname=$(basename "$1" .apk)
extractfolder=$PWD/$apkname
unzip -o "$1" classes.dex -d "$extractfolder"
d2j-dex2jar "$extractfolder/classes.dex" -o "$extractfolder/$apkname.jar"
apktool d "$1" -o "$extractfolder/apktool" -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment