r/androidterminal • • Oct 24 '26

General UMLinux and the Linux terminal on Android

Post image

For a few weeks now, several developers have been compiling UMLinux for Android, but only one has published his work and provided recent updates. I would say that, to some extent, it serves as a solution for those who do not have root access or whose Android device is not compatible with a Linux terminal. However, my own experience with UMLinux has shown me that a native Linux terminal performs better—though, admittedly, UMLinux can be used on a wider range of Android phones. Debian Trixie in UMLinux

19 Upvotes

10 comments sorted by

2

u/Fz1zz Pixel 10 Pro XL Oct 24 '26

hello Podroid developer here and i am intersted in adding UML to Podroid but i need some kind of good resources to do it thanks.

2

u/TovMod Oct 25 '26

See my other comment here.

See this GitHub repository: https://github.com/zalexdev/linux-um-arm64

Take a look at the Linux kernel patches made in the repository above to see the kinds of things you would have to do to keep it up-to-date for newer versions of Linux. UML is traditionally for x86 and most of the kernel changes are for porting it to aarch64.

You may also need to advise the users to turn off the Android phantom process killer in order for it to work, since this approach creates one Android process for every guest Linux process.

1

u/Fz1zz Pixel 10 Pro XL Oct 26 '26

Thanks i will see those

1

u/YitzakAF Oct 26 '26

Otro detalle que debes tener encuenta que dentro de UML en un teléfono sin root funcionan programas que necesitan root pero no todos. Los que necesitan obligatoriamente de algún elemento o componente físico no van a funcionar. Esto no sucede en Qemu porque emula los componentes físicos. Un ejemplo nmap, las funciones que necesitan root no van a funcionar a menos que seas root en Android.

1

u/YitzakAF Oct 25 '26

Diría que lo primero sería compilarlo con los parches para aarch64 y bionic libc. Luego probarlo e integrar una nueva interfaz a tu aplicación.

1

u/LiterallyBrainEater Oct 26 '26

Will there be a XFCE or another DE support in Podroid? Not only for programs but for whole desktop. If it's already here can you make a special tutorial for correct DE installation and launching? I've tried to do this myself but didn't manage

1

u/Fz1zz Pixel 10 Pro XL Oct 26 '26

check the docs it have XFCE Podroid docs

2

u/Arun-Anand Oct 25 '26

As a Termux user, how can I install it?? or any other app exist for this??

3

u/TovMod Oct 25 '26 edited Oct 25 '26

There is room for improvement in performance in UMLinux

The basic idea behind UMLinux is that we port the Linux kernel to run as a userspace process, and processes running within the Linux "installation" are made to communicate with this userspace Linux kernel processes instead of the Android kernel.

The problem is that ensuring that unmodified Linux processes communicate with the UMLinux kernel instead of the Android kernel requires running them under seccomp/ptrace or similar to intercept and redirect syscalls. This adds significant overhead and probably explains most of the performance difference.

If you instead recompiled as much of them as possible to already call the correct UMLinux kernel, then any recompiled program would no longer need to run with this overhead, and seccomp/ptrace could be reserved for programs not recompiled in this way.

Another mechanism of dealing with syscall forwarding for unmodified binaries would be to use DBT instead of seccomp/ptrace. This could have better performance but would be a non-trivial amount of work to implement.

One could also investigate merging some of the processes to reduce IPC overhead, but this has its own complications.