Linux on a Droid

Installing a regular Linux distribution on an Android device opens a whole new world of possibilities. You can turn your Android device into a full-blown Linux/Apache/MySQL/PHP server and run web-based applications on it, install and use your favorite Linux tools, and even run a graphical desktop environment. - Linux Mag

They all provide a container,what chroot mainly do is to pretend you root dir is under the rootfs’s dir,It provides file-level isolation, however the process,etc,share the resource of your system which running currently.

  • Userland is build on termux, Linux deploy is a app using it’s own code

On non rooted phone

Termux

Do not use Termux app from Google Play. It is deprecated - github

Opensource and maintained as of 2024

$ termux-setup-storage
$ pkg install wget
$ wget -O install-nethunter-termux https://offs.ec/2MceZWr
$ chmod +x install-nethunter-termux
$ ./install-nethunter-termux
  • DISABLE PHANTOM PROCESS KILLER In Android 12 & 13 - It’s a background process limiter that kills the app processes using excessive CPU or system resources. Google has submitted a patch that adds a toggle in developer options to disable the monitoring of phantom processes in android 13. It seems like many smartphone vendors aren’t updated the developer’s options by including this option.
$ adb shell "/system/bin/device_config set_sync_disabled_for_tests persistent"
$ adb shell "/system/bin/device_config put activity_manager max_phantom_processes 2147483647"
$ adb shell settings put global settings_enable_monitor_phantom_procs false

## verify that they are taken into account
$ adb shell "/system/bin/dumpsys activity settings | grep max_phantom_processes"
$ adb shell "/system/bin/device_config get activity_manager max_phantom_processes"

Linux Deploy

Linux Deploy installs and runs GNU/Linux, and seems to be the best option if you have root access.

UserLAnd

UserLAnd seems to be a fork of an older version of Termux

Userland is an app to help you set up a container and run applications in it quickly using proot,likes desktop environment Same with what Linux deploy (same with userland but using chroot not proot) did,but proot doesn’t need your phone to be rooted because it doesn’t need root authority.

Closed source / payed option.

On rooted phone

Lindroid

Written on October 30, 2021, Last update on August 1, 2024
android linux-system