Skip to main content

What is proot?

Hand-drawn diagram of Ubuntu running inside a dashed proot boundary within Android, with a padlock noting the warranty stays intact
A protected workspace inside Android โ€” no root

proot is a program that lets you run a complete Linux distribution on your Android phone without needing root (administrator) access. It works by intercepting system calls and translating them so that programs believe they are running on a real Linux computer.

In the ADL stack, proot is the layer that makes it possible to run Ubuntu and a full desktop environment inside Termux.

Understanding Containers Firstโ€‹

Before explaining proot, let us talk about containers, because proot creates something similar.

Think of an apartment building:

  • The building is your Android phone
  • The building's foundation and structure is the Linux kernel
  • Each apartment is a separate environment with its own furniture, decoration, and layout
  • Residents (programs) in each apartment think they have a complete home

A container works the same way. It creates an isolated environment where programs run with their own files, settings, and tools โ€” but they all share the same underlying system (the kernel).

What proot Actually Doesโ€‹

proot performs a clever trick called filesystem translation. Here is what happens:

  1. A Linux program asks: "Where is /usr/bin/python?"
  2. proot intercepts this request
  3. proot translates it to the real location: /data/data/com.termux/files/home/ubuntu-fs/usr/bin/python
  4. The program gets the file it asked for and never knows the difference

This means programs think they are running on a normal Linux system with the standard directory structure (/usr, /etc, /home, etc.), when in reality all their files are tucked away inside Termux's storage.

Key Translations proot Performsโ€‹

What the program seesWhat actually exists
/ (root filesystem)~/ubuntu-fs/ inside Termux
/home/user~/ubuntu-fs/home/user
/usr/bin/...~/ubuntu-fs/usr/bin/...
/etc/...~/ubuntu-fs/etc/...
User ID 0 (root)Termux's regular user ID

Why No Root is Neededโ€‹

On a traditional Linux system, installing and running a complete distribution requires root access (administrator privileges). Root lets you:

  • Mount filesystems
  • Change system files
  • Create users
  • Access hardware directly

Android phones do not give you root access by default (for good security reasons). proot solves this by faking root. When a program checks "am I root?", proot says "yes" โ€” even though you are actually running as a regular user. This is safe because:

  • proot cannot actually modify Android's system files
  • All changes happen inside proot's contained environment
  • Android's security sandbox remains intact
  • Your phone's system is never touched
โ„น๏ธNote

proot's "fake root" is not a security risk. It only affects programs running inside the proot environment. It cannot grant real root access to Android or bypass any security protections. Think of it as playing pretend โ€” the programs believe they are root, but they have no actual elevated privileges.

proot-distro: The Easy Wayโ€‹

While you could set up proot manually, the proot-distro tool makes it simple. proot-distro is a Termux package that automates downloading, installing, and managing Linux distributions.

What proot-distro Handles For Youโ€‹

TaskWithout proot-distroWith proot-distro
Download a distributionFind the right rootfs manuallyproot-distro install ubuntu
Set up the filesystemExtract and configure by handAutomatic
Configure networkingManual DNS and host setupAutomatic
Launch the environmentLong proot command with many flagsproot-distro login ubuntu
Manage multiple distrosComplex manual organizationBuilt-in support
Back up an environmentManual tar commandsproot-distro backup ubuntu
Remove a distributionManual cleanupproot-distro remove ubuntu

Common proot-distro Commandsโ€‹

CommandWhat it does
proot-distro listShows available distributions
proot-distro install ubuntuInstalls Ubuntu
proot-distro login ubuntuEnters the Ubuntu environment
proot-distro login ubuntu -- <cmd>Runs a single command in Ubuntu
proot-distro backup ubuntuCreates a backup archive
proot-distro restore ubuntuRestores from a backup
proot-distro remove ubuntuRemoves the distribution
proot-distro reset ubuntuResets to a fresh install
โญBest Practice

Back up your proot-distro environment regularly using proot-distro backup ubuntu. This creates a compressed archive of your entire Ubuntu installation that you can restore if anything goes wrong. Store backups on your phone's shared storage or an SD card.

Performanceโ€‹

proot does add some overhead because it intercepts and translates system calls. Here is what to expect:

What Runs Wellโ€‹

  • Web browsing
  • Text editing and office applications
  • Programming (writing and editing code)
  • File management
  • Media playback (using hardware-accelerated Android decoders)
  • Terminal-based applications

What Runs Slowerโ€‹

  • I/O-heavy operations โ€” file copying, package installation, and database operations are slower because every file access goes through proot's translation layer
  • Compilation โ€” building large software projects takes longer due to the overhead on thousands of small file operations
  • Disk-intensive applications โ€” anything that reads or writes many files frequently

Typical Performance Impactโ€‹

OperationNative SpeedWith prootSlowdown
CPU computation100%~95-100%Minimal
Memory access100%~100%None
File read/write100%~50-70%Noticeable
Package installation100%~40-60%Significant
Application launch100%~60-80%Moderate
โœ…๐Ÿ’ก Tip

CPU-intensive tasks (calculations, rendering, encoding) run at near-native speed because proot only intercepts system calls, not actual computation. If your workload is primarily CPU-bound, you will not notice much difference.

The Full ADL Stackโ€‹

Here is how proot fits into the complete ADL architecture:

Alternatives to prootโ€‹

proot is not the only way to run Linux on Android. Here are the alternatives and why ADL chose proot:

chrootโ€‹

chroot (change root) does a similar job to proot but works at the kernel level. It is faster because there is no system call interception.

  • Advantage: Better performance, especially for I/O
  • Disadvantage: Requires root access, which means unlocking your bootloader and potentially voiding your warranty
  • Best for: Users who have already rooted their phone

Full Virtual Machineโ€‹

A virtual machine (VM) emulates an entire computer, including a virtual CPU.

  • Advantage: Complete isolation, can run any operating system
  • Disadvantage: Very slow on mobile devices, high memory usage, poor battery life
  • Best for: Users who need to run x86 Linux on an ARM phone (rare)

Dual Bootโ€‹

Some Android phones can be configured to dual-boot Android and Linux.

  • Advantage: Native performance, full hardware access
  • Disadvantage: Risky (can brick your device), requires unlocked bootloader, limited device support
  • Best for: Advanced users with supported devices and a tolerance for risk

Direct Install (replacing Android)โ€‹

Some projects let you replace Android entirely with Linux.

  • Advantage: Full native Linux experience
  • Disadvantage: Lose Android entirely, very limited device support, most phone features stop working
  • Best for: Dedicated Linux phone enthusiasts
๐Ÿค”Which method should I use to run Linux on Android?
๐ŸšซCommon Mistake

Do not confuse proot with rooting your phone. proot is a user-space tool that fakes root access inside a container. Rooting means actually gaining superuser access to your phone's entire system. proot is safe and reversible; rooting can void your warranty and create security risks.

Frequently Asked Questionsโ€‹

โ“Frequently Asked Questions
Does proot modify my phone's system?
No. proot operates entirely within Termux's storage area. It never touches Android's system files, your bootloader, or any protected areas of your phone. Everything proot creates lives inside the Termux app's data directory.
Can I run multiple distributions with proot?
Yes. proot-distro supports installing multiple distributions side by side. You could have Ubuntu, Debian, and Fedora all installed at once and switch between them. Each distribution has its own isolated filesystem.
Is proot the same as Docker?
They solve similar problems (running isolated environments) but work very differently. Docker uses Linux kernel features (namespaces, cgroups) that require root. proot works in user space by intercepting system calls. Docker is more efficient but cannot run without root. proot is slower but works anywhere.
Why is package installation slow in proot?
Installing packages involves thousands of small file operations (extracting archives, copying files, updating databases). Each file operation goes through proot's system call translation, adding overhead. The actual programs run at near-native speed once installed โ€” the slowdown is primarily during installation.
Can I access my Android files from inside proot?
Yes, with some setup. Termux can access Android's shared storage (after running termux-setup-storage), and this storage can be mounted inside the proot environment. The ADL guides walk you through configuring this.

Summaryโ€‹

proot is the technology that lets you run a complete Linux distribution on your Android phone without root access. It works by intercepting system calls and translating file paths, creating an isolated environment where programs believe they are running on a normal Linux system. Combined with proot-distro for easy management, it provides a practical and safe way to run Ubuntu and a full desktop on your phone.

Next: Learn about Ubuntu, the Linux distribution that ADL uses.