LSPosed/dexsql-release

SQL for Android apk and dex files

What it solves

Traditional APK analysis tools are often slow and awkward for AI agents to use. DexSQL gives you a SQL interface directly over DEX files, so agents can combine class, method, string, and call-relationship lookups in a single query and get only the structured results they need. It reuses loaded datasets to serve repeated queries with low latency and a small memory footprint.

How it works

DexSQL reads DEX files directly and exposes a SQL API. You can use it from the command line or through its built-in Model Context Protocol (MCP) server, which connects directly to AI clients. The MCP server provides its schema and documentation through MCP resources. APK parsing runs locally and leaves the input unchanged.

Who it’s for

AI agents and developers who need to analyze Android app binaries—particularly those doing security research, reverse engineering, or app analysis. It integrates with AI coding assistants like Codex or Claude Desktop, and can also be used interactively from a terminal.

Highlights

  • Query classes, methods, strings, and call references across one or more APK/DEX files using SQL.
  • Built-in MCP server for direct AI-agent integration, no GUI required.
  • Low latency: opening a 343 MiB APK (56 DEX files) took 0.38 s; answering 10 analysis goals took 0.71 s in a replayed session.
  • Same executable works as CLI and MCP server; supports interactive SQL mode.
  • Benchmarks show it outperforms several other analysis tools on common queries (startup, class lookup, string reference).

Related

  • Project
  • Project
  • Project
  • Project