Skip to content
Skillpedia
Mobile apps6.4k · #14221

decompile-apk

What it does

It explains how to turn an Android app file into readable Java code using the Androguard tool. It is for developers and security reviewers who need to read an app's code.

When to use it

  • ✓When a reviewer wants to read the Java code of an Android app for security review.
  • ✓When a developer wants to inspect one class or method from an app file.
  • ✓When someone needs the code of their own app recovered from its file.

Skill link

https://github.com/androguard/androguard/blob/master/.claude/skills/decompile-apk/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/androguard/androguard/blob/master/.claude/skills/decompile-apk/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Decompile the com.example package from this APK so I can read its Java code.”

5 new skills a week. 1 minute to read.

How it works

The skill tells the AI to check the decompiler is available, then write the app's code to a folder, limited to one package when possible, or print a single class or method.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

/decompile-apk — Decompile with Androguard

Input

$ARGUMENTS:

  1. APK path (required)
  2. Optional: Java package (com.example.app) or Class#method selector

Ensure decompiler

python -c "from androguard.core.decompiler import ensure_loaded; ensure_loaded()"

On failure: export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 && pip install -e '.[decompile]'.

Whole package → directory

PKG="${2:-}"   # package filter if provided
OUT="workspace/output/${PKG:-decompiled}"
mkdir -p "$OUT"
androguard -i "$1" -d "$OUT/" ${PKG:+--only-package "$PKG"}

One class

androguard -i "$1" --getclass "$2"

One method

androguard -i "$1" --decompile-method "$2"
# or write file:
androguard -i "$1" --decompile-method "$2" -o workspace/output/method.java

Python

from androguard import Application
app = Application("app.apk")
app.decompile_apk_to_dir("workspace/output/pkg/", only_package="com.example")
print(app.getclass("com.example.MainActivity")[:2000])
print(app.decompile_method_selector("com.example.MainActivity#onCreate"))

Notes

  • Prefer --only-package to avoid dumping entire AndroidX trees.
  • Use --exclude android. / androidx. when decompiling broadly.
  • Quality issues in Java emission are fixed in sibling dex-decompiler, not by pasting jadx output into this repo.
FAQ

Why limit to one package?

The skill says to limit output to one package to avoid dumping large library code.

What if the decompiler is missing?

The skill gives an install step for the decompiler extra, which may need a specific environment setting.

Can I use it from Python?

Yes. The skill shows a short Python example that decompiles an app to a folder.

Details

Original description by the author

Decompile an APK (or one class/method) to Java with Androguard dex-decompiler bindings

repo: androguard/androguard

Popularity

GitHub stars
6.4k
Ranking position
#14221
License
Apache-2.0
Updated
10/25/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills