Live data from Hacker News

Run Linux containers on Android, no root required

github.com

81–90 of 96 posts

Re: Run Linux containers on Android, no root required

#81
post #22

what about the other way around? i'm aware about waydroid but it has too many problems with nvidia. also require wayland.

You could run a windows VM and run windows subsystem for android.

Windows subsystem for Android is deprecated. There's a community maintained alternative but it seems to have a few problems wrt. Windows updates.

Re: Run Linux containers on Android, no root required

#82

Earlier quoted context omitted.

The latest Waydroid beta is over three years old. Waydroid is dead and I haven't found an alternative.

The latest stable release of Waydroid is from little over a month ago. The Android image it uses by default is based on Android 13, which is fresh enough to do its job.

One could also try Android 15 and 16 on Waydroid: https://github.com/WayDroid-ATV/waydroid-builds/releases

Re: Run Linux containers on Android, no root required

#84
post #45
post #17

I don't understand what this would be useful for. The Linux terminal app on Android (check Developer settings if you want it) already exists and it uses hardware accelerated virtualization, while this uses QEMU with TCG. The Linux terminal app also supports running a DE (No VNC - as in no VNC, not NoVNC - required!), has full shell, full root, all the features of Podroid, and hell, you could even swap out the termina…

Wow, didn't know this existed, thanks. But 761 Mo download?? That's insanely big for a terminal, what could possibly make this bundle so big?

It is a complete OS in a virtual machine.

Re: Run Linux containers on Android, no root required

#85
post #17

I don't understand what this would be useful for. The Linux terminal app on Android (check Developer settings if you want it) already exists and it uses hardware accelerated virtualization, while this uses QEMU with TCG. The Linux terminal app also supports running a DE (No VNC - as in no VNC, not NoVNC - required!), has full shell, full root, all the features of Podroid, and hell, you could even swap out the termina…

The Linux Terminal app is incredibly buggy in my experience, but that may be because I use GrapheneOS.

Re: Run Linux containers on Android, no root required

#86
post #17

I don't understand what this would be useful for. The Linux terminal app on Android (check Developer settings if you want it) already exists and it uses hardware accelerated virtualization, while this uses QEMU with TCG. The Linux terminal app also supports running a DE (No VNC - as in no VNC, not NoVNC - required!), has full shell, full root, all the features of Podroid, and hell, you could even swap out the termina…

Not everyone owns one of the limited range of devices that Linux Terminal is available for. For example, no Snapdragon chips currently in use support the "non-protected" virtual machines required by the Android Virtualization Framework. Also, it doesn't jive with Samsung Knox, so the few Samsung devices that this might work on (mostly international models with Exynos chips) will likely not be supported.

Re: Run Linux containers on Android, no root required

#87
post #22

what about the other way around? i'm aware about waydroid but it has too many problems with nvidia. also require wayland.

I can't help you with nvidia, but the Wayland thing can be worked around quite easily by running it under a nested compositor like cage. (This is how I run waydroid under Xorg)

thanks. good to hear that. i just have to wait for nvidia support now.

Re: Run Linux containers on Android, no root required

#88
post #17

I don't understand what this would be useful for. The Linux terminal app on Android (check Developer settings if you want it) already exists and it uses hardware accelerated virtualization, while this uses QEMU with TCG. The Linux terminal app also supports running a DE (No VNC - as in no VNC, not NoVNC - required!), has full shell, full root, all the features of Podroid, and hell, you could even swap out the termina…

Isn't this super limited? It seems to only support the latest version of android which only recently released phones have.

Re: Run Linux containers on Android, no root required

#89
post #87

Earlier quoted context omitted.

I can't help you with nvidia, but the Wayland thing can be worked around quite easily by running it under a nested compositor like cage. (This is how I run waydroid under Xorg)

thanks. good to hear that. i just have to wait for nvidia support now.

Have you tried https://wiki.archlinux.org/title/Waydroid#Software_rendering ? Obviously not ideal, but possibly functional.

Re: Run Linux containers on Android, no root required

#90
post #48

Earlier quoted context omitted.

This. Also, for phones that don't support Android virtualization, there's a user-space hack, part of Termux upstream, that allows for root-less chroots via LD_PRELOAD: https://wiki.termux.com/wiki/PRoot . systemd won't boot with this (needs to be PID 1), but a lot of software will work just fine and there's nearly zero emulation overhead.

I don't think it uses LD_PRELOAD, it uses ptrace to intercept system calls (hence the name). Unfortunately this does have performance overhead, although I've never bothered to measure it. Actually that would be an interesting thing to benchmark.

My bad, I must have confused it with something else. Yes, it uses ptrace; there definitely is some overhead around system calls, but that still should be better than running atop a full-scale CPU emulator. That being said, I haven't benchmarked it myself, just remember it being pretty snappy.

Thanks for your correction!

Post reply on HN