Skip to content

olef runtime

CLI v3.0.2View Markdown

Generated from Olef 3.0.2. All commands · Capabilities and requirements

These entries describe available commands, not a sequence to run. Check prerequisites before changing app, device, or cloud state. Global options are listed in the command catalog.

Attach and manage the in-process runtime in debuggable apps

Terminal window
olef runtime --help

Output: json.

Examples from the CLI (replace sample packages, selectors, and paths with your own):

Terminal window
olef --device emulator-5554 runtime attach --app io.github.andriyo.shadowdroid.sample
olef runtime attach --app <package> --startup --restart

Attach the runtime to a debuggable app, without the server APK

Terminal window
olef runtime attach --help

Output: json.

Argument Description
--app <APP> App package
--pid <PID> App process id
--startup Load on future app starts (API 29+), until runtime detach
--restart Force-stop and relaunch the app, discarding its in-memory state Conflicts with: pid.
--timeout-ms <TIMEOUT_MS> Maximum wait for the host daemon to become ready after deployment Default: 20000.
--coroutine-probes Track coroutines with kotlinx DebugProbes from the moment the runtime starts (with –startup: from process start) for runtime coroutines
--json Accepted for compatibility; output is always JSON.

Examples from the CLI (replace sample packages, selectors, and paths with your own):

Terminal window
olef --device emulator-5554 runtime attach --app io.github.andriyo.shadowdroid.sample
olef runtime attach --app <package> --startup --restart

List live runtime sessions (read-only on the device)

Terminal window
olef runtime status --help

Output: json.

Argument Description
--app <APP> App package
--pid <PID> App process id
--json Accepted for compatibility; output is always JSON.

Detach and remove the app’s startup runtime agent

Terminal window
olef runtime detach --help

Output: json.

Argument Description
--app <APP> App package
--pid <PID> App process id
--all Detach every session and remove known startup agents on the selected device Conflicts with: app, pid.
--json Accepted for compatibility; output is always JSON.

Dump the app’s live coroutines (state, context, stacks) via kotlinx DebugProbes, with no build changes; attaches the runtime if needed

Terminal window
olef runtime coroutines --help

Output: human_or_json.

Argument Description
--app <APP> App package
--pid <PID> App process id
--dump Include the full DebugProbes text dump (job hierarchy + stack traces)
--frames <FRAMES> Stack frames to show per coroutine in the structured list (0 = none) Default: 6.
--limit <LIMIT> Cap the structured coroutine list (state counts are always complete) Default: 200.
--out <OUT> / -o Write the full text dump to this file (implies the dump is collected)
--json Emit a single JSON object instead of human-readable text