- Install a JDK distribution of your choice
- Download the Android command line tools (scroll down a bit), extract it to
~/Android/Sdk
(or somewhere else, this is just where Android Studio puts it), and set theANDROID_HOME
environment variable to~/Android/Sdk
. - Accept licenses by running
$ANDROID_HOME/cmdline-tools/bin/sdkmanager --licenses --sdk_root=$ANDROID_HOME
. - Check the ndk version required for the commit you have checked out (it's listed in listed in
android/app/build.gradle.kts
, Ctrl-F ndkVersion) and download that version of the ndk, extract it to$ANDROID_HOME/ndk/your_ndk_version_number
(and ensure symlinks are preserved), and set theANDROID_NDK_HOME
environment variable to$ANDROID_HOME/ndk/your_ndk_version_number
.
- Ensure the version of ndk listed in
android/app/build.gradle.kts
(Ctrl-F ndkVersion) is installed (File -> Settings -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools).
- Install rustup
- Add all supported cpu architecture targets:
rustup target add armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android
- Install cargo-ndk:
cargo install cargo-ndk
- In the
android
directory, run./gradlew assembleBluetoothRelease
- The apk can be found at
android/app/build/outputs/apk/bluetooth/release/app-bluetooth-release-unsigned.apk