Droidspaces: Run Full Linux Containers Natively on Phones
A full Linux container runtime for rooted Android phones and Linux PCs, without a VM or PRoot.
GitHub ravindu644/Droidspaces-OSS Updated 2026-12-05 Branch main Stars 3.1K Forks 359
Kotlin/C Android containers LXC Linux KernelSU Docker systemd

🧭 Decision Guide

Try it if you

  • You have a rooted Android phone and want to boot a complete init system from Ubuntu, Debian, or Fedora.
    The README's Requirements and “A real Linux system” sections require a rooted device and state that distributions boot their own init as PID 1.
  • You want to run Docker, Podman, Flatpak, or bwrap inside an Android container.
    The README's “Containers inside containers” section explicitly lists Docker, Podman, and Allow Sandboxing.
  • You want to use a phone as an OpenWrt gateway or as a Linux desktop with GPU and audio support.
    The README's Networking and “A desktop on your phone” sections list OpenWrt, Anland, VirGL, Turnip, and PulseAudio.
  • Your Linux PC runs with root and you want to check the environment before running a rootfs container.
    The README's Linux Requirements state that Kernel 3.10 or newer and root are required, and provide `sudo droidspaces check`.

Skip it if you

  • You cannot accept a root process in a container reaching the Android host, or you plan to run untrusted code.
    The README's WARNING calls Droidspaces a privileged container runtime and warns against running untrusted code.
  • Your Android device lacks the required kernel configuration and is not listed in community-supported devices.
    The README's Android Requirements state that most stock kernels lack the required options and point to Kernel Configuration and community-supported devices.
  • You need an Android Linux environment without root, or specifically need PRoot or chroot semantics.
    The README explicitly requires a rooted device and describes Droidspaces as not a chroot, not PRoot, and not a virtual machine.

Requirements

  • Android: a rooted device; the README recommends KernelSU and also supports Magisk and APatch.
  • Android: a kernel with the options required by Droidspaces; most stock kernels lack these options.
  • Android and Linux: Kernel 3.10 or newer; current systemd distributions require consulting Kernel Configuration.
  • Linux: root is required; the README provides `sudo droidspaces check` to verify the environment.
  • Android installation: install the APK from the latest release, grant root, install the backend, and reboot when prompted.

First step (verbatim from README)

sudo droidspaces check

Watch out

  • Enabling the real `/dev` exposes GPU, USB, and block devices to the container.
    The README's “Hardware when you want it” section says one toggle provides the real `/dev`; the WARNING says to enable hardware access only when needed.
  • The target kernel version for current systemd distributions must be determined from Kernel Configuration.
    The README's Android Requirements explicitly links the target kernel version for current systemd to Kernel Configuration.
  • Initial Android container setup requires the APK, root authorization, backend installation, and a reboot.
    The README's Get started > Android section lists installing the APK, granting root, installing the backend, and rebooting.
  • Desktop display depends on Anland or Termux:X11, while GPU support depends on VirGL or Turnip.
    The README's “A desktop on your phone” section lists Anland, Termux:X11, VirGL, Qualcomm's Turnip, and PulseAudio.

Not stated in the README

  • The README does not state the minimum Android version or the supported Android version range.
  • The README does not provide the complete list of required kernel options or a device-by-device compatibility matrix.
  • The README does not give minimum memory, storage, or CPU requirements for each Linux distribution.
  • The README does not quantify performance or isolation differences for NAT, macvlan, GPU passthrough, or privileged mode.
  • The README does not specify the complete image registry sources, image update policy, or supply-chain verification method.
  • The README does not explain the exact background mechanism or resource limits for containers that keep running after app uninstallation.

💡 Deep Analysis

6
No I need to run an untrusted Linux rootfs on a rooted Android phone and treat it as a malware-isolation environment close to a VM; does Droidspaces meet that security constraint?
For: A security researcher who needs to test untrusted Linux rootfs or malware on Android and requires VM-like host isolation

No, because Droidspaces is a privileged container runtime rather than a VM with an independent kernel. The README explicitly warns that a hostile root process inside the container can reach the host. The relevant facts are:
- Containers boot their own init on the host Linux kernel, so there is no VM-style independent-kernel boundary.
- The security warning says not to run untrusted code in a container and notes that hardware access and privileged mode relax the remaining barriers.
- Mapping real /dev entries can expose GPU, USB, and block devices; useful for hardware work, but it increases host exposure.
- The README does not claim to provide malware-analysis isolation, mandatory access control, or VM-level escape protection; those properties cannot be inferred from namespaces, cgroups, or rootfs isolation alone.

  • README warning: “Droidspaces is a privileged container runtime”; “a hostile root process inside a container can reach the host”
  • README warning: “Do not run code you do not trust in a container”
  • README, “Hardware when you want it”: “real `/dev`: GPU, USB and block devices”
  • README, “Droidspaces”: “each container boots... on the host's kernel”; “There is no... virtual machine”
Not stated in the README:Whether the samples require an independent kernel, hardware virtualization, or specific syscalls;The concrete escape-surface impact of the Android root manager, kernel patches, and device mappings;Whether additional SELinux, sandboxing, or hardware-isolation mechanisms are available
Yes I need to test Ubuntu, Alpine, NixOS, and OpenWrt on a rooted Android phone and want to download, install, start, and manage distributions without using a terminal; is Droidspaces suitable?
For: A Linux engineer who needs to test Ubuntu, Alpine, NixOS, and OpenWrt on Android and wants graphical rootfs installation and lifecycle management

Yes, because the Android app centralizes rootfs downloading, installation, configuration, and lifecycle management while allowing each distribution to use its own init system. The README supports this decision because:
- It explicitly lists Ubuntu, Debian, Fedora, Arch, Alpine, NixOS, and OpenWrt, with systemd, OpenRC, or other init systems.
- The Android getting-started flow is to install the APK, grant root, open Containers, choose Repository, tap Download and Install, and then tap Start; a terminal is not required initially.
- The app exposes Containers, Panel, and Terminal pages, while the documentation covers NixOS, networking, desktop/audio, and troubleshooting.
- The phone still must be rooted, and stock kernels commonly lack required options; the README also does not state that every distribution version or rootfs has identical hardware, graphics, or service compatibility.

  • README, “Droidspaces”: “Ubuntu, Debian, Fedora, Arch, Alpine, NixOS, OpenWrt and more”; “systemd, OpenRC or any other”
  • README, “Get started / Android”: “Repository”; “Download”; “Install”; “Tap Start”
  • README, “Screenshots”: “Home”; “Containers”; “Panel”
  • README, “Documentation”: “NixOS”; “Networking from zero”; “Display, audio and desktop”; “Troubleshooting”
Not stated in the README:The exact versions, image sources, and storage requirements of the selected rootfs images;How the phone kernel separately supports an OpenWrt gateway, NixOS systemd, and hardware access;The memory, storage, and battery impact of running multiple containers concurrently
Yes I have root access on an x86_64 Linux PC and want to prepare a rootfs from the CLI and run Docker or Podman inside a Droidspaces container; is it more suitable than a VM?
For: An operations engineer on a rooted x86_64 Linux PC who wants CLI-managed rootfs and Docker or Podman inside containers

Yes, provided that you accept a weaker isolation boundary than a virtual machine. Droidspaces does not emulate hardware or run an independent kernel, making it suitable when native CPU execution and nested containers matter. The relevant facts are:
- Linux requires kernel 3.10 or newer and root; the README says a current desktop distribution normally has the other requirements.
- The Linux workflow covers installing the binary, preparing a rootfs, and placing it in an image file; CLI commands, configuration files, and JSON output are available.
- Docker and Podman run inside a container, while Allow Sandboxing additionally supports rootless Docker, Podman, Flatpak, and bwrap.
- The trade-off is explicit: a hostile root process inside the container can reach the host, so this is not a VM-equivalent security boundary.

  • README, “Requirements / Linux”: “Kernel 3.10 or newer and root”; “Run `sudo droidspaces check` to confirm”
  • README, “Linux installation”: “where to get a rootfs and how to put it in an image file”
  • README, “Containers inside containers”: “Docker and Podman run inside a container”; “Allow Sandboxing”
  • README warning: “a hostile root process inside a container can reach the host”
sudo droidspaces check
Not stated in the README:Whether the target Docker or Podman workload depends on kernel features not covered by the README;Whether the selected rootfs, storage driver, and cgroup configuration support nesting;The actual memory, startup, and I/O overhead compared with the chosen VM
Yes I have a rooted Android phone using KernelSU and want to run Ubuntu or Debian with systemd as a home server that starts before phone unlock; is Droidspaces suitable?
For: An advanced user with a rooted Android phone using KernelSU who wants Ubuntu or Debian to run as an always-on home server

Yes, because Droidspaces explicitly boots full Linux distributions with their own init system on rooted Android and supports persistent startup before the phone is unlocked. The practical conditions are:
- The Android requirements recommend KernelSU, but the kernel must contain the required options; most stock kernels do not.
- Ubuntu and Debian can run their own systemd as PID 1, so services and timers operate inside the container.
- NAT provides a container address and Internet access without extra network setup; gateway mode is available when an OpenWrt router container is needed.
- A container can keep running after the app is closed or uninstalled, although the README does not guarantee long-term behavior under every Android power, thermal, and background-management policy.

  • README, “Requirements / Android”: “A rooted device. KernelSU is recommended”; “Most stock kernels lack them”
  • README, “Droidspaces”: “Each container boots its own init system”; “Ubuntu, Debian... boot with their own init as PID 1”
  • README, “Containers that stay up”: “start at boot, before you unlock the phone”; “keeps running whether the app is open, closed or uninstalled”
  • README, “Networking”: “NAT mode gives every container its own address and internet”
Not stated in the README:Whether the phone kernel enables the required namespace, cgroup, overlayfs, and networking options;Whether the Android vendor's power, thermal, and background policies will terminate services;Port exposure, storage endurance, and continuous power consumption for the home-server workload
It depends I maintain the kernel for an Android phone and need systemd containers, NAT/gateway networking, and GPU, USB, and block-device mapping; is the README sufficient to determine compatibility?
For: An Android kernel developer or community-device maintainer who must make a specific phone satisfy systemd, networking, and device-mapping requirements

It depends, because the README provides the kernel-version requirement and configuration-guide entry point, but Android version or root access alone cannot establish compatibility. The documented facts are:
- Android requires kernel 3.10 or newer, while current systemd distributions require checking the documented target kernel version.
- Droidspaces has a dedicated kernel configuration guide, and the README explicitly warns that most stock kernels lack the required options.
- Networking includes NAT, gateway, and macvlan; the hardware toggle can expose real /dev entries for GPU, USB, and block devices, so drivers, device nodes, and permissions also matter.
- The community-supported-device list links to phones known to work and ready-made kernels, but the README does not provide one complete automated compatibility matrix.

  • README, “Requirements / Android”: “Kernel 3.10 or newer”; “Most stock kernels lack them”
  • README, “Documentation”: “Kernel configuration”; “Community-supported devices”
  • README, “Hardware when you want it”: “real /dev: GPU, USB and block devices”
  • README, “Networking”: “NAT mode”, “Gateway mode”, and “macvlan”
Not stated in the README:The phone's complete kernel configuration, Android kernel patches, and device-node permissions;Whether the specific GPU driver works with VirGL or Turnip;Whether gateway and macvlan work with the phone's Wi-Fi or wired-network topology
It depends I want to run KDE Plasma on a rooted Android phone through Anland or Termux:X11, with VirGL or Turnip GPU acceleration and PulseAudio; can Droidspaces cover this graphics stack?
For: An Android graphics developer using Anland or Termux:X11 who plans to run KDE Plasma with VirGL or Turnip and needs PulseAudio

It depends, because the README covers the display, GPU, and audio components, but complete functionality depends on the phone kernel, GPU driver, and compatibility of external apps. The documented scope is:
- Display output can use Anland or Termux:X11; the Anland documentation specifically covers Wayland, KDE Plasma, and other Wayland compositors.
- The GPU paths listed are VirGL and Qualcomm Turnip, with PulseAudio for sound; the README says the display, VirGL, and sound servers start with the container.
- These features use the shared host-kernel model, rather than an independent kernel.
- The README does not guarantee compatibility for a particular Android model, GPU-driver version, or complete KDE Plasma feature set.

  • README, “A desktop on your phone”: “Anland or Termux:X11”; “VirGL or Qualcomm's Turnip”; “PulseAudio”
  • README, “Anland”: “A Wayland desktop on Android through the Anland app, for KDE Plasma”
  • README, “A desktop on your phone”: “The display, VirGL and sound servers start with the container”
  • README, “Droidspaces”: “on the host's kernel”; “There is no emulation and no virtual machine”
Not stated in the README:The specific phone GPU, Android kernel driver, and Turnip/VirGL support status;Compatibility between the Anland or Termux:X11 version and the target KDE Plasma components;Desktop resolution, input devices, audio latency, and long-running background behavior

✨ Highlights

  • Ubuntu and Debian boot with their own init as PID 1
  • NAT, Gateway, and macvlan networking work out of the box
  • Docker and Podman run nested with Allow Sandboxing support
  • An approximately 450 KB static binary supports five Linux architectures

🔧 Engineering

  • The Android app drives containers running Ubuntu, NixOS, and OpenWrt
  • Anland, VirGL, and PulseAudio provide desktop, GPU, and audio support
  • Containers can start at Android boot and keep running after app uninstallation

⚠️ Risks

  • The README warns that a root process can reach the Android host
  • Most stock kernels lack the options required by Droidspaces
  • Android requires root, while KernelSU is recommended rather than mandatory
  • Hardware access and privileged mode further relax isolation boundaries

👥 For who?

  • Developers who need systemd on a rooted Android phone
  • Users who want Docker, Podman, or OpenWrt on a phone
  • Users needing Linux containers on x86_64, aarch64, or riscv64