Skip to content

CLI Reference

Jordan Samhi edited this page Oct 23, 2026 · 1 revision

Use androlog --help after defining the helper in Installation, or inspect the JAR directly:

java -jar target/androlog-0.1-jar-with-dependencies.jar --help

The reference below describes the current 0.1 development code. Short options with several letters, such as -mc, -pam, and -html, are individual options.

Modes

Mode Selection Result
Instrument No capture or parsing option Export an instrumented, aligned, signed APK
Capture --capture Instrument, install, launch, record, and write HTML/JSON with a timeline
Aggregate report -pa <log> Report distinct observed coverage and call relationships
Report with timeline -pam <log> Add cumulative coverage by minute

-a and -p are required except for help. Capture and parsing modes are mutually exclusive; so are -pa and -pam.

Inputs and outputs

Short Long Value and behavior
-a --apk APK path; use the original APK for reporting
-p --platforms SDK platforms directory or an android.jar file
-o --output Instrumented APK directory, or capture session parent; defaults to a temporary directory
-l --log-identifier Logcat tag; default ANDROLOG
-pa --parse Runtime log file for aggregate reporting
-pam --parse-per-minute Runtime log file for reporting with cumulative minute totals
-html --html Destination HTML file; requires parsing or capture
-j --json Destination JSON file; requires parsing or capture

Explicit HTML and JSON destinations are files, not directories. Their parent directories are created as needed. They must be separate from each other and from the input APK and runtime log. Capture supplies both default destinations; manual parsing writes only the requested formats.

Capture controls

Short Long Value and behavior
-capture --capture Enable the complete capture workflow
-device --device Ready device serial; required when several devices are ready
-adb --adb ADB executable override
-duration --duration Positive integer seconds after launch; otherwise wait for Enter

--device, --adb, and --duration require capture mode. Capture tags must match [A-Za-z0-9_][A-Za-z0-9_.-]*. See Capture for discovery, stopping, and recovery behavior.

Probes

Short Long Measurement
-c --classes Class coverage
-m --methods Method coverage
-s --statements Eligible Jimple statement coverage
-cp --components Activity, service, broadcast receiver, and content provider coverage
-mc --method-calls Dynamic call relationships and runtime dispatch confirmation

Capture and HTML reporting require at least one probe option. -mc alone is sufficient for a graph-only HTML report. Repeat the instrumentation probe selection during manual reporting.

Scope and diagnostics

Short Long Value and behavior
-pkg --package Restrict selected classes by package prefix
-n --non-libraries Exclude known libraries; bundled libraries are included by default
-t --threads Positive Soot thread count; otherwise use Soot's configuration
-v --verbose Print exception details on failure; forward detailed child diagnostics during capture
-h --help Show usage and examples

-t controls Soot processing, not the number of app threads or test interactions. Scope options must match between instrumentation and reporting.

Exit codes

Code Meaning
0 Successful command
1 Processing failure
2 Invalid arguments or usage

The terminal shows stages, elapsed times, context, and output paths. Errors go to standard error. An interrupted process is handled by the shell and is distinct from a completed report command.

For working commands, use Quick Start or Manual Workflow.

Clone this wiki locally