Skip to content

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:

    bash
    rustup default 1.84.0   # 1.84.0 is required; newer versions break the build
    rustup target add aarch64-linux-android
  • Ninja — 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.git

The --recursive flag is required — submodules contain build dependencies.

2. Prepare SDKs

  1. QNN SDK 2.39 — download v2.39.0.250926.zip and extract.
  2. Android NDK — get it from the Android NDK downloads page and extract.
  3. Update the SDK paths in two files:
    • QNN_SDK_ROOT in app/src/main/cpp/CMakeLists.txt
    • ANDROID_NDK_ROOT in app/src/main/cpp/CMakePresets.json

3. Build Native Libraries

Linux

bash
cd app/src/main/cpp/
bash ./build.sh

Windows

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.bat

macOS

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.sh

4. 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/.