Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

1.9 KB
Raw Blame

Ensu for Android

Source code for the Ensu Android app.

To know more about Ente, see our main README or visit ente.com.

Building from source

  1. Install Android Studio, Rust, and CMake (e.g. brew install cmake).

  2. Generate the Kotlin bindings:

    cd rust
    cargo codegen native
    
  3. Open android/ in Android Studio and run Ensu's app module. If the Android NDK is missing, Android Studio will prompt to install it.

That's it. Apart from the cargo codegen, this is a normal Android project. Gradle cross-compiles the Rust libraries to JNI .so files automatically when building the app.

[!NOTE]

Re-run cargo codegen native whenever the UniFFI-exported surface under rust/bindings/uniffi/ changes. Internal Rust changes (function bodies, private helpers) are picked up by the normal Gradle build.

From anywhere in the repo:

(cd "$(git rev-parse --show-toplevel)/rust" && cargo codegen native)

Terminal builds

[!NOTE]

If you'd rather not open Android Studio, this section is for you.

To skip the Android Studio install entirely, see photos/docs/android-cli.md.

Build and install a debug APK on a connected device or emulator:

cd android
./gradlew :ensu:app:installDebug
adb shell am start -n io.ente.ensu.debug/io.ente.ensu.MainActivity

Release APK:

./gradlew :ensu:app:assembleRelease

Output: apps/ensu/app/build/outputs/apk/release/app-release.apk.

Release AAB (Play Store bundle):

./gradlew :ensu:app:bundleRelease

Output: apps/ensu/app/build/outputs/bundle/release/app-release.aab.

Release builds use a debug keystore located at debug.keystore. For production releases, configure your own signing keys in app/build.gradle.kts.