Private app data¶
app.data: stopped, debuggable-app private files and SQLite bundles. Guide:
Private app data.
app_data
¶
Debuggable-app private data, owned and transferred by the Tap server (never local ADB).
AppData
¶
Private files under a debuggable app's credential-encrypted data directory.
Obtain from app.data. Except capabilities, access requires all processes under the
app UID to be stopped, including secondary/native/shared-UID processes. Call
app.force_stop() explicitly; Tap never stops/relaunches/restores app data implicitly.
Do not concurrently drive the app through UI, notifications, another ADB client or an
external actor. This is not an OS filesystem lock. Paths are normalized relative UTF-8,
without traversal, symlink components, control characters or reserved .tap-private-
components. Transfers are binary-safe and bounded to 64 MiB; contents and paths are omitted
from event records. Transport loss during mutation is not a reason to retry blindly.
Methods:
| Name | Description |
|---|---|
capabilities |
Probe actual run-as access; safe while the app runs. No root fallback. |
list |
List immediate children (at most 1024); empty |
read |
Read one regular file, at most 64 MiB, with server-side size/SHA-256 verification. |
write |
Write at most 64 MiB. Create missing parents; refuse an existing file by default. |
delete |
Delete one regular file; no directory/root/recursive deletion. App must be stopped. |
export_database |
Export |
import_database |
Stage and import a database bundle, optionally under another basename. |
capabilities
¶
capabilities() -> AppDataAccess
Probe actual run-as access; safe while the app runs. No root fallback.
list
¶
list(path: str = '') -> list[PrivateFileEntry]
List immediate children (at most 1024); empty path lists the private root.
read
¶
read(path: str, *, timeout: float | None = None) -> bytes
Read one regular file, at most 64 MiB, with server-side size/SHA-256 verification.
write
¶
write(path: str, data: bytes, *, overwrite: bool = False, timeout: float | None = None) -> None
Write at most 64 MiB. Create missing parents; refuse an existing file by default.
Verify staged bytes before replacement. Changes are not restored on session release.
delete
¶
delete(path: str) -> None
Delete one regular file; no directory/root/recursive deletion. App must be stopped.
export_database
¶
export_database(name: str, *, timeout: float | None = None) -> DatabaseBundle
Export databases/name with existing WAL/journal, at most 64 MiB total.
A stopped app may retain committed WAL; copying the base database alone is not a backup.
import_database
¶
import_database(bundle: DatabaseBundle, *, name: str | None = None, overwrite: bool = False, timeout: float | None = None) -> None
Stage and import a database bundle, optionally under another basename.
Discard old sidecars, including SHM. Refuse existing files unless overwrite=True.
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.
No app restart, SQL validation, schema conversion or decryption is performed.
AppDataAccess
¶
PrivateFileEntry
¶
DatabaseBundle
¶
Opaque SQLite base file plus persistent WAL/rollback journal, never rebuildable SHM.
Import needs the app's own schema, keys and migrations. No SQL/decryption is performed.
name is a database basename, not a path. Together the bytes may be at most 64 MiB.