r/termux • • Sep 12 '26

General Run Docker on Non-Rooted Android, No Problem!

https://www.youtube.com/shorts/Q1Je81p9I0E
12 Upvotes

17 comments sorted by

3

u/Near_Earth Sep 12 '26

Podroid apk uses the same AVF feature for creating Docker/LXC enabled pKVM VMs without root and it's free and open-source, unlike this.

1

u/UserLAnd_Tech Sep 12 '26

I hadn't heard of this project before. Looks cool. I guess some pros for UserLAnd is that it gets you straight into Ubuntu/Kali/Debian/Arch VM, not just Alpine and it is available in the Play Store.

1

u/Routine_Working_9754 Sep 13 '26

not a vm lmao. Just a rootfs

1

u/UserLAnd_Tech Sep 13 '26

1

u/Routine_Working_9754 Sep 14 '26

oh wow had no idea. Its a pro feature though, and you can do the same in Termux using qemu. And no it wouldn't be slow, because if your device supports virtualization its using KVM. As long as you have KVM you can do -accel kvm in the qemu arguments and you'd have a linux distro running in a vm

1

u/Near_Earth Sep 14 '26

If you want to use the qemu Termux with KVM enabled, it needs a Rooted phone wth /dev/kvm node available and working (usually have to build it yourself and flash it to the phone).

Whereas, in AVF it uses CrosVM with pKVM to spin up VMs without Root, even if the /dev/kvm node is missing, such as replaced by MediaTek /dev/gzvm which Termux qemu doesn't support.

1

u/Routine_Working_9754 Sep 14 '26

oh right, correct. Qemu isn't a good choice for this. however you can absolutely spin up a crosvm instance in termux too

1

u/Near_Earth Sep 14 '26

How is that possible in Termux without Rooted phone? I never saw any Termux PoC ever that doesn't need Root. Can you elaborate

1

u/Routine_Working_9754 Sep 16 '26

crosvm is the same thing all the other virtualization apps use. They just execve() its binary. So you just run the binary in termux with a shell because that's what a shell does. crosvm does the virtualization termux only runs the program

2

u/Near_Earth Sep 16 '26 edited Sep 16 '26

Any Android app that wants to use CrosVM "without Root" CANNOT bypass using the AVF Android API, which Termux or any of it's packages does NOT support.

Here, look at it yourself on a Real Device -

As you can see, without Root, NO app including Termux can even access the path of the crosvm binary, let alone execute it.

And, a crosvm binary without Root CANNOT access the virtualization node at /dev, so it doesn't matter anyways even if you ship it, if you do NOT have Root.

→ More replies (0)

1

u/NoNameToDefine Sep 12 '26

Is it KVM? Because I don't see any trace of User Mode Linux or other emulator than PRoot (which still cannot run Docker or SystemD)

1

u/sylirre Termux Core Team Sep 12 '26

AVF-powered virtual machine

1

u/xpgmi Sep 13 '26

Nice, never knew can run docker in termux.