Self Building Instructions

Build PurrfectSnap From Source

1. Requirements

  • JDK 21
  • Android SDK 36 + Build Tools 36.0.0
  • Android NDK 28.2.13676358
  • Rust toolchain (rustup)
  • WSL2 on Windows (recommended)

2. Clone

git clone https://github.com/particle-box/PurrfectSnap.git
cd PurrfectSnap

3. Setup Signing Certificate (Required)

Release signing expects a keystore at ~/.android/purrfectsnap-release.keystore and:PS_RELEASE_STORE_PASSWORD,PS_RELEASE_KEY_ALIAS,PS_RELEASE_KEY_PASSWORD.

mkdir -p ~/.android

keytool -genkeypair   -v   -keystore ~/.android/purrfectsnap-release.keystore   -alias purrfectsnap   -keyalg RSA   -keysize 4096   -validity 3650

export PS_RELEASE_STORE_PASSWORD='your_store_password'
export PS_RELEASE_KEY_ALIAS='purrfectsnap'
export PS_RELEASE_KEY_PASSWORD='your_key_password'

4. Build Release APK

Pick one command based on the APK you want:

# arm64-v8a APK
./gradlew assembleArmv8Release

# armeabi-v7a APK
./gradlew assembleArmv7Release

5. Output Location

  • app/build/outputs/apk/armv8/release/ for arm64 builds.
  • app/build/outputs/apk/armv7/release/ for armv7 builds.

6. If Build Fails

  • Use WSL2 if building on Windows.
  • Install JDK 21 if missing.
  • Install Rust toolchain if requested by Gradle/native tasks.
  • Install Android SDK/NDK only if your environment does not already have them.

7. Certificate Hash (Advanced)

If you hit integrity/signature mismatch, set EXPECTED_CERT_SHA256 to your signing certificate hash.

keytool -list -v   -keystore ~/.android/purrfectsnap-release.keystore   -alias purrfectsnap   -storepass "$PS_RELEASE_STORE_PASSWORD" | grep "SHA256:"

./gradlew assembleArmv8Release -PEXPECTED_CERT_SHA256=<your_sha256_no_colons>