ARM64 UML SMP: try it without touching the Ubuntu disk
UML runs Ubuntu with its own kernel and scheduler as a regular Termux process. It doesn’t use the APatch chroot daemon or KVM. RC3 is the APatch release name; the kernel in this kit reports 7.2.0-rc4-gd59c9ce45857.
If those names look like alphabet soup, start with What the flip is UML?.
Get RC3
Download v0.6.0-rc.3. It’s a manual preview; the stable APatch updater stays on its own track.
apatch-linux.zipis the flashable APatch module. The module ID and installedapatch-chrootalias stay the same. It does not contain a UML kernel or any guest data.apatch-linux-uml-smp-arm64.zipis the separate Termux kit. It contains the matched kernel and stub, their config and checksums, and the same RC3 Go CLI. No module flash is required just to use UML.
Keep your existing ~/uml folder. In regular Termux, make the kit ZIP and the release’s SHA256SUMS readable (the example uses Android Downloads). Extract to a new directory in Termux home; Android Downloads is for the ZIP, not for running the binaries. This won’t overwrite an installed ~/uml-smp:
(
set -e
dest="$HOME/uml-smp"
if [ -e "$dest" ] || [ -L "$dest" ]; then
printf 'Keep the existing kit. Pick a new destination and use --kit DIR.\n' >&2
exit 1
fi
dl=/storage/emulated/0/Download
(cd "$dl" && grep -F ' apatch-linux-uml-smp-arm64.zip' SHA256SUMS | sha256sum -c -)
stage=$(mktemp -d "$HOME/.uml-smp-stage.XXXXXXXX")
unzip -q "$dl/apatch-linux-uml-smp-arm64.zip" -d "$stage"
(cd "$stage" && sha256sum -c SHA256SUMS)
chmod u+x "$stage/apatch-linux" "$stage/linux-bionic" "$stage/stub_exe_bionic"
mv -nT -- "$stage" "$dest"
test ! -e "$stage"
)
The kit needs free space for the archive and the unpacked binaries, but it never contains, moves, or copies ~/uml/ubuntu.ext4. If you already have a verified SMP kit, you can use the RC3 module’s launcher with --kit DIR instead of downloading another kernel.
If ~/uml-smp already exists, set dest="$HOME/uml-smp-rc3" in the example and add --kit "$HOME/uml-smp-rc3" to uml status and uml boot below. Run the apatch-linux in that new directory, not an older copy from PATH.
Start with a trial
Close any other UML instance using the disk first. Then run:
~/uml-smp/apatch-linux uml status
~/uml-smp/apatch-linux uml boot --trial --cpus 2
This boots /sbin/init (systemd on Ubuntu). Writes go into a temporary copy-on-write overlay. The launcher cleans it up when the VM returns control; the original disk stays read-only. If a guest change goes to hell, start a new trial and it won’t be there. The overlay grows with writes, so leave free space and use it for short tests. To save changes, boot without --trial; that is a normal read-write boot.
Look for Userspace mode: SECCOMP and smp: Brought up 1 node, 2 CPUs. In the guest, ps -p 1 -o comm= should show systemd, and nproc should show 2. Run sudo poweroff inside Ubuntu (or poweroff as guest root) to stop it. exit logs out of an ordinary Ubuntu login; it does not stop systemd.
--read-only is a different thing: it defaults to a Bash recovery shell as PID 1. If you exit that shell, Linux deliberately reports Attempted to kill init!. That message with PID: 1 Comm: bash and exit code zero is not an idle-thread crash. Use --trial to test normal boot and logout.
Rollback, networking, and limits
- If you want the original kernel back, run
~/uml-smp/apatch-linux uml boot --trial --kit "$HOME/uml". The guest disk doesn’t move. Compare--cpus 1and--cpus 2on the new kit to isolate an SMP issue. - The SMP kernel requires UML’s seccomp userspace mode; it does not change Android’s app security policy. An incompatible host reports an error rather than quietly running a one-CPU guest. Use trusted guest software only in this mode.
- By default there is no network.
--networkneedsumnetandpasstin the selected kit; those helpers are not shipped in this SMP ZIP. Alpine also needs its own local initramfs and is not needed for Ubuntu. - ARM64 instructions run directly on the CPU, but syscalls, page faults, and I/O still cross into UML. SMP can help parallel work; don’t expect full native speed or all Android devices to behave alike.
The kernel CI build booted the paired artifact with one, two, and four CPUs. The RC3 launcher and the same binaries booted disposable Ubuntu 24.04.4 LTS with systemd and two CPUs in an isolated ARM64 test. The guest idled, ran work on both CPUs after waking, and powered off. Its backing image’s checksum didn’t change. This was not a test in the Termux app sandbox. If a panic happens during a normal trial, include its first line, the backtrace, and whether it happened before login or when stopping the guest.