Skip to content

Instantly share code, notes, and snippets.

@siduck
Last active July 27, 2024 10:40
Show Gist options
  • Save siduck/1ae6ebf14e584d8210e3b63bfff67d19 to your computer and use it in GitHub Desktop.
Save siduck/1ae6ebf14e584d8210e3b63bfff67d19 to your computer and use it in GitHub Desktop.
Chroot any distro which has rootfs file on android + termux ( aarch64 )

In this guide artix linux will be used as an example :

First install termux-x11 apk file.

pkg install termux-x11-nightly
  • Flash busybox magisk module and reboot
  • Flash charch magisk modules and reboot

Install any distro

Find the minirootfs file from your distro, for example armtix

su
mkarch -t <filepath> artix
charch -n artix
pacman -Syu
pacman -S xfce4

Making termux-x11 work in chroot

XDG_RUNTIME_DIR=${TMPDIR} termux-x11 :0 -ac &
su
setenforce 0
busybox mount --bind /data/data/com.termux/files/usr/tmp /data/unencrypted/charch/rootfs/tmp
  • Start chroot
charch -n artix
export DISPLAY=:0
xfce4-session &

Now open the termux-x11 app, it should work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment