apk-reverse
Skill16 starsChanged 56 days agoMITView on GitHub
Unified reverse engineering toolkit covering Android APK decompilation, native .so/ELF binary analysis, and general reverse engineering techniques. Use for APK unpacking, Java/smali modification, Frida hooking, native binary reversing, CTF challenges, and anti-analysis bypass.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- z91772524-ai/pojia-next-mactheir own version, first seen Sep 28, 2026
- zhaoxuya520/reverse-skilltheir own version, first seen Sep 22, 2026
- Asaiuta/reverse-workbench-skilltheir own version, first seen Aug 14, 2026
- xAmirHamza77/ReverseOps-Skilltheir own version, first seen Aug 2, 2026
- haikow/claude-reverse-skillstheir own version, first seen Jun 10, 2026
Used with
Projects with it also use attack-chain, binary-diff and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
xAmirHamza77Skillattack-chain
Use for authorized multi-stage attack-path planning and orchestration when a task spans reconnaissance, initial access, privilege escalation, lateral movement, or impact assessment. Route single-stage tasks directly to their specialist skill.
Also in 4 projects that use this
xAmirHamza77Skillbinary-diff
Cross-version symbol migration and binary diffing. Use this when you have symbols/reverse engineering results from an old version and need to quickly migrate them to a new version. Applicable scenarios: kernel missing PDB with derivation from old-version symbols, batch-migrating function names after a program update, quickly locating new offsets after an application update. Core method: use an LLM for structured differential comparison with programmatic input/output — extremely low cost (200 functions ~1 yuan). Trigger keywords: symbol migration, bindiff, cross-version, missing PDB, function offset migration, symbol migration, binary diff, version comparison.
Also in 4 projects that use this
- +10 more from xAmirHamza77
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- zhaoxuya520/reverse-skill★ 40ksame name
- haikow/claude-reverse-skills★ 114same name
- z91772524-ai/pojia-next-mac★ 9same name
- Asaiuta/reverse-workbench-skill★ 4same name
- xAmirHamza77/ReverseOps-Skill★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 7 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 74
All scripts have PowerShell (.ps1) and Bash (.sh) versions.
- Very specific: line 88
All scripts output key=value lines to stdout.
- Distinctive: line 137
Do not rush into patching or hooking.
- Very specific: line 151
Read from jadx_out first. Key classes to examine:
- Very specific: line 178
When jadx output is incomplete or a patch is needed, switch to apktool_out:
- Distinctive: line 202
When static analysis is insufficient:
- Very specific: line 211
Prefer scripts/frida-run.ps1 for stable injection
- Very specific: line 215
If the APK contains important .so files, switch to Part 2 when:
- Distinctive: line 411
If automatic installation fails or the user declines, the script throws a clear error with manual installation links.
- Distinctive: line 448
Do not blindly modify smali at the start
- Distinctive: line 449
Do not write hooks before checking the Manifest and main entry point
- Distinctive: line 450
Do not treat incomplete Java decompilation as proof the logic cannot be analysed
- Very specific: line 451
Do not keep forcing Java-layer analysis when .so clearly carries core logic
- Distinctive: line 452
Do not jump to full reverse engineering before trying strings and dynamic triage
- Very specific: line 453
Do not use angr before understanding the binary's structure
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Reverse Engineering Toolkit
Overview
This skill is organised into three major parts. Start with the part that matches your target, then cross-reference as needed.
| Part | When to Use | Entry Point |
| Part 1: APK | Android APK reversing — Java/smali, AndroidManifest, Frida hooks, rebuild | Start here for any .apk |
| Part 2: SO | Native .so / ELF / PE / Mach-O binary analysis — GDB, r2, Ghidra, Unicorn, anti-debug | Switch here when core logic lives in native code |
| Part 3: General | CTF patterns, language-specific RE (Python/WASM/.NET), platform RE (macOS/IoT), crypto tools, AI-assisted RE | Reference here for non-APK, non-native RE tasks |
Prerequisites
| Tool | Purpose | Part |
jadx | Java decompilation | APK |
apktool | APK decode/rebuild | APK |
frida-tools | Dynamic instrumentation | APK / SO |
adb | Android device interaction | APK |
radare2 / rizin | CLI binary analysis | SO |
gdb / pwndbg | Dynamic debugging | SO |
Ghidra | Decompilation | SO |
angr | Symbolic execution | SO |
Unicorn / Qiling | Emulation | SO |
Where tools are installed (Windows)
Before downloading or installing anything, run scripts/start.ps1 -CheckOnly — most tools are
already installed locally and the scripts know where to look. When a tool is not on PATH, the
scripts search these roots in order (see scripts/lib/ToolDiscovery.ps1):
%REVERSE_TOOLS_DIR%(if set)%USERPROFILE%\ToolsE:\Tools
Inside a root they accept <name>.bat/.cmd/.exe, <name>*.jar, and versioned folders with an
optional bin\ (e.g. E:\Tools\jadx-1.5.6\bin\jadx.bat, E:\Tools\apktool.bat +
apktool_3.0.2.jar). If you need a tool directly (outside the scripts), call it by these paths.
When a tool is reported missing, do not download or install it yourself — ask the user first:
"Have you already installed <tool>? If so, where?" Users often have it in a folder the
scripts do not know about (then use that path and extend ToolDiscovery.ps1 / tools.sh
and this list). Only offer to download it if the user confirms it is not installed.
The scripts run on Windows PowerShell 5.1 as well as pwsh; when pwsh is missing use
powershell -File ....
Part 1: APK Reverse Engineering
Tools
jadx— Java decompilation and readingapktool— APK decode, smali inspection, rebuildfrida/frida-ps— Dynamic Java method hookingadb— Device connection, install, logcat, file pullNPatch— Non-root Xposed module integrationapksigner/zipalign— Signing and alignment (manual install via Android Build-Tools)
Bundled Scripts
All scripts have PowerShell (.ps1) and Bash (.sh) versions. Use .ps1 on
Windows, .sh on Linux/macOS.
| Script | Purpose |
scripts/decode.ps1 / .sh | Run jadx + apktool in one pass, write results to disk, generate summary |
scripts/frida-run.ps1 / .sh | Device check, process listing, spawn/attach injection |
scripts/rebuild-sign-install.ps1 / .sh | Rebuild, align, sign, and optionally install APK |
scripts/manifest-summary.ps1 / .sh | Extract key Manifest components and permissions |
scripts/start.ps1 | MCP server management — check tools, bootstrap, report status |
scripts/open.ps1 | MCP file opening — detect type, route to decode pipeline |
Script Output Format
All scripts output key=value lines to stdout. Component entries use
tab-separated fields (name\texported\tenabled).
decode scripts produce: task_root, jadx_out, apktool_out, package,
jadx_exit_code, apktool_exit_code, java_files, smali_dirs, so_files,
xml_files, warning (on non-zero exit)
manifest-summary scripts produce: package, permission_count,
permission=..., activity_count, activity=name\texported\tenabled,
service_count, service=..., receiver_count, receiver=...,
provider_count, provider=..., main_activity=...
rebuild-sign-install scripts produce: unsigned_apk, aligned_apk,
signed_apk, keystore, install_device (if --install)
start scripts produce: status=ready|degraded|unavailable, plus per-tool
<tool>=available|missing lines for jadx, apktool, frida, adb,
python, java, zipalign, apksigner, keytool
open scripts produce: type=apk|elf|pe|macho|other, path, mime,
size, decode_target=apk|so|none; with --Decode on APK, additionally
produces all decode.ps1 output keys
Script Examples
# Windows (PowerShell)
pwsh -File ".\scripts\decode.ps1" -ApkPath "D:\DOWNLOAD\app.apk" -Clean
pwsh -File ".\scripts\frida-run.ps1" -Usb -Spawn -Package com.example.app -ScriptPath "D:\hooks\test.js"
pwsh -File ".\scripts\rebuild-sign-install.ps1" -ProjectDir "C:\work\apktool_out" -Install
pwsh -File ".\scripts\manifest-summary.ps1" -ManifestPath "C:\work\apktool_out\AndroidManifest.xml"
pwsh -File ".\scripts\start.ps1"
pwsh -File ".\scripts\start.ps1" -CheckOnly
pwsh -File ".\scripts\open.ps1" -TargetPath "D:\DOWNLOAD\app.apk" -Decode -Clean
pwsh -File ".\scripts\open.ps1" -TargetPath "D:\DOWNLOAD\app.apk" -DetectOnly# Linux/macOS (Bash)
bash scripts/decode.sh app.apk --clean
bash scripts/frida-run.sh --usb --spawn --package com.example.app --script hooks/test.js
bash scripts/rebuild-sign-install.sh apktool_out --install
bash scripts/manifest-summary.sh --manifest apktool_out/AndroidManifest.xmlRecommended Workflow
1. Triage
Do not rush into patching or hooking. First determine the APK structure:
jadx -d jadx_out app.apk
apktool d app.apk -o apktool_outInspect:
AndroidManifest.xml— package, application, activity, service, receiverlib/— whether.sofiles are present (if yes, check Part 2)- Key permissions (network, root, SSL)
2. Java Logic Observation
Read from jadx_out first. Key classes to examine:
MainActivity,Application- Login, networking, encryption, risk-control classes
- Third-party SDK initialisation
Common keywords: login, sign, encrypt, cipher, token, root,
certificate, trust, okhttp, retrofit, webview
Finding a client's API endpoints / request parameters (e.g. to reimplement a store's category or ranking calls):
- Cheap first pass, no decompile: extract the DEX string table and grep it. Windows has no
strings, so useunzip -oq app.apk 'classes*.dex'thengrep -aoE '[ -~]{5,}' classes.dex > classes.txt. Method names / URL paths are plain constants (client.getTabDetail,/api/market/...); but the values of constants (e.g. a URI behindRANKING_URI) are usually not adjacent, so this pass only gives names. - Decompile with
scripts/decode.ps1 -SkipApktool(jadx only is enough for code) andgrep -rnthe constant name injadx_out/sourcesto get its value and its call sites. jadxexiting with code 1 and "finished with errors, count: N" on large APKs is normal — individual methods fail to decompile; the exported sources are still usable (the script prints a warning instead of failing).- Confirm a hypothesis by replaying it against the live API (a throwaway test or curl) before writing production code. Obfuscated apps rename classes but keep string constants, so search by string, not by class name.
3. Smali / Resource Confirmation
When jadx output is incomplete or a patch is needed, switch to apktool_out:
- Inspect
smali*/ - Inspect
res/values/strings.xml - Inspect
AndroidManifest.xml
Patch priorities:
android:exported- Debug flags
- Root-detection return values
- Certificate-validation branches
4. Rebuild & Install
apktool b apktool_out -o rebuilt.apkOr use the full-loop script:
pwsh -File ".\scripts\rebuild-sign-install.ps1" -ProjectDir "apktool_out" -Install -Reinstall5. Dynamic Hooking (Frida)
When static analysis is insufficient:
- Hook login functions
- Hook OkHttp / Retrofit / WebView
- Hook
javax.cryptoandMessageDigest - Hook root-detection and SSL pinning
Recommendations:
- Hook Java first, then evaluate native hooks
- Print parameters and return values first, then modify if needed
- Prefer
scripts/frida-run.ps1for stable injection
6. Native .so Routing
If the APK contains important .so files, switch to Part 2 when:
- The Java layer is only a JNI wrapper
- Core signing or crypto logic is not in Java
- Logic disappears after
System.loadLibrary() - Certificate validation or risk-control logic is inside
.so
Reference Files
references/apk/android-advanced.md— Native SO/JNI, packers, Flutter/RNreferences/apk/apk-security-checklist.md— OWASP-aligned test checklistreferences/apk/frida-bypass-kit.md— FridaBypassKit integration guidereferences/apk/frida-cookbook.md— Reusable Frida hook scripts by categoryreferences/apk/smali-apk-patching.md— Dalvik opcode patching, signature bypass, debug & log injection
Part 2: Native Binary / .SO Analysis
Covers ELF, PE, Mach-O, and any native binary analysis. Use this when you are
working with .so files from an APK, standalone ELF binaries, or any compiled
native target.
Tools
| Tool | Purpose | Common Commands |
radare2 / rizin | CLI disassembly, analysis, patching | r2 ./binary, aaa, afl, pdf @ main |
gdb / pwndbg / GEF | Dynamic debugging | gdb ./binary, start, b *main+0xca |
Ghidra | Headless decompilation | analyzeHeadless project/ tmp -import binary -postScript script.py |
UniDbg | Android ARM32/ARM64 .so emulation & JNI simulation | Java API, Dobby hooking, sign algorithm extraction |
Unicorn | CPU emulation for code snippets | Python API, see reference notes |
Qiling | Cross-platform emulation with OS support | ql.run() |
Frida | Native function hooking, memory scanning | frida binary, Interceptor.attach() |
angr | Symbolic execution, CFG recovery | proj = angr.Project('./binary') |
Quick Wins (Try First)
# Plaintext extraction
strings binary | grep -iE "flag|secret|password"
rabin2 -z binary | grep -i "flag"
# Dynamic triage — often reveals behaviour without full reversing
ltrace ./binary
strace -f -s 500 ./binary
# Run with test inputs
./binary AAAA
echo "test" | ./binaryInitial Analysis
file binary # Type, architecture
checksec --file=binary # Security features
rabin2 -I binary # Binary info
strings binary # Extract stringsAnalysis Workflow
- Strings extraction — many easy targets have readable flags
- Dynamic triage —
ltrace/straceoften reveals behaviour - Frida hooking — hook
strcmp/memcmpto capture expected values - Symbolic execution —
angrsolves many flag-checkers automatically - Emulation (UniDbg / Qiling / Unicorn) — execute and extract crypto/signing routines without physical devices
- Map control flow — before modifying execution
- Automate — via r2pipe, Frida, angr, Python scripting
Key Topics & Reference Files
| Topic | File |
| ELF structure, headers, sections, dynamic linking | references/so/elf-analysis.md |
| UniDbg ARM32/ARM64 .so emulation, JNI stubbing, Dobby hooking | references/so/unidbg-emulator.md |
| GDB, r2, Ghidra, Unicorn, Python bytecode, WASM, .NET, packers | references/so/tools.md |
| Frida, angr, lldb, x64dbg, Qiling, Triton, Intel Pin | references/so/tools-dynamic.md |
| VMProtect, Themida, BinDiff, deobfuscation, RetDec, LLVM lifting | references/so/tools-advanced.md |
| Linux/Windows anti-debug, anti-VM, anti-DBI, integrity checks | references/so/anti-analysis.md |
| Go binary reversing (GoReSym, memory layout, goroutines) | references/so/go-reverse.md |
| Kernel driver reversing (WDM, KMDF, minifilter, Linux .ko) | references/so/kernel-driver-reverse.md |
| Compiled languages (Rust, Swift, Kotlin/Native, Haskell, C++) | references/so/languages-compiled.md |
| ARM64/AArch64, RISC-V, MIPS, MBR/bootloader | references/so/platforms-hardware.md |
Common Encryption Patterns
- XOR with single byte — try all 256 values
- XOR with known plaintext (
flag{,CTF{) - RC4 with hardcoded key
- Custom permutation + XOR
- XOR with position index (
^ ior^ (i & 0xff))
For more CTF-specific patterns, see references/general/patterns*.md.
PIE Binary Debugging
gdb ./binary
start # Forces PIE base resolution
b *main+0xca # Relative to main
runMemory Dumping Strategy
Let the program compute the answer, then dump it. Break at the final comparison
(b *main+OFFSET), enter any input of correct length, then x/s $rsi to dump
the computed value.
Part 3: General Reverse Engineering
Cross-cutting reference material for CTF challenges, non-native RE targets, and specialised techniques. Part 3 does not duplicate Part 2's tool guides; it adds challenge patterns, language specifics, platform knowledge, and meta-resources.
CTF Challenge Patterns
| File | Content |
references/general/patterns.md | Custom VMs, XOR ciphers, S-Box, self-modifying code, LLVM obfuscation, anti-debug patterns |
references/general/patterns-ctf.md | Emulator opcodes, LD_PRELOAD key extraction, RC4+VM loaders, kernel module mazes |
references/general/patterns-ctf-2.md | Multi-layer decrypt, stack string deobfuscation, lattice/circuit patterns, ROP obfuscation |
references/general/patterns-ctf-3.md | Z3 circuits, keyboard LED Morse, GLSL shader VM, BPF JIT, DNN inversion |
Language-Specific Techniques
| File | Target Languages |
references/general/languages.md | Python bytecode, WASM, HarmonyOS HAP/ABC, Brainfuck/esolangs, UEFI, DOS, FRACTRAN |
references/general/languages-platforms.md | Android JNI obfuscation, Electron, Node.js, Verilog, Ruby/Perl, Rust serde_json, Intel SGX |
Platform-Specific Reversing
| File | Platforms |
references/general/platforms.md | macOS/iOS (Mach-O, dyld, Swift), embedded/IoT (firmware, UART, RTOS), automotive CAN bus |
Crypto & Encoding Tools
references/general/crypto-decode-tools.md — Ciphey, CyberChef, dcode.fr,
Base64/32/16, Caesar, Vigenère, XOR, AES weak keys, Morse, hash identification.
Written in Chinese (中文).
AI-Assisted Reverse Engineering
references/general/ai-assisted-re.md — LLM4Decompile, Decaf (compiler-feedback
verification), constraint-guided multi-agent decompilation, REMEND equation
extraction. Written in Chinese (中文).
Quick Reference
references/general/field-notes.md — Binary type identification (pyc, WASM,
APK, Flutter, .NET, UPX, Tauri), anti-debugging bypass, S-Box/keystream
patterns, custom VM analysis, signal-based binary exploration, x86-64 gotchas,
iterative solver patterns, Unicorn emulation notes.
Resources
references/general/awesome-re-resources.md — Curated lists of RE tools,
tutorials, and communities (awesome-reversing, awesome-reverse-engineering,
malware-analysis resources, ARM exploitation guides).
Bootstrap
This skill's scripts can optionally install missing tools. When a required tool is not found, the bootstrap script asks before attempting automatic installation.
Automation Boundaries
| Tool | Auto-install | Method | Notes |
| jadx | ✓ | apt / brew / manual | Windows: manual download from GitHub |
| apktool | ✓ | apt / brew / manual | Windows: manual download from apktool.org |
| frida-tools | ✓ | pip | Requires Python |
| adb | ✓ | apt / brew / winget | |
| zipalign | ✗ | Manual Android Build-Tools | sdkmanager "build-tools;<version>" |
| apksigner | ✗ | Manual Android Build-Tools | Same as above |
| radare2 | ✓ | apt / brew / winget | |
| gdb | ✓ | apt / brew | Windows: manual or WSL |
| Ghidra | ✗ | Manual download | Requires JDK 17+ |
Bootstrap Trigger Points
scripts/decode.ps1/.sh— prompts when jadx or apktool is missingscripts/rebuild-sign-install.ps1/.sh— prompts when adb or apktool is missingscripts/frida-run.ps1/.sh— prompts when frida is missingscripts/start.ps1— prompts for all critical tools (jadx, apktool, frida, adb)
When Bootstrap Fails
If automatic installation fails or the user declines, the script throws a clear error with manual installation links. Common reasons: network unavailable, package manager not available, Java or Python not installed.
Re-routing Logic
| You encounter… | Start here | Then route to… |
.apk file | Part 1 (APK) | Part 2 if .so contains core logic |
.so / ELF / PE / Mach-O | Part 2 (SO) | Part 3 for CTF patterns or anti-debug |
APK with .so files | Part 1 (APK) triage, then Part 2 for .so analysis | Part 3 for anti-analysis patterns |
| CTF reversing challenge | Part 2 (SO) triage | Part 3 for patterns / language specifics |
| Python bytecode, WASM, .NET | Part 3 (General) → languages.md | Part 2 if native tools needed |
| Anti-debug / anti-VM bypass | Part 2 (SO) → anti-analysis.md | |
| Symbolic execution / emulation | Part 2 (SO) → tools-dynamic.md | |
| Flutter / React Native APK | Part 1 (APK) → android-advanced.md |
Output Requirements
The final response must at least explain:
- APK analysis: entry components, key classes, whether key logic is in Java,
smali, or
.so, sensitive points (login, signing, root, SSL, WebView, JNI), what was patched or hooked - Native analysis: binary type, architecture, notable functions/strings, anti-debug techniques encountered, bypass used, what was hooked or patched
- General analysis: challenge type, relevant patterns, toolchain used, solved approach
Prohibited Practices
- Do not blindly modify smali at the start
- Do not write hooks before checking the Manifest and main entry point
- Do not treat incomplete Java decompilation as proof the logic cannot be analysed
- Do not keep forcing Java-layer analysis when
.soclearly carries core logic - Do not jump to full reverse engineering before trying strings and dynamic triage
- Do not use
angrbefore understanding the binary's structure
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

