AppData

Debuggable-app credential-encrypted private data. Obtain from App.data. Except capabilities, access needs all app-UID processes stopped, including secondary/native/shared UID processes. Call App.forceStop explicitly: no implicit stop/relaunch or restore on detach. Do not concurrently drive the app through UI, notifications, another ADB client or external actor: this is not an OS filesystem lock. Paths are relative UTF-8, without traversal, symlink/control characters or reserved .tap-private- components. Transfers are binary-safe, bounded to 64 MiB, and omitted (including paths) from event records. Never retry a lost mutation blindly. These calls observe tapTest's coroutine-bound lifetime like other App calls.

Functions

Link copied to clipboard

Probe actual run-as access, safe while the app runs. No root fallback.

Link copied to clipboard
suspend fun delete(path: String)

Delete one regular file only. No recursive deletion, root/directory deletion or restore.

Link copied to clipboard
suspend fun exportDatabase(name: String, timeout: Duration? = null): DatabaseBundle

Snapshot the database and existing WAL/journal, at most 64 MiB total; never discard WAL.

Link copied to clipboard
suspend fun importDatabase(bundle: DatabaseBundle, name: String = bundle.name, overwrite: Boolean = false, timeout: Duration? = null)

Import the bundle, optionally under another name. Stage all bytes before replacement; discard old sidecars including SHM. Refuse existing files unless overwrite. Multi-file replacement is not an OS transaction: after interrupted commit, do not launch or repeat blindly. Inspect/repair the retained private backup or explicitly clear data first.

Link copied to clipboard
suspend fun list(path: String = ""): List<PrivateFileEntry>

List immediate children, at most 1024. An empty path lists the private root.

Link copied to clipboard
suspend fun read(path: String, timeout: Duration? = null): ByteArray

Read one regular file, at most 64 MiB, with server-side size/SHA-256 verification.

Link copied to clipboard
suspend fun write(path: String, data: ByteArray, overwrite: Boolean = false, timeout: Duration? = null)

Create parents and write bounded bytes. Refuse an existing file unless overwrite.