Build from Source
This page covers building Local Dream from source. The result is an APK identical to the GitHub Releases build.
TIP
Building on Linux or WSL is recommended. macOS and Windows builds work but have less verification.
Prerequisites
The following tools are required:
Rust — install via rustup, then pin to
1.84.0:bashrustup default 1.84.0 # 1.84.0 is required; newer versions break the build rustup target add aarch64-linux-androidNinja — build system
CMake — build configuration
Android Studio — for the final APK assembly
1. Clone the Repository
bash
git clone --recursive https://github.com/xororz/local-dream.gitThe --recursive flag is required — submodules contain build dependencies.
2. Prepare SDKs
- QNN SDK 2.39 — download v2.39.0.250926.zip and extract.
- Android NDK — get it from the Android NDK downloads page and extract.
- Update the SDK paths in two files:
QNN_SDK_ROOTinapp/src/main/cpp/CMakeLists.txtANDROID_NDK_ROOTinapp/src/main/cpp/CMakePresets.json
3. Build Native Libraries
Linux
bash
cd app/src/main/cpp/
bash ./build.shWindows
powershell
# Install build tools if needed:
# winget install Kitware.CMake
# winget install Ninja-build.Ninja
# winget install Rustlang.Rustup
cd app\src\main\cpp\
# Convert patch line endings (install dos2unix if needed:
# winget install -e --id waterlan.dos2unix)
dos2unix SampleApp.patch
.\build.batmacOS
bash
# Install build tools with Homebrew:
# brew install cmake rust ninja
# Fix CMake policy version compatibility for newer CMake on macOS
sed -i '' '2s/$/ -DCMAKE_POLICY_VERSION_MINIMUM=3.5/' build.sh
bash ./build.sh4. Build the APK
Open the project in Android Studio, then:
Build → Generate App Bundles or APKs → Generate APKs
The APK is written to app/build/outputs/apk/.