Instrument Android apps. See what ran. Explore the code.
AndroLog adds logging probes to APKs and turns runtime logs into coverage statistics and dynamic call graphs. Choose automatic probes or place your own messages in the code. No application source code is needed.
Install · GUI walkthrough · Desktop guide · CLI guide · Wiki
To run from source, install:
- JDK 17+ and Maven for the Java backend.
- Node.js 22.12+ and npm for the desktop interface.
- Android SDK with Platforms, Build Tools, and Platform Tools (
adb).
git clone https://github.com/JordanSamhi/AndroLog.git
cd AndroLog
mvn package
cd electron-gui
npm ci
npm startIn Settings, choose your SDK's platforms folder and one build-tools/<version> folder. Java is detected automatically. For later launches, run npm start from electron-gui.
The Electron GUI targets macOS, Windows, and Linux. You can also build a desktop package with Java included.
Open the original APK in Instrument. After selection, the logging options appear and the Coverage and Explore tabs become available. Select classes, methods, statements, Android components, or Dynamic call graph, then click Instrument APK. Save the result or test it directly on a connected device.
Click Reset to start a new session. This clears the current selections and report while keeping your saved files and SDK settings.
Open Custom logging, browse the package → class → method tree, and select a statement:
| Option | What you choose | What the report shows |
|---|---|---|
| Statement reached | Just the statement; nothing to type. AndroLog adds an internal marker. | Its location and Reached / Not reached status. |
| Custom message | A string, such as starting checkout. |
Your message, its location, and whether it was reached. |
| Variable value | Click Choose variable and select a local number, boolean, string, or object. | Its location, whether it was reached, and the Latest value captured. |
Click Use log points, then Instrument APK. Choose Custom only if you want these points without automatic coverage probes. Values are recorded before the selected statement; to inspect an assignment's result, select the following statement. Objects use their toString() representation.
The code browser shows Jimple reconstructed from the APK. Messages and selected variable values are logged just before the chosen statement executes.
Click Test on device, choose a connected Android phone or emulator, and click Start test. AndroLog installs your instrumented APK, starts recording, and launches the app. Exercise it, then click Stop & analyze to open Coverage automatically. Enable USB debugging and authorize the computer when using a physical device.
If an existing app has a conflicting signing key, AndroLog offers to remove it and retry installation. Removing an app also deletes its data; you must confirm before AndroLog removes it.
Each test keeps the exact APK and its logs together. You can also use the commands under Run your app after saving, or the CLI's --capture option.
Stop & analyze opens the dashboard with your test's APK, logs, and tag already selected. It shows statements, methods, classes, and Android components observed during the run. For an existing capture, open its instrumented APK and log file in Coverage, enter the matching Logcat tag, and click Analyze run.
Custom logs are grouped into Statement reached, Custom messages, and Variable values, with green Reached or red Not reached feedback. Variable logs also show the Latest value printed during the run. Click a row to jump to its statement in Explore. Red means not observed in this capture, not necessarily unreachable.
The instrumented APK and its logs are enough to analyze a run on another computer. No original APK or local instrumentation history is required. AndroLog's added code is excluded from the statistics.
Explore report lets you browse packages and methods, read whole classes with coverage highlighting, and follow code references. The dynamic call graph shows recorded calls; selecting a node highlights its incoming and outgoing edges.
Use Export HTML to share an interactive report that opens offline in a browser. Screenshots show a demonstration APK and its recorded execution on an Android emulator.
The same Java backend also supports instrumentation, automatic capture, and HTML/JSON reports:
java -jar target/androlog-0.1-jar-with-dependencies.jar --helpSee the CLI guide for signing setup, examples, options, and coverage semantics. The desktop guide covers SDK setup, custom logs, packaging, and troubleshooting.
AndroLog uses AndroSpecter and Soot for instrumentation and bytecode analysis. Issues and pull requests are welcome; see the development checks before submitting changes.
Licensed under LGPL v2.1. Contact: Jordan Samhi.






