Skip to content

Latest commit

 

History

History
63 lines (53 loc) · 4.81 KB

components.md

File metadata and controls

63 lines (53 loc) · 4.81 KB

Component Analysis

1. Containerization (Userspace)

  • Primary Tool: proot-distro
  • Function: Manages installation of rootfs (root file systems) for distros like Ubuntu, Debian, Arch.
  • Why PRoot? Unlike chroot, PRoot does not require root access. It hooks file system calls to simulate / at a specific directory (e.g., .../files/usr/var/lib/proot-distro/installed/ubuntu).

1.2 Chroot Containerization (Rooted Option)

  • Primary Tool: Native chroot command (via Busybox).
  • Architecture:
    • Uses Magisk or KernelSU to grant root privileges.
    • Uses Busybox to create a standard Linux file hierarchy and mount necessary pseudo-filesystems (mount -t proc, mount -t sysfs, mount --bind /dev).
  • Why Chroot?
    • Performance: ZERO overhead. Applications run directly on the kernel without ptrace interception. Essential for compiling large codebases or heavy gaming.
    • Partition Support: Can mount an external SD card partition or a loop device image (.img) as the root filesystem, bypassing Android's internal storage fuse overhead.
  • Trade-off: strictly requires a rooted device.
  • Implementation Note: We will detect root availability. If Rooted -> Offer "Chroot Mode" (Faster). If Not -> Default to "PRoot Mode" (Compatible).

2. Graphics & GUI (The most critical part)

  • Primary Tool: termux-x11
  • Architecture:
    • Android Side: An app (com.termux.x11) that acts as the display output.
    • Linux Side: An X server (Xwayland) that sends pixels to the Android app via shared memory (fast) or socket.
  • Performance: Significantly faster than VNC (Virtual Network Computing) used by older solutions. It supports hardware acceleration forwarding.

3. Hardware Acceleration (GPU)

To run games or heavy DEs smoothly, we must bypass software rendering (llvmpipe).

  • Virgl (Universal): virglrenderer creates a virtual GPU that translates OpenGL commands from the container to the Host Android's OpenGL drivers.
  • Turnip + Zink (Adreno chips only): Implementing the open-source Vulkan driver (Turnip) to run OpenGL over Vulkan (Zink). This provides near-native GPU performance on Snapdragon devices.

4. Emulation (x86 on ARM)

To run PC apps (Steam, Wine, classic games) on ARM phones.

  • Box64 / Box86: Userspace emulators that translate x86_64 instructions to ARM64 on the fly.
  • Wine: Translates Windows API calls to Linux.
  • Chain: Windows App -> Wine -> Box64 -> Linux Kernel (Android).

5. Resource & Driver Repository

5.1 Core Android/Linux Tools

5.2 GPU Drivers & Acceleration

5.3 Emulation (x86 -> ARM64)

5.4 Desktop Environments & References