|
| 1 | +<!-- |
| 2 | +title: Anland (Wayland) Usage Guide |
| 3 | +section: Guides |
| 4 | +order: 3 |
| 5 | +desc: Configure Anland Wayland display for Droidspaces Android containers, including backend installation, APK setup, and container options. |
| 6 | +keywords: anland, wayland, droidspaces, android, kwin, weston, kde, plasma, gpu, adreno, snapdragon |
| 7 | +--> |
| 8 | + |
| 9 | +# Anland (Wayland) Usage Guide |
| 10 | + |
| 11 | +Anland is an optional Wayland display path for Droidspaces. It uses a buffer-sharing protocol where a Linux compositor, such as KWin or Weston, renders desktop content into GPU buffers, and the Anland display surface on Android presents those buffers. A lightweight daemon bridges the Linux container and Android app over a Unix domain socket. |
| 12 | + |
| 13 | +Unlike the Termux:X11 path, Anland is designed for Wayland compositor workflows. It is useful when you want to run desktop environments such as KDE Plasma Wayland inside a Droidspaces container. |
| 14 | + |
| 15 | +### Quick Navigation |
| 16 | + |
| 17 | +- [Prerequisites](#requirements) |
| 18 | +- [Step 1: Install an Anland-supported Backend](#backend) |
| 19 | + - [Method 1: Build and Install Inside the Container](#manual-build) |
| 20 | + - [Method 2: Use the Droidspaces Rootfs Builder](#rootfs-builder) |
| 21 | +- [Step 2: Install the Anland App](#app) |
| 22 | +- [Step 3: Configure the Droidspaces Container](#container-config) |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +<a id="requirements"></a> |
| 27 | + |
| 28 | +## Prerequisites |
| 29 | + |
| 30 | +Before configuring Anland, make sure the following requirements are met: |
| 31 | + |
| 32 | +1. **An Android device that supports Droidspaces**: Anland works together with Droidspaces and requires `Anland Display` to be enabled in the container configuration. |
| 33 | +2. **An Anland-supported display backend**: The compositor backend must be patched for Anland. `KWin` is the main supported backend. See the [Anland producers directory](https://github.com/superturtlee/anland/tree/main/producers) for available backends. |
| 34 | +3. **A Qualcomm Snapdragon / Adreno device is recommended**: Anland depends heavily on device-side GPU and buffer-sharing behavior, and Qualcomm platforms usually provide better compatibility. |
| 35 | + |
| 36 | +> [!NOTE] |
| 37 | +> |
| 38 | +> Anland only handles the display path. Container management, rootfs handling, permissions, GPU access, and startup flow are still managed by Droidspaces. |
| 39 | +
|
| 40 | +--- |
| 41 | + |
| 42 | +<a id="backend"></a> |
| 43 | + |
| 44 | +## Step 1: Install an Anland-supported Backend |
| 45 | + |
| 46 | +The desktop environment inside the container must use an Anland-supported backend. Otherwise, the Android side cannot receive the Wayland output. |
| 47 | + |
| 48 | +<a id="manual-build"></a> |
| 49 | + |
| 50 | +### Method 1: Build and Install Inside the Container |
| 51 | + |
| 52 | +Use this method if you want to choose a specific desktop environment, target distribution, or debug the backend manually. |
| 53 | + |
| 54 | +1. **Enter the Droidspaces container.** |
| 55 | + |
| 56 | +2. **Clone the Anland source code.** |
| 57 | + |
| 58 | + ```bash |
| 59 | + git clone https://github.com/superturtlee/anland.git |
| 60 | + ``` |
| 61 | + |
| 62 | +3. **Choose the matching desktop environment and distribution under the `producers` directory.** |
| 63 | + |
| 64 | + For example, the KDE backend layout looks like this: |
| 65 | + |
| 66 | + ```txt |
| 67 | + producers |
| 68 | + └── kde |
| 69 | + ├── anland_backend_debian13_v5 |
| 70 | + ├── anland_backend_v5 |
| 71 | + ├── Debian13_v5 |
| 72 | + ├── Fedora43_v5 |
| 73 | + └── ubuntu2604_v5 |
| 74 | + └── other desktops |
| 75 | + ``` |
| 76 | + |
| 77 | +4. **Run the matching `build.sh` script as root.** |
| 78 | + |
| 79 | + The build script installs the required dependencies and installs the matching Anland backend into the container. |
| 80 | + |
| 81 | +5. **Start the desktop with the project's `startup.sh` script.** |
| 82 | + |
| 83 | +<a id="rootfs-builder"></a> |
| 84 | + |
| 85 | +### Method 2: Use the Droidspaces Rootfs Builder |
| 86 | + |
| 87 | +If you mainly use KDE Plasma, the automated rootfs builder is recommended. It is simpler and better suited for repeatable deployments. |
| 88 | + |
| 89 | +Project: [Droidspaces-rootfs-KDE-builder](https://github.com/Goldzxcbug/Droidspaces-rootfs-KDE-builder) |
| 90 | + |
| 91 | +> [!IMPORTANT] |
| 92 | +> |
| 93 | +> This method currently supports KDE Plasma only. |
| 94 | +
|
| 95 | +1. **Fork the project.** |
| 96 | +2. Open the GitHub **Actions** page and find the `编译并发布Droidspaces Rootfs` workflow. |
| 97 | +3. Run the workflow manually and enable the `Wayland 支持` option. |
| 98 | +4. Wait for the build to finish. This usually takes about 15 minutes. |
| 99 | +5. Open the project's **Releases** page, download the generated rootfs package, and import it into Droidspaces. |
| 100 | +6. If KDE desktop auto-start is not enabled, enter the container as a normal user and run: |
| 101 | + |
| 102 | + ```bash |
| 103 | + startplasma-wayland |
| 104 | + ``` |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +<a id="app"></a> |
| 109 | + |
| 110 | +## Step 2: Install the Anland App |
| 111 | + |
| 112 | +1. Download the **Anland APK** from the [latest Anland release](https://github.com/superturtlee/anland/releases/latest). |
| 113 | +2. Install the APK on your Android device. |
| 114 | +3. Grant **root permission** to Anland on first launch. |
| 115 | + |
| 116 | +--- |
| 117 | + |
| 118 | +<a id="container-config"></a> |
| 119 | + |
| 120 | +## Step 3: Configure the Droidspaces Container |
| 121 | + |
| 122 | +Edit the target container configuration in Droidspaces and set the following options. |
| 123 | + |
| 124 | +### Required Settings |
| 125 | + |
| 126 | +1. Enable **GPU Access**. |
| 127 | +2. Enable **Anland Display**. |
| 128 | +3. Disable **Configure Termux:X11**. |
| 129 | + |
| 130 | +> [!IMPORTANT] |
| 131 | +> |
| 132 | +> Anland and Termux:X11 are separate display paths. When using Anland, disable the Termux:X11 configuration to avoid conflicting environment variables and display services. |
| 133 | +
|
| 134 | +### Recommended Settings |
| 135 | + |
| 136 | +1. **Disable Configure PulseAudio**. |
| 137 | + |
| 138 | + Anland provides its own audio handling path, so the Droidspaces PulseAudio configuration is usually unnecessary. After disabling it, also clear any existing `PULSE_SERVER` environment variable inside the container so applications do not continue connecting to an old PulseAudio service. |
| 139 | + |
| 140 | +2. **Keep SELinux Permissive Mode disabled by default**. |
| 141 | + |
| 142 | + Try running Anland under SELinux enforcing mode first. If Anland fails to start or display correctly on a specific device, enable **SELinux Permissive Mode** temporarily as a compatibility troubleshooting step. |
| 143 | + |
| 144 | +### KDE Plasma Notes |
| 145 | + |
| 146 | +> [!IMPORTANT] |
| 147 | +> |
| 148 | +> When running KDE Plasma Wayland in a Debian or Ubuntu container, make sure the kernel has User Namespace (User-NS) support enabled, and enable `noseccomp` in Droidspaces privileged mode. Otherwise, KDE Plasma may become noticeably slow or unresponsive. |
0 commit comments