DROIDIAN-APEX(8)

NAME
droidian-apex - manage Android APEX modules for Droidian

SYNOPSIS
droidian-apex [options] command [arguments]

DESCRIPTION
droidian-apex discovers Android Pony EXpress modules before apexd starts, mounts flattened or packaged modules, and mirrors apexd's live mounts from a Halium LXC container to the Droidian host.

Discovery does not require the container to be running. By default the program searches APEX directories below /android/system, /android/system_ext, /android/product, /android/vendor, /android/odm, and /android/data/apex/active.

OPTIONS

-a, --android-root=PATH
    Use PATH as the root containing Android partitions. The default is /android.

-m, --mount-root=PATH
    Use PATH for host APEX mounts. The default is /apex.

-c, --container=NAME
    Use the named LXC container. The default is android.

-t, --timeout=SECONDS
    Set the apexd wait timeout. The default is 60 seconds.

-n, --dry-run
    Inspect packages and print mount operations without changing mounts.

-v, --verbose
    Print discovery, container, and property state transitions.

-V, --version
    Print the program version.

COMMANDS

list [--json] [ROOT ...]
    Enumerate flattened directories, packaged APEXs, and compressed APEXs. Explicit roots may be an APEX source directory, a directory containing APEXs, or an APEX file. This command never contacts apexd.

mount [--all | PATH ...]
    Mount the highest version of each module. Flattened modules use read-only bind mounts. Packaged modules use read-only loop mounts, with automatic ext4/EROFS detection. Compressed APEXs are unpacked transiently. This command requires root unless --dry-run is used.

prepare
    Alias for mount --all.

wait [started|activated|ready]
    Wait for the container and the requested apexd property state. Later states satisfy waits for earlier states. The default is ready.

status
    Print LXC state, init PID, and the value of apexd.status.

sync
    Wait for apexd to become ready, locate the container mount namespace through /proc/PID/root/apex, and read-only bind the canonical module paths to the host APEX root. This is the preferred command for lxc-android startup integration.

apexd status
    Show container and apexd state.

apexd wait [STATE]
    Wait for apexd. Equivalent to the top-level wait command.

apexd dump [ARG ...]
    Run dumpsys apexservice inside the container. If its active-package section is empty, append a package list derived from the container's live /apex mounts. Any additional dumpsys arguments are passed through unchanged and disable this fallback.

diagnose
    Report configuration, required device nodes and filesystems, mount state, LXC state, apexd status, and every pre-start APEX candidate.

ENVIRONMENT

DROIDIAN_APEX_ANDROID_ROOT
    Default Android partition root.

DROIDIAN_APEX_MOUNT_ROOT
    Default host APEX mount root.

DROIDIAN_APEX_CONTAINER
    Default LXC container name.

DROIDIAN_APEX_TIMEOUT
    Default wait timeout in seconds.

SECURITY
The direct mount command parses and mounts payloads but does not implement apexd signature or dm-verity verification. Use it only with trusted APEXs from Android's verified, read-only partitions. For the normal boot path, use sync, which mirrors mounts already activated and verified by apexd.

EXIT STATUS
Zero indicates success, one indicates an operational failure or timeout, and two indicates invalid command-line usage.

FILES

/usr/sbin/droidian-apex
    Program executable.

/run/droidian-apex-manager
    Short-lived extraction files used while mounting compressed payloads.

SEE ALSO
lxc-attach(1), lxc-info(1), mount(8)

AUTHOR
Erik Inkinen <erik.inkinen@erikinkinen.fi>