angee.integrate_iphone.backup
Read-only access to one unencrypted Finder/iTunes iPhone backup.
SQLITE_HEADER_LENGTH
Bytes needed to recognize a SQLite database without reading its body.
BackupError
class BackupError(Exception)The backup directory is missing, encrypted, corrupt, or unreadable.
ManifestFile
@dataclass(frozen=True)
class ManifestFile()One regular file resolved from Manifest.db to its physical blob.
IosBackup
class IosBackup()Read-only view over one unencrypted iPhone backup directory.
blob_path
def blob_path(domain: str, relative_path: str) -> Path | NoneReturn the on-disk blob for one backed-up file, or None.
blob_relative_path
def blob_relative_path(domain: str, relative_path: str) -> PurePosixPathReturn the backup-relative <fileID[:2]>/<fileID> blob location.
blob_id
def blob_id(domain: str, relative_path: str) -> strReturn one file's manifest id or its deterministic fallback id.
iter_files
def iter_files() -> Iterator[ManifestFile]Yield valid physical files in deterministic logical-path order.
Older manifests without the flags column cannot distinguish files from directories, so every row is treated as a file and missing blobs are still skipped. Malformed rows are contained to that row.
iter_dirs
def iter_dirs() -> Iterator[tuple[str, str]]Yield manifest directories as (domain, relative_path) pairs.
read
def read(domain: str, relative_path: str) -> bytes | NoneReturn one backed-up file's bytes, or None when absent.
close
def close() -> NoneClose the read-only manifest connection.
logical_key
def logical_key(domain: str, relative_path: str) -> strReturn the canonical domain/relativePath key for one backup entry.
split_logical_key
def split_logical_key(key: str) -> tuple[str, str]Validate and split one canonical domain/relativePath key.
is_sqlite_header
def is_sqlite_header(value: bytes) -> boolReturn whether value begins with SQLite's fixed file header.