Skip to content

Architecture

thecbr600 edited this page Nov 14, 2026 · 1 revision

Architecture & Stack

Core Stack Overview

  • Host OS: Android (Samsung One UI / Samsung DeX)
  • Container Layer: PRoot via proot-distro (100% user-space, no root, Knox 0x0 preserved)
  • Linux Distribution: Debian 13 (Trixie) arm64
  • Display Server: Termux:X11 (direct UNIX socket) + XFCE4
  • Audio Bridge: PulseAudio (module-native-protocol-tcp)

Why This Stack Outperforms Traditional Setups

  • Modern Debian 13 (Trixie): Ships current compilers, libraries, and security patches instead of legacy Debian 11/12 images.
  • Zero VNC Overhead: Termux:X11 renders directly to Android's native Surface/EGL layers via UNIX sockets, eliminating network serialization lag and compression artifacts.
  • Hardware-Agnostic GPU Acceleration: Uses an Android EGL/VirGL (virpipe) bridge that works across both Qualcomm Adreno and ARM Mali/Immortalis GPUs.

Implementation Details

1. Audio Routing via TCP Loopback

Before starting the Debian PRoot container, Termux spawns a local PulseAudio daemon restricted strictly to localhost:

pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1

Inside Debian, PULSE_SERVER=127.0.0.1 is exported so browsers, media players, and desktop apps output audio seamlessly to Android speakers or Bluetooth devices.


2. LMK-Safe Chromium Wrapper (/usr/local/bin/chromium)

Running unconfigured Chromium inside PRoot causes /dev/shm sandbox crashes and aggressive RAM growth that triggers Android's Low Memory Killer (LMK). Our custom wrapper intercepts the XFCE menu launcher and applies strict memory and display flags silently:

#!/bin/bash
exec /usr/lib/chromium/chromium \
  --no-sandbox \
  --test-type \
  --disable-dev-shm-usage \
  --ozone-platform=x11 \
  --disable-gpu \
  --disable-software-rasterizer \
  --no-default-browser-check \
  --disable-background-networking \
  --disable-component-update \
  --disable-pings \
  --media-router=0 \
  --renderer-process-limit=2 \
  --js-flags="--max-old-space-size=512" \
  --disk-cache-size=1048576 \
  --media-cache-size=1048576 \
  "$@"

Note: --test-type suppresses the --no-sandbox warning banner while keeping sandboxing disabled for PRoot compatibility.