User docs | English
For anyone building the Android app from source. All paths are relative to the repository root.
The app loads several native libraries from trierarch-app/app/src/main/jniLibs/arm64-v8a/ and optional assets under trierarch-app/app/src/main/assets/. Below is the monorepo build surface: role → artifact(s) → build entry point → docs.
Run this before pushing a PR:
./scripts/dev-check.shtrierarch-app/app/src/main/assets/pulse/is generated bytrierarch-audio/build-android/build-pulse-android.shand intentionally not tracked by git. At runtime the app extracts it tofilesDir/pulse/.
Runs the Compose UI, bundles assets, and produces the installable APK. You assemble JNI libraries into jniLibs, then run Gradle here.
- Role: packaging and Java/Kotlin UI.
- Artifact: e.g.
trierarch-app/app/build/outputs/apk/debug/app-debug.apk. - Details:
trierarch-app/README.md
Implements proot integration, PTY I/O, rootfs download/extract, etc., exposed to the app as libtrierarch.so.
- Role: Rust JNI bridge used by the Android code.
- Artifact:
trierarch-native/target/aarch64-linux-android/release/libtrierarch.so→ copy totrierarch-app/app/src/main/jniLibs/arm64-v8a/. - Details:
trierarch-native/README.md
Builds the proot binary and loader used as libproot.so / libproot_loader.so in the app.
- Role: userspace chroot/exec inside the Arch rootfs.
- Artifacts:
trierarch-proot/build-android/out/aarch64/proot→libproot.so,loader→libproot_loader.so(see proot README for exact copy names). - Details:
trierarch-proot/README.md
Builds the minimal Wayland server .so files so Linux GUI clients in the rootfs can render into the app surface.
- Role: Wayland compositor + dependencies for the in-app view.
- Artifacts: everything under
trierarch-wayland/out/arm64-v8a/*.so→ copy intotrierarch-app/app/src/main/jniLibs/arm64-v8a/. - Details:
trierarch-wayland/README.md
Builds the embedded Xorg-based X11 server library used for X11 sessions.
- Role: X11 server + renderer (
libXlorie.so). - Source: Git tracks only
trierarch-x11/scripts/(and README); the script clonestrierarch-x11/termux-x11/(gitignored) and can refresh upstream withTX11_UPDATE_UPSTREAM=1(see that README). - Artifacts:
trierarch-x11/out/arm64-v8a/libXlorie.so→ copy intotrierarch-app/app/src/main/jniLibs/arm64-v8a/. - Details:
trierarch-x11/README.md
Build a bionic pulseaudio prefix for the app’s internal storage layout (filesDir/pulse/). Guest libpulse connects over a Unix socket exposed by the host daemon.
- Role: host daemon + guest
libpulseoverPULSE_SERVER. - Artifacts: after
meson install, shipbin/,lib/, … under the app’spulse/prefix (seepulse_hostintrierarch-native). - Details:
trierarch-audio/README.md
After building the pieces above (see each README.md), from the repo root:
mkdir -p trierarch-app/app/src/main/jniLibs/arm64-v8a
cp trierarch-proot/build-android/out/aarch64/proot trierarch-app/app/src/main/jniLibs/arm64-v8a/libproot.so
cp trierarch-proot/build-android/out/aarch64/loader trierarch-app/app/src/main/jniLibs/arm64-v8a/libproot_loader.so
cp trierarch-native/target/aarch64-linux-android/release/libtrierarch.so trierarch-app/app/src/main/jniLibs/arm64-v8a/
cp trierarch-wayland/out/arm64-v8a/*.so trierarch-app/app/src/main/jniLibs/arm64-v8a/
cp trierarch-x11/out/arm64-v8a/libXlorie.so trierarch-app/app/src/main/jniLibs/arm64-v8a/Optional: build and sync the host PulseAudio prefix into app assets:
cd trierarch-audio/build-android
./build-pulse-android.shEnsure trierarch-app/app/src/main/assets/keymap_us.xkb is present (shipped in this repo). Then:
cd trierarch-app
./gradlew assembleDebug
./gradlew installDebugOutput: trierarch-app/app/build/outputs/apk/debug/app-debug.apk.
- The app stores its Arch rootfs under
data_dir/arch(internal storage). If missing at first launch, it may be auto-downloaded viaproot-distro(network required).