offensive-tools/rev/apktool/SKILL.md
Auth/lab ref: decode and rebuild Android APK resources and smali for patching, manifest edits, resource inspection, and repackaging.
npx skillsauth add aeondave/malskill apktoolInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Resource and smali decode/rebuild workflow for Android APKs.
Use Apktool when you need to:
AndroidManifest.xml, resources, and smali from an APKUse jadx when you want readable Java/Kotlin. Use Apktool when you intend to edit the app.
# Decode APK into a project-like directory
apktool d app.apk
# Decode for analysis-only resource inspection
apktool d -m app.apk
# Rebuild after edits
apktool b app
Typical output after rebuild is under app/dist/.
apktool d target.apk
This produces a folder containing at least:
AndroidManifest.xmlapktool.ymlres/smali/ or smali_classes*/assets/Common edit points:
AndroidManifest.xml — exported components, permissions, debuggable flagsres/values/strings.xml — hardcoded UI strings and togglesres/xml/ — config and network security settingssmali/ — bypass checks, short-circuit logic, redirect flowapktool b target
Apktool rebuilds the APK but does not make it production-signed. Sign it separately before install.
apksigner sign --ks debug.keystore target/dist/target.apk
adb install -r target/dist/target.apk
Use when the decompiled Java in jadx shows the method to change, but you need a reliable rebuild path.
apktool d app.apk
# edit smali/com/example/MainActivity.smali
apktool b app
apktool d app.apk
# edit AndroidManifest.xml or res/values/*.xml
apktool b app
adbadb shell pm path com.example.app
adb pull /data/app/.../base.apk app.apk
apktool d app.apk
android:sharedUserId or min SDK constraints.jadx alongside Apktool output.-m is useful when you mainly want manifests/resources and do not care about a rebuild-ready tree.jadx, but safer to apply in smali.No bundled scripts/, references/, or assets/.
Use upstream docs at apktool.org for version-specific CLI details and build caveats.
development
Auth/lab ref: Unicorn Engine CPU-only emulation for shellcode, decryptors, custom VM handlers, instruction tracing, memory hooks, and register-level experiments.
development
Auth/lab ref: Renode board and SoC simulation for MCU/RTOS firmware, UART/GPIO/peripheral modeling, GDB remote debugging, REPL platforms, and RESC scripts.
development
Auth/lab ref: Qiling OS-layer binary emulation for PE/ELF/Mach-O/UEFI/shellcode with rootfs, syscall/API hooks, filesystem mapping, and runtime patching.
databases
Auth/lab ref: QEMU user-mode and full-system emulation for cross-arch binaries, firmware, kernels, disks, serial consoles, networking, and GDB stubs.