Local Desktop helps you run a desktop Linux environment on your Android device.
Local Desktop is a Rust rewrite of the original Polar Bear project, which was written in Kotlin and C++. The aim of this rewrite is to make it more stable, portable, and able to do the development work on Android.
- An Arch Linux ARM64 filesystem is set up inside the app's internal storage.
- Proot mounts the filesystem and provides a chroot-like environment.
- A minimal built-in Wayland compositor runs in Android NDK.
- Rootful Xwayland & a desktop environment launches inside the chroot and renders back to the Android native activity.
Proof of Concept: A Pixel Tablet running the XFCE desktop environment inside a Proot-based ARM64 Linux. No configuration is required; just install and go.
cargo install xbuild
x build --release --platform android --arch arm64 --format apk
Alternatively, trigger the default build task by pressing Ctrl+Shift+B
.
You can find the output APK in:
open target/x/release/android/gradle/app/build/outputs/apk/debug/
Recommended setup:
-
IDE: Visual Studio Code
-
Extensions:
-
Instructions:
- Open Visual Studio Code.
- Launch the
[Android] Debug
configuration from the debug panel. This will:- Build the Rust code into an APK.
- Install the APK on a selectable device, and launch the app in debug mode.
- Redirect stdout/stderr output to the terminal.
Tip: You can debug the app on either a physical device or a virtual device.
For more instructions on how to work on this project, please visit the Developer Manual.