APatch Linux
Run Linux on Android with either chroot (existing APatch containers) or User-Mode Linux (an unprivileged guest with its own kernel). Both backends use the apatch-linux command; apatch-chroot stays available for compatibility.
Chroot uses the privileged APatch daemon and Termux broker. UML boots directly from Termux. You can try the SMP kit without installing the APatch module.
Start here
- What the flip is UML? — which kernel changed, what stayed put, and why a recovery shell can panic.
- Architecture — how the chroot daemon, broker, and CLI fit together.
- Safety — what chroot mount and audio isolation does and doesn’t protect.
Topics
- UML — boot a pre-existing
~/uml/ubuntu.ext4disk with its own Linux kernel. - SMP and trial boots — try the RC3 kernel with two CPUs without writing to that disk.
- Services — mini-systemd init, the
systemctlshim, managing services from the host. - Display — GUI apps via Termux:X11 (
--shared-display). - LXQt desktop — run a lean desktop with private D-Bus and a RAM startup check.
- Electron apps — VSCode / Chromium (
--no-sandbox). - Storage — install vs convert vs
--move, and disk-space math. - box64 — optional x86_64 emulation.
- Protocol — the wire protocol between client, broker, and core.
Quick reference
apatch-chroot info # device capabilities
apatch-chroot check-update # is a newer release out?
apatch-chroot install ubuntu # pull from Docker Hub
apatch-chroot login ubuntu # interactive shell
apatch-chroot login ubuntu --init # + service manager
apatch-chroot service ubuntu start sshd # manage services from host
apatch-chroot convert ubuntu --move # import from chroot-distro (no copy)
apatch-chroot desktop ubuntu --check # LXQt preflight (v0.5.6+)
apatch-chroot --help # all commands
apatch-linux uml status # show detected UML kernel and disk (RC3)
apatch-linux uml boot --trial # run Ubuntu with throwaway disk writes (RC3)
Chroot requirements
- Rooted Android (APatch, or Magisk/KernelSU with path tweaks)
- Termux (F-Droid build recommended)
- Python 3.10+ in Termux for the broker and core daemon
- arm64 Android (x86_64 guest software is opt-in via Box64)
The Go CLI is bundled in the module; Go is only needed for source builds.
Get it
- Stable chroot: get
apatch-chroot.zipfrom the latest stable release. - UML preview: APatch Linux
v0.6.0-rc.3is a manual prerelease. Follow the standalone Termux instructions to try the new kernel. Flash the preview module only if you want the APatch chroot backend too.
⚠️ The APatch module starts a root daemon for chroot. Read the safety notes before installing. The standalone UML kit doesn’t start that daemon.