Many users have asked me: What are the pros and cons of using An
Many users have asked me: What are the pros and cons of using Android's upcoming Terminal app to run Linux apps versus something like Termux?
Here are the differences, as explained by a developer of Termux:
"Advantages:
1. The VM will have standard Linux Distributions, so all the packages of the distro should be downloaded from its packages repositories. Termux only provides ~2000 most popular packages in its repositories, other distros can have 10,000-1,00,000 packages. If running under proot-distro in Termux, then one can have similar amount of packages, but everything runs under proot, which is slow, and not all packages may work and proot is not stable on old devices.
Disadvantages:
1. The VM will have performance loss due to KVM usage compared to Termux running natively.
2. The VM will be isolated from the Android system, this is where most of the problems lie. I doubt external storage (/sdcard) will be allowed to be accessible directly from inside the VM, so use cases of users processing files on their storage, like downloading music/video/image files, etc with Termux and accessing them in other apps, would not be possible. The Android APIs won't be accessible inside the VM either, like ones which apps like Termux:API or Tasker uses, lot of users rely on them to automate things, a way to fix that would be to run a sshd server in Termux and then connect to it from the terminal in the Linux app with ssh and then run the commands, but that will cause some latency issues. Termux also supports on-boot tasks for its own commands, there may be some way to boot the VM at startup, depending on if there is external access, otherwise users would have to manually start the app.
3. The VM will be isolated, so any root access will be only for inside the VM itself, and not for root access to Android system, like Termux can get with su/sudo if rooted with Magisk, etc.
4. Terminal will be inside a WebView connected over the server, so should have slower performance than a native Terminal in Termux using native Android views. WebViews are generally slow for large amounts of text, especially for scrolling, like try opening the Android docs/source site on even a recent phone with ~8GB RAM, older phones often just crash the browser. One could run a sshd server in the VM and then connect to it from Termux with ssh and that should likely be faster, and should support multiple terminals at the same time. I don't think currently the VM app supports multiple terminals, that's another difference, although terminal multiplexers like tmux could probably be used inside the one terminal that's available.
5. Not all devices will support AVF, at least not for Android < 16 or higher, so Termux will still be needed on such devices. Additionally, running a whole Linux distro in a VM will require CPU, storage and memory in addition the one already being used by Android OS itself, so low end devices will likely have issues with performance or multi-tasking. Termux runs on Android host itself, and uses only < 100MB RAM, and 150MB (arch-specific)/230MB (universal) storage space by default, so runs great on even Android 5."
Thanks to agnosticapollo for taking the time to write this out!-电报频道- #娟姐新闻:@juanjienews