2 ms·
> Of course, Android is Linux. > The Linux Terminal runs on top of a [...] virtual machine. It should, uh, at least be noted that "Android is Linux" doesn't r
by Wowfunhappy 2y ago
> Of course, Android is Linux.
> The Linux Terminal runs on top of a [...] virtual machine.
It should, uh, at least be noted that "Android is Linux" doesn't really matter if you're just going to use a Virtual Machine anyway. Android could be based on BeOS and you could still have a Linux virtual machine. You could have a Windows virtual machine, for that matter. I wonder if Microsoft would be interested...
I would be interested in what it would take to get a non-virtualized Linux terminal on Android. Android is just a Linux distro at the end of the day, right? Could you chroot into a Debian environment?
- johnea 2y agohttps://wiki.debian.org/ChrootOnAndroid https://wiki.debian.org/ChrootOnAndroid Many other distros also support this... https://github.com/selirra/anarch https://github.com/selirra/anarch https://hamelot.io/android/run-gentoo-on-android-via-chroot/ https://hamelot.io/android/run-gentoo-on-android-via-chroot/
- Wowfunhappy 2y agoOh. And there are even apps in the Play Store that do it. What is even the point of Google doing this, with a VM no less?
- yjftsjthsd-h 2y agoThe VM is probably for security. Oddly it might also actually improve performance, but that depends on the details (hardware-supported virtualization is fast, and using ptrace to fake a chroot has a perf hit; I don't know that it's faster, but it wouldn't surprise me).
- yjftsjthsd-h 2y ago> It should, uh, at least be noted that "Android is Linux" doesn't really matter if you're just going to use a Virtual Machine anyway. Android could be based on BeOS and you could still have a Linux virtual machine. For a worked example, this is also how WSL2 works. > You could have a Windows virtual machine, for that matter. I wonder if Microsoft would be interested... It would be interesting to get official buy-in, but https://news.ycombinator.com/item?id=43336934 https://news.ycombinator.com/item?id=43336934 links to GrapheneOS planning to make it work. > I would be interested in what it would take to get a non-virtualized Linux terminal on Android. Android is just a Linux distro at the end of the day, right? Could you chroot into a Debian environment? Yes, you can do a chroot if your Android device is rooted. You can also use Termux, which doesn't need root and essentially is its own Debian-like distro, and which further can has the proot-distro tool to automate installation of assorted Linux distros in what is basically a chroot without needing root (proot is an unprivileged tool that can do all kinds of interesting things, including what amounts to chroot and mount --bind).