Spinning up Linux on Android

The complete guide to running a non-root Linux distribution on Android. Includes F-Droid sideloading, XFCE Desktop setup, and hardware-specific optimizations.

Author: David Catino

Phase 0: Sideloading F-Droid

1

Navigate to f-droid.org on your mobile browser and download the F-Droid APK.

2

Go to Settings > Security and Privacy > Install unknown apps. Enable the toggle for your browser.

3

Go to Settings > Apps > Special app access > Install unknown apps. Select your browser and toggle 'Allow from this source'.

4

Install the F-Droid APK. Open F-Droid, search for 'Termux', and install it.

Phase 1: Terminal Environment

5

Open Termux and run: pkg update && pkg upgrade

6

Grant storage access: termux-setup-storage

7

Install the PRoot manager: pkg install proot-distro

Phase 2: Installing Debian

8

Install the distro: proot-distro install debian

9

Enter the Linux shell: proot-distro login debian

Phase 3: Graphical Interface (GUI)

10

Inside the Debian shell, run: apt update && apt install xfce4 xfce4-goodies tightvncserver

11

Start the server: vncserver :1

Phase 4: Productivity Shortcuts

12

Create an alias to launch Linux instantly. In the Termux (blue) shell, run: nano ~/.bashrc

13

Add this line: alias linux='proot-distro login debian'

Hardware Override: Samsung

14

Go to Developer Options and disable 'Child process restrictions' (Phantom Process Killer).

Hardware Override: Pixel

15

Run via ADB from a PC: adb shell device_config put activity_manager max_phantom_processes 2147483647