No results
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.
Option A: Android Studio (recommended for regular development)
- Install Android Studio normally for your OS.
- Clone the repo:
git clone https://repository.spitzerhome.com/david/changeling.git - Open the cloned folder in Android Studio. It should sync cleanly on its own:
local.propertiesisn'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 setJAVA_HOMEyourself.
- 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.
- 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" local.propertiesin the project root:sdk.dir=/path/to/Android/Sdk- 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.