Skip to content

olef storage

olef v3.18.0View Markdown

Generated from Olef 3.18.0. All olef commands · ocloud commands · Capabilities

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.

Inspect SQLite/Room databases, SharedPreferences, and Jetpack DataStore

Terminal window
olef storage --help

Output: json.

List databases, SharedPreferences, and DataStore files in a debuggable app

Terminal window
olef storage ls --help

Output: json.

Argument Description
--app <APP> App package or configured app alias. Defaults to configured app
--json Accepted for compatibility; output is always JSON.

Inspect or query SQLite/Room databases

Terminal window
olef storage db --help

Output: json.

Print tables and sqlite_schema definitions for a database

Terminal window
olef storage db schema --help

Output: json.

Argument Description
<database> Required. Database filename (e.g. app.db) or relative path under databases/ or no_backup/
--app <APP> App package or configured app alias
--quiescent Force-stop the app for a deterministic quiescent snapshot before reading Conflicts with: live.
--live Query live open SQLiteDatabase instances through the attached runtime agent Conflicts with: quiescent.
--max-db-bytes <MAX_DB_BYTES> Maximum database size to copy to host (default 64 MiB) Default: 67108864.
--json Accepted for compatibility; output is always JSON.

Run a strictly read-only SQL query against an app database

Terminal window
olef storage db query --help

Output: json.

Argument Description
<database> Required. Database filename (e.g. app.db) or relative path under databases/ or no_backup/
<sql> Required. Single read-only SQL SELECT / WITH statement
--app <APP> App package or configured app alias
--param <PARAMS> Positional bind parameter as a JSON scalar (repeatable)
--max-rows <MAX_ROWS> Maximum rows to return (1..=1000) Default: 100.
--offset <OFFSET> Row offset for pagination Default: 0.
--timeout-ms <TIMEOUT_MS> Query execution timeout in milliseconds (1..=10000) Default: 2000.
--quiescent Force-stop the app for a deterministic quiescent snapshot before querying Conflicts with: live.
--live Run the read-only query against the live in-process database via the runtime agent Conflicts with: quiescent.
--allow-columns <ALLOW_COLUMNS> Additional column names permitted unredacted when global --redact is active
--max-db-bytes <MAX_DB_BYTES> Maximum database size to copy to host (default 64 MiB) Default: 67108864.
--json Accepted for compatibility; output is always JSON.

Execute a transactional write SQL statement against a live app database (--live runtime)

Terminal window
olef storage db exec --help

Output: json.

Argument Description
<database> Required. Database filename (e.g. app.db) or relative path under databases/ or no_backup/
<sql> Required. SQL statement to run inside an explicit transaction
--app <APP> App package or configured app alias
--live Explicit acknowledgement of live in-process execution (always runs live)
--param <PARAMS> Positional bind parameter as a JSON scalar (repeatable)
--timeout-ms <TIMEOUT_MS> Execution timeout in milliseconds (1..=10000) Default: 5000.
--json Accepted for compatibility; output is always JSON.

Read or modify SharedPreferences XML files

Terminal window
olef storage prefs --help

Output: json.

Read all entries or one key from a SharedPreferences XML file

Terminal window
olef storage prefs get --help

Output: json.

Argument Description
<name> Required. SharedPreferences name (e.g. app_prefs or shared_prefs/app_prefs.xml)
<key> Optional single key to read
--app <APP> App package or configured app alias
--allow-keys <ALLOW_KEYS> Keys permitted unredacted when global --redact is active
--json Accepted for compatibility; output is always JSON.

Set a typed SharedPreferences value (live via runtime when running, or atomic --restart)

Terminal window
olef storage prefs set --help

Output: json.

Argument Description
<name> Required. SharedPreferences name
<key> Required. Preference key
<value> Value to write. Use --value-env for secrets
--value-env <ENV> Read the preference value from this environment variable (never echoed) Conflicts with: value.
--type <KIND> Value type Default: string. Values: string, int, long, float, bool, string-set.
--restart Force-stop, write atomically (removing stale .xml.bak), relaunch, and read back
--app <APP> App package or configured app alias
--json Accepted for compatibility; output is always JSON.

Remove a SharedPreferences key (live via runtime when running, or atomic --restart)

Terminal window
olef storage prefs rm --help

Output: json.

Argument Description
<name> Required. SharedPreferences name
<key> Required. Preference key to delete
--restart Force-stop, delete atomically (removing stale .xml.bak), relaunch, and read back
--app <APP> App package or configured app alias
--json Accepted for compatibility; output is always JSON.

Decode Jetpack Preferences DataStore or raw Proto DataStore files

Terminal window
olef storage datastore --help

Output: json.

Decode a Jetpack Preferences DataStore (.preferences_pb) or raw Proto DataStore file

Terminal window
olef storage datastore read --help

Output: json.

Argument Description
<name> Required. DataStore filename (e.g. settings.preferences_pb) or relative files/datastore/... path
--app <APP> App package or configured app alias
--format <FORMAT> Wire format decoding mode Default: auto. Values: auto, preferences-pb, proto-raw.
--allow-keys <ALLOW_KEYS> Keys or field numbers permitted unredacted when global --redact is active
--json Accepted for compatibility; output is always JSON.