Library / SDK
localdesktop/localdesktop.github.io avatar
localdesktop/localdesktop.github.io

Local Desktop on Android: Architecture, APK Builds, and Constraints

Local Desktop helps you run a desktop Linux environment on your Android device.

1,708 stars87 forksRustGPL-3.0

At a glance

What is it?
Local Desktop places an Arch Linux ARM64 desktop on Android by combining Proot, a built-in Wayland compositor, and Xfce. It suits tablet-class hardware and developers who need either on-device or cross-platform APK builds, but it is not intended to turn a phone into a touch-first desktop.
Who is it for?
Adopt Local Desktop when you have an ARM64 Android tablet or DeX-style display, a physical keyboard, and a reason to run Xfce through its Proot and Wayland bridge. Do not choose it for a conventional phone screen or for distribution targets beyond the documented APK and AAB workflows.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Why Local Desktop Targets Android Tablets

Local Desktop addresses a specific gap between Android applications and conventional Linux desktop software. It creates an Arch Linux ARM64 filesystem inside the Android app's internal storage, then exposes an Xfce Wayland session through the app. The intended users are people who already have a screen and input arrangement suited to desktop work, such as an Android tablet, a device with a DeX-style experience, or a large display paired with a physical keyboard.

The project does not present itself as a way to imitate desktop interaction on a small touchscreen. Its documentation explicitly warns against introducing inconvenient controls solely to simulate a desktop. That boundary matters. Local Desktop is more appropriate for using existing graphical Linux tools than for making Android look like a miniature desktop interface. A mouse or trackpad is optional, but the expected baseline already includes a large enough display and physical keyboard.

This positioning also separates the project from using Android as a conventional Linux terminal host. Local Desktop has a display-rendering path and a desktop session, not just a shell and package manager. The repository lists Android, Proot, and Wayland as its topics, and the documented architecture centers on graphical output from Linux back to an Android native activity.

Local Desktop's Proot, Wayland, and Xfce Pipeline

The documented data path has four main stages. First, the app prepares an Arch Linux ARM64 filesystem in Android internal storage. Second, Proot mounts that filesystem and supplies a chroot-like environment. Third, a minimal Wayland compositor built with the Android NDK runs inside the native application boundary. Fourth, an Xfce Wayland session launches within the Linux environment and renders through that compositor to the Android native activity.

Rust implements the application side. The Android-specific dependencies in `Cargo.toml` include `winit` with `android-native-activity` and `wayland`, `smithay`, Wayland protocols, EGL, JNI, and Android logging. The `smithay` dependency supplies Wayland server and rendering components, while `winit` connects the application to Android's native activity. This is a direct integration model rather than a browser-based remote desktop or a separate virtual machine presented through a standard display protocol.

The README says that no configuration is required for the demonstrated Pixel Tablet proof of concept. That statement concerns the displayed setup, not a complete matrix of devices, permissions, storage conditions, or Linux package combinations. The architecture explains why the project can present an Xfce session on Android, but the documentation does not define supported input devices, GPU requirements, resource limits, or a formal compatibility matrix.

Building the First APK with Termux

The shortest documented development path runs on an ARM64 Android device in Termux. This avoids cross-compilation, but the README states that the limitation comes from the prebuilt libraries, which are shipped only for arm64. Install Rust in Termux with the following command.

bash
pkg i rust

The package installation makes the Rust toolchain available to the Termux build environment. It does not install an APK or create the Linux desktop by itself.

Run the repository's default Cargo build next.

bash
cargo run

`Cargo.toml` sets `default-run = "build_apk"`, so this invocation invokes the APK builder. According to the README, the result is `localdesktop.apk` in the project root.

You can ask Termux to open the generated APK directly.

bash
termux-open localdesktop.apk

If Android's file handling path does not work for the generated file, the documented fallback is to move it into shared storage and install it there.

bash
mv localdesktop.apk ~/storage/downloads

Run `termux-setup-storage` before moving the APK outside Termux, as required by the README. The expected first result is an installable `localdesktop.apk`; after installation, the app can initialize its Linux filesystem and launch the documented Xfce session. The documentation does not describe the exact on-screen prompts, first-start duration, or failure messages.

Repeated Builds with the Local xbuild Toolchain

For repeated APK work in Termux, the repository provides `scripts/build-termux.sh`. The README says this route more closely matches the desktop cross-build pipeline and prepares a patched `xbuild` toolchain plus Android SDK build tools.

bash
bash scripts/build-termux.sh

The documented output is `target/x/release/android/localdesktop.apk`. This differs from the simple `cargo run` flow, which writes `localdesktop.apk` to the project root. The script route is therefore relevant when a contributor wants the output and build process to align more closely with the cross-build setup.

For development tooling, the README recommends Helix, grammar support, and `rust-analyzer` in Termux.

bash
pkg install helix helix-grammars rust-analyzer

The repository also ships a patched `xbuild` command under `patches/xbuild/xbuild`. Installing that local tool and invoking it directly is the standard release build path described on desktop hosts.

bash
cargo install --path patches/xbuild/xbuild --force
x build --release --platform android --arch arm64 --format apk

That command targets Android ARM64 and produces an APK through the project's patched build tooling. A developer who needs an AAB for Google Play, Visual Studio Code debugging, or a target such as x64 Android is directed to cross-build from Linux, macOS, or Windows rather than use the simple ARM64 Termux route.

Docker Builds Trade Speed for Reproducibility

The included Dockerfile offers a single-command build path when setting up the native development environment is inconvenient. The image starts from `alvrme/alpine-android:android-30-jdk17`, installs Gradle 8.14.2, adds the Rust `aarch64-linux-android` target, and installs build dependencies. It also conditionally installs `gcompat` on ARM-based hosts and builds the project through the patched `xbuild` command.

The repository exposes the container workflow through `make build-docker`.

bash
make build-docker

The Makefile builds an image, creates a container, copies the generated `target` directory out, removes the container, and removes the image. After the command completes, the README directs the developer to the APK in the host project tree.

bash
open target/x/release/android/localdesktop.apk

That final command is written specifically for a host where `open` is available. The README's broader desktop instructions also mention Visual Studio Code, Rust Analyzer, Android Debug, and CodeLLDB, with the `[Android] Debug` configuration intended to build, install, launch, and expose stdout and stderr. The Docker route is more self-contained, but the documentation itself warns that it takes a long time. It does not publish build durations or image resource requirements, so hardware capacity must be checked independently.

Local Desktop's Constraints and Maintenance Surface

The largest constraint is hardware fit. Local Desktop expects a large display, physical keyboard, and optionally a mouse or trackpad. It is therefore the wrong tool for users who want a complete desktop workflow on a small phone without external input. The README says it aims to bridge Android and desktop platforms rather than simulate desktop interaction, which makes that exclusion intentional.

ARM64 is another boundary. The easy Termux build works because prebuilt libraries are available only for arm64. Cross-building from a PC is the documented route for unsupported targets such as x64 Android. The optional PipeWire AAudio sink makes this distinction more concrete: `Cargo.toml` disables it by default because it links `libpipewire-0.3` and requires an Android PipeWire sysroot that the normal APK build does not provide.

The repository is not archived, and the last push was on 2026-10-15. Releases include `v2.1.1` on 2026-08-11, `v2.1.0` on 2026-08-07, and `v2.0.1` on 2026-08-05. Those facts indicate recent repository activity, but the documentation does not promise a release cadence or detail upgrade migrations. Release upgrades may therefore require checking release-specific filesystem or session behavior.

The package uses `GPL-3.0`. Anyone planning to redistribute an APK or incorporate repository code should review that license's actual terms. This article does not interpret those obligations as legal advice. Upgrade and maintenance work is concentrated in the Android native layer, the patched `xbuild` toolchain, the Proot-managed Linux filesystem, and the Wayland rendering path.

Editorial conclusion

Adopt Local Desktop when you have an ARM64 Android tablet or DeX-style display, a physical keyboard, and a reason to run Xfce through its Proot and Wayland bridge. Do not choose it for a conventional phone screen or for distribution targets beyond the documented APK and AAB workflows. Before adoption, verify that your preferred release can build on ARM64, that the filesystem setup fits internal storage, and that the device has a usable physical input setup.

Frequently asked questions

What hardware does Local Desktop need for a usable Linux desktop?

The README expects a large enough display, such as a tablet or DeX setup, and a physical keyboard. A mouse or trackpad is optional, and the project explicitly avoids simulating desktop controls on a small screen.

How do I build Local Desktop in Termux?

On an ARM64 device, run `pkg i rust` and then `cargo run`. The default Cargo target builds an APK named `localdesktop.apk` in the project root.

Can Local Desktop build for x64 Android from Termux?

The README limits the simple Termux route to ARM64 because only arm64 prebuilt libraries are shipped. It directs x64 Android builds to a cross-build from Linux, macOS, or Windows.

Official sources

  1. License: GPL-3.0
  2. localdesktop/localdesktop.github.io on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/localdesktop-localdesktop-github-io.svg)](https://hysenlabs.com/projects/localdesktop-localdesktop-github-io)

Was this useful?