newliver666/apk-reverse

Suitable for Android APK reverse engineering analysis

What it solves

This project provides a comprehensive set of capabilities for Android APK reverse engineering. It enables an AI agent to perform tasks such as debloating apps, removing advertisements, patching DEX files, repacking APKs, and analyzing runtime or server-side behavior. It specifically addresses the common failures encountered during reverse engineering, such as bypassing server-side paywalls, handling hardened/packed targets, and ensuring patched builds remain functional and stable.

How it works

Rather than being a tutorial, this is an "Agent Skill" designed to be loaded by an AI agent (like Claude Code or Codex). It uses a structured approach to guide the agent through the process:

  • Procedural Guidance: A SKILL.md file acts as a procedure with "gates" (pass criteria) and "override rules" to prevent the agent from hallucinating or repeating mistakes.
  • On-Demand References: Detailed technical guides in the references/ directory are loaded only when specific steps require them.
  • Parameterized Scripts: A large library of Python and JavaScript scripts in the scripts/ directory handles the heavy lifting, from byte-level patching and DEX reading to Frida-based runtime probing and APK repacking.
  • Environment Validation: A doctor.py script is used first to verify tool availability and environment health (e.g., clock skew, ADB connectivity) to avoid poisoning measurements.

Who it’s for

It is designed for AI agents equipped with a skills-loading harness, as well as developers or security researchers who want to provide an agent with the specialized tools and methodologies needed for Android application analysis and modification.

Highlights

  • Surgical Patching: Supports equal-length byte edits to avoid breaking app stability and DEX-level rewriters for more complex changes.
  • Hardened Target Support: Includes tools to identify and unpack packers, handle code virtualization, and neutralize native libraries that intentionally crash the process.
  • Runtime Analysis: Integrated Frida probes for network layer analysis and memory mapping to see what is actually executing.
  • Dart AOT Support: Specialized tools for recovering literals and disassembling Dart AOT snapshots.
  • Stability Checks: Includes a "claim ladder" and verification steps to ensure a patched APK actually works and isn't just a "successful" build that fails at runtime.

Written about in

Related

  • Project
  • Project
  • Project
  • Project