{"id":35519311,"url":"https://github.com/localdesktop/localdesktop","last_synced_at":"2026-03-13T00:04:36.321Z","repository":{"id":270501799,"uuid":"910564927","full_name":"localdesktop/localdesktop","owner":"localdesktop","description":"Local Desktop helps you run a desktop Linux environment on your Android device.","archived":false,"fork":false,"pushed_at":"2026-03-04T22:41:50.000Z","size":13301,"stargazers_count":1404,"open_issues_count":42,"forks_count":58,"subscribers_count":10,"default_branch":"main","last_synced_at":"2026-03-05T03:40:33.830Z","etag":null,"topics":["android","linux","proot","wayland"],"latest_commit_sha":null,"homepage":"https://localdesktop.github.io","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/localdesktop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-31T16:43:54.000Z","updated_at":"2026-03-04T22:10:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e608706-b390-4501-91dc-a0bdc451a4b7","html_url":"https://github.com/localdesktop/localdesktop","commit_stats":null,"previous_names":["polar-bear-app/new-polar-bear","local-desktop/local-desktop","localdesktop/localdesktop"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/localdesktop/localdesktop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localdesktop%2Flocaldesktop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localdesktop%2Flocaldesktop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localdesktop%2Flocaldesktop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localdesktop%2Flocaldesktop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localdesktop","download_url":"https://codeload.github.com/localdesktop/localdesktop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localdesktop%2Flocaldesktop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30205897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","linux","proot","wayland"],"created_at":"2026-01-03T23:12:40.807Z","updated_at":"2026-03-13T00:04:36.304Z","avatar_url":"https://github.com/localdesktop.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local Desktop\n\nLocal Desktop helps you run a desktop Linux environment on your Android device.\n\n\u003e Local Desktop is a Rust rewrite of the original [Polar Bear](https://github.com/localdesktop/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.\n\n## How it works\n\n1. An Arch Linux ARM64 filesystem is set up inside the app's internal storage.\n2. Proot mounts the filesystem and provides a chroot-like environment.\n3. A minimal built-in Wayland compositor runs in Android NDK.\n4. Rootful Xwayland \u0026 a desktop environment launches inside the chroot and renders back to the Android native activity.\n\n![POC](./assets/docs/proof-of-concept.png)\n_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._\n\n## Getting Started\n\n### How to build an APK\n\n#### Termux\n\nYou can build the Local Desktop APK directly on your Android device. This is simple because no cross-compilation is needed. However, we only ship prebuilt libs for arm64, so this option only works on ARM64.\nMake sure you have Rust installed in Termux:\n\n```\npkg i rust\n```\n\nThen run `cargo run` in the project folder:\n\n```bash\ncargo run\n```\n\nAfter the build succeeds, you will find `localdesktop.apk` in the current folder. You can install it with `termux-open localdesktop.apk`, but in some cases you may need to `mv localdesktop.apk ~/storage/downloads` and install it from there. Make sure you have run `termux-setup-storage` before moving it outside Termux.\n\n#### Linux/Mac/Windows\n\nThe above option is suitable for quick development on Android. However, if you need to build an AAB (for distribution to Google Play), debug with Visual Studio Code, or compile for unsupported targets (like x64 Android), then you need to cross-build it from your PC.\nAlong with Rust, please make sure you have these components installed:\n\n```\nbrew install llvm lld gradle@8\n```\n\nThen install our local version of xbuild:\n\n```bash\ncargo install --path patches/xbuild/xbuild --force\nx build --release --platform android --arch arm64 --format apk\n```\n\nAlternatively, trigger the default build task by pressing `Ctrl+Shift+B`.\n\nYou can find the output APK in:\n\n```bash\nopen target/x/release/android/gradle/app/build/outputs/apk/debug/\n```\n\n#### Docker\n\nIf you have issues setting up your local development environment as detailed above, you can make use of the included Dockerfile to build an APK on a single command. This will take a long time so it's not recommended if you can make use of any of the other methods\n\n```bash\nmake build-docker\n```\n\nYou can find the output APK in:\n\n```bash\nopen target/x/release/android/gradle/app/build/outputs/apk/debug/\n```\n\n### How to develop\n\n#### Termux\n\nWe recommend the following setup, but feel free to use your own favorite tools for development:\n\n```\npkg install helix helix-grammars rust-analyzer\n```\n\nA wonderful thing about developing directly on Android is that an agent like [Codex on Termux](https://github.com/DioNanos/codex-termux) can **test the code for you** by running unit tests, reading the output, understanding what went wrong, and trying again. In my experience, this is not possible when cross-developing on other operating systems, so you have to run the tests yourself.\n\n![Developing on Android](./assets/docs/dev-from-android.webp)\n\n\n#### Linux/Mac/Windows\n\nRecommended setup:\n\n- **IDE**: Visual Studio Code\n\n- **Extensions**:\n\n  - [Rust Analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)\n  - [Android Debug](https://marketplace.visualstudio.com/items?itemName=nisargjhaveri.android-debug)\n  - [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb)\n\n- **Instructions**:\n\n  1. Open Visual Studio Code.\n  2. Launch the `[Android] Debug` configuration from the debug panel. This will:\n     - Build the Rust code into an APK.\n     - Install the APK on a selectable device, and launch the app in debug mode.\n     - Redirect stdout/stderr output to the terminal.\n\n![It is easy to debug](./assets/docs/debugable.webp)\n\n\u003e **Tip**: You can debug the app on either a physical device or a virtual device.\n\nFor more instructions on how to work on this project, please visit the [Developer Manual](https://localdesktop.github.io/docs/developer/how-it-works).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocaldesktop%2Flocaldesktop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocaldesktop%2Flocaldesktop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocaldesktop%2Flocaldesktop/lists"}