# AI use cases for Dexsql Release (LSPosed/dexsql-release)

Repo: [LSPosed/dexsql-release](https://github.com/LSPosed/dexsql-release) | Use cases: 3 | Page: https://dedupedai.com/use-cases/lsposed-dexsql-release/

DexSQL is a closed-source tool that runs SQL queries over classes, methods, strings and call references in Android APK and DEX files, from the command line or through an MCP server for AI agents.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Trace which methods log a given string and who calls them: https://dedupedai.com/use-cases/lsposed-dexsql-release/trace-log-string-callers-with-agent/
- List hardcoded URLs in an APK with one SQL query: https://dedupedai.com/use-cases/lsposed-dexsql-release/list-hardcoded-urls-in-apk/
- Search all DEX files in an app in a single query: https://dedupedai.com/use-cases/lsposed-dexsql-release/search-multiple-dex-files-in-one-query/

## How to trace which methods log a given string and who calls them with Dexsql Release

Repo: [LSPosed/dexsql-release](https://github.com/LSPosed/dexsql-release) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Have an agent query an APK over MCP to map a log message to its methods and callers.

**Who it is for:** A reverse engineer or security reviewer who sees a log message in an app and wants to know which code produces it and what triggers that code.

**The problem:** Following a string through Smali and decompiled code by hand is slow, and call chains are easy to lose track of.

**The outcome:** The agent returns the methods that reference the message, their callers, and the relevant Smali, based on structured query results.

### Steps

1. Open the Releases page and download the executable or archive that matches your operating system and CPU.
2. Rename the executable to `dexsql.exe` on Windows or `dexsql` on macOS/Linux, then run `chmod +x /path/to/dexsql` on macOS/Linux.
3. Save `LICENSE` and `LICENSE-AUXILIARY` from the same release alongside the executable.
4. Register the server with Codex by running `codex mcp add dexsql -- /absolute/path/to/dexsql mcp`.
5. Ask the agent: Open /path/to/app.apk. Find methods referencing this log message, list their callers, and show the relevant Smali.

### Prompt to paste into your agent

```text
Use the dexsql MCP server to open <path to APK>. Find every method that references the log message <message text>, list each caller of those methods, and show the relevant Smali. Before summarizing, confirm that each reported method name appears in the query results.
```

### Caveat

The README lists the bundle for macOS, x86_64 Linux and x86_64 Windows only, so other platforms need the install skill or manual setup, and the README's Codex command is the only client registration it gives.

Risk, reverse engineering: Only analyze APKs you have the right to inspect, since this traces an app's internal logging and call paths.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lsposed-dexsql-release/trace-log-string-callers-with-agent/

## How to list hardcoded URLs in an APK with one SQL query with Dexsql Release

Repo: [LSPosed/dexsql-release](https://github.com/LSPosed/dexsql-release) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Run a single CLI query to find which methods reference a specific URL inside an APK.

**Who it is for:** A security analyst who needs to check whether an app talks to a particular server or domain and which code does it.

**The problem:** Searching every string and method in a large app by hand takes too long, and grep does not show which method owns each string.

**The outcome:** A list of method names that reference the target URL string, produced without decompiling the whole app.

### Steps

1. Open the Releases page and download the executable that matches your operating system and CPU.
2. Rename the executable to `dexsql` on macOS/Linux, then run `chmod +x /path/to/dexsql`.
3. Replace the example URL in the command below with the value you want to match, keeping the single quotes, then run `dexsql query --input app.apk --sql "SELECT DISTINCT method FROM method_strings WHERE value = 'https://api.example.com'"`.
4. Check that the output lists the methods you expect, then rerun with a different value to compare endpoints.

### Prompt to paste into your agent

```text
Run the dexsql CLI against <path to APK> with a query that selects distinct methods from method_strings where value equals <URL>. Report the method names returned and confirm the count matches the number of rows printed.
```

### Caveat

The README example uses a placeholder URL, and the query matches the exact string value, so partial or differently formatted URLs need their own query.

Risk, reverse engineering: Only run this on APKs you are authorized to examine, since it exposes the endpoints an app contacts.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lsposed-dexsql-release/list-hardcoded-urls-in-apk/

## How to search all DEX files in an app in a single query with Dexsql Release

Repo: [LSPosed/dexsql-release](https://github.com/LSPosed/dexsql-release) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Query several APK or DEX inputs together to find code spread across split or multi-DEX builds.

**Who it is for:** A developer or analyst working with a large app that ships many DEX files, who needs one answer across all of them.

**The problem:** Running separate searches per DEX file misses cross-file references and forces manual merging of results.

**The outcome:** One result set that covers every supplied file, so a method or string can be found wherever it lives in the app.

### Steps

1. Download the executable for your OS and CPU from the Releases page and set it up as in the manual MCP or CLI steps.
2. Pass each input file with its own `--input` flag, for example `dexsql query --input base.apk --input feature.apk --sql "SELECT DISTINCT method FROM method_strings WHERE value = '<value>'"`. (inferred, check the README)
3. Use `dexsql query --input base.apk --input feature.apk --interactive` to run several exploratory queries against the same loaded inputs. (inferred, check the README)
4. Note which input each result came from, since the query output shows method names and you should confirm the source file before drawing conclusions.

### Prompt to paste into your agent

```text
Using the dexsql CLI, query <APK or DEX path 1> and <APK or DEX path 2> together for the method <method name>. Report which input files contain a matching method and state any method that appears in only one file.
```

### Caveat

The README confirms that repeating --input queries multiple files together but does not say how results are labeled by source file, so check the output format yourself before relying on it.

Risk, reverse engineering: Combining several app packages to map their code is reverse engineering, so keep it to software you are allowed to analyze.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lsposed-dexsql-release/search-multiple-dex-files-in-one-query/
