Live data from Hacker News

Run Linux containers on Android, no root required

github.com

71–80 of 96 posts

Re: Run Linux containers on Android, no root required

#72
post #48
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…

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.

Re: Run Linux containers on Android, no root required

#73
post #52

Added to my list of things that will never be possible on iOS.

Not to defend it, but emulating Linux in WASM is possible and ought to work on iOS in a reasonably performance way. See https://webvm.io/

It will never be native though, which is the main point.

Re: Run Linux containers on Android, no root required

#74
post #22

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

X86 builds of Android are stuck at many generations back of the OS. Running Android in a VM on X86 is basically dead AFAIK. :(

I'm actually optimistic that this will improve. Google has apparently been working on replacing Chrome OS with android, which I have pretty strong opinions on but the upside is that if they want to go that route they're going to have to make Android officially work well on x86, at which point there's no reason that eg. LineageOS wouldn't be expected to follow suit.

Re: Run Linux containers on Android, no root required

#75
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)

Re: Run Linux containers on Android, no root required

#76
post #28
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…

My understanding is that the integrated linux terminal is not supported on all processors like snapdragon ones and also is not available on all manufactures like Samsung. Therefore this approach covers a much bigger audience.

It also behaves weirdly if you use a VPN.

Re: Run Linux containers on Android, no root required

#77
post #30

Termux and a BT keyboard it's enough. Also, native Emacs under FDroid has recently been improved a lot. With just Emacs you get: - An IRC, Usenet and Mail client. The ONLY libre Usenet client. comp.arch and comp.misc have really engaging discussions. You can score up nice commenters and blacklist every spammer - Gemini and Gopher via ELPA (run Esc-x package-install RET elpher) - A math mini CAS with Esc-x calc RET -…

I tried Emacs, but realised I need NixOS to get the packages I depend on like git to download my config. I can't use stock emacs. There's a trick to get Emacs and termux to share packages, but not for nix-on-droid :/

You can do some signing hackery and allow Emacs to see executables from termux https://gsilvers.github.io/me/posts/20250921-emacs-on-androi...

For anyone who ends up here and curious.

Re: Run Linux containers on Android, no root required

#79
post #71
post #35

I don't see the purpose to run containers on Android, the managed userspace provides everything I need, including code on the go apps, already sandboxed. Also not a termux fan.

What code on the go apps do you have in mind ?

Pascal N IDE, C# Shell NET IDE, Pydroid 3, Shader Editor, the paid versions.
Post reply on HN