1 Setup
David Spitzer edited this page 2026-07-02 16:00:10 -07:00

Setup

Two ways to get a working dev environment, depending on whether you want a GUI.

  1. Install Android Studio normally for your OS.
  2. Clone the repo:
    git clone https://repository.spitzerhome.com/david/changeling.git
    
  3. Open the cloned folder in Android Studio. It should sync cleanly on its own:
    • local.properties isn't committed (it's gitignored, since it's machine-specific) — Android Studio will create/fill it in automatically pointing at wherever it installed the SDK.
    • The Gradle wrapper is committed, so you get the exact Gradle version this project uses without installing Gradle yourself.
    • The project uses Gradle's toolchain auto-provisioning (see gradle/gradle-daemon-jvm.properties) — Gradle downloads its own JDK automatically, so you don't need to hunt down a specific JDK version or set JAVA_HOME yourself.
  4. If Android Studio offers to upgrade AGP/Kotlin/Gradle versions, that's fine to accept — we've done this a few times already as Android Studio's own recommendations moved forward, and re-verified the build each time.

Option B: Headless/CI (no GUI)

This is how the environment was originally set up when developing without desktop/sudo access. All of it is user-space — no root needed.

  1. Android SDK command-line tools: download from https://dl.google.com/android/repository/commandlinetools-linux-*_latest.zip, extract into ~/Android/Sdk/cmdline-tools/latest/. Then:
    export ANDROID_HOME=~/Android/Sdk
    export PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$PATH"
    yes | sdkmanager --licenses --sdk_root="$ANDROID_HOME"
    sdkmanager --sdk_root="$ANDROID_HOME" "platform-tools" "platforms;android-34" "build-tools;34.0.0"
    
  2. local.properties in the project root:
    sdk.dir=/path/to/Android/Sdk
    
  3. Build: just run ./gradlew assembleDebug — the Gradle wrapper handles Gradle itself, and Gradle's toolchain auto-provisioning handles the JDK. You don't need a JDK pre-installed for this to work, though having some JDK available for Gradle to bootstrap itself with (before it downloads its own toolchain JDK) doesn't hurt.

Notes

  • The project deliberately avoids anything GrapheneOS-specific in build tooling — a stock Android SDK/toolchain works fine. GrapheneOS-specific behavior only shows up at runtime (USB permission handling), covered in Architecture.
  • If you want to actually run the app, see Building and Testing for adb install, and Project Status for what currently works vs. what's untested.