apktool d <apk>Decodes resources and AndroidManifest.xml to readable XML and the code to smali, in a folder named after the APK.
Example
apktool d app.apkDecodes Android APKs to near-original resources and smali code, and rebuilds them after modification.
sudo apt install apktoolapktool d <apk>Decodes resources and AndroidManifest.xml to readable XML and the code to smali, in a folder named after the APK.
Example
apktool d app.apkapktool d <apk> -o <dir>Chooses the output directory.
Example
apktool d app.apk -o app_srcapktool d -f <apk>Overwrites an existing output directory.
apktool d -s <apk>Keeps classes.dex undecoded — faster when you only need resources and the manifest.
apktool d -r <apk>Leaves resources undecoded, which avoids rebuild problems when you only edit smali.
apktool d --only-main-classes <apk>Skips extra dex files that are not part of the main app code.
grep -E "debuggable|allowBackup|exported|usesCleartextTraffic" <dir>/AndroidManifest.xmlQuick manifest review for risky flags and exported components.
Example
grep -E "debuggable|allowBackup|exported|usesCleartextTraffic" app_src/AndroidManifest.xmlgrep -rniE "api[_-]?key|secret|password|token" <dir>/resHunts for hard-coded secrets in resources.
Example
grep -rniE "api[_-]?key|secret|password|token" app_src/rescat <dir>/res/xml/network_security_config.xmlShows certificate pinning and cleartext rules.
Example
cat app_src/res/xml/network_security_config.xmlapktool b <dir>Rebuilds the APK into <dir>/dist/.
Example
apktool b app_srcapktool b <dir> -o <apk>Rebuilds to a chosen file name.
Example
apktool b app_src -o patched.apkzipalign -p -f 4 <in> <out>Aligns the APK, required before signing with apksigner.
Example
zipalign -p -f 4 patched.apk aligned.apkapksigner sign --ks <keystore> <apk>Signs the rebuilt APK so it can be installed.
Example
apksigner sign --ks test.keystore aligned.apkkeytool -genkey -v -keystore <file> -alias <alias> -keyalg RSA -keysize 2048 -validity 10000Creates a throwaway signing key.
Example
keytool -genkey -v -keystore test.keystore -alias test -keyalg RSA -keysize 2048 -validity 10000Android Debug Bridge: install apps, open a shell, pull files, forward ports and read logs on Android devices and emulators.
A dynamic instrumentation toolkit: inject JavaScript into running processes on Android, iOS, Windows, macOS and Linux to trace and modify behaviour.
The NSA’s open-source reverse-engineering suite with a powerful decompiler; scriptable headless analysis from the command line.
A security-testing framework for Android that interacts with app components — activities, providers, services — over IPC to find weaknesses.