feat(android): SDK AAR (UniFFI) + Compose APK, Arti rustls feature split
All checks were successful
ci / test (pull_request) Successful in 3m22s
All checks were successful
ci / test (pull_request) Successful in 3m22s
Adds the Android product alongside the existing Linux TUI, in one repo. SDK — crates/onionwire-sdk is a UniFFI facade over the very same `onionwire` crate the TUI runs on. Identity, invite, friend upsert, send/receive, rotate and wipe all delegate; no protocol is reimplemented, so an Android peer and a Linux peer interoperate. It is its own Cargo workspace because Arti's TLS backends are non-additive: the TUI keeps native-tls (OpenSSL), Android needs rustls + static-sqlite (no OpenSSL, no system libsqlite3 in the NDK). android/ — Gradle project. :sdk produces the AAR (Kotlin bindings generated at build time + libonionwire_sdk.so via cargo-ndk), :app is a Kotlin/Compose/M3 messenger depending on :sdk only. minSdk 26, targetSdk/compileSdk 36, INTERNET-only, data in filesDir, backups excluded. Root Cargo.toml grows `native-tls` (default) and `rustls` features so exactly one Arti TLS backend is selected per build graph. The default build is unchanged: same backend, ratatui still a normal dependency, src/tui.rs untouched. Also: Store::self_fingerprint/set_petname + Node wrappers (additive only), scripts/build-android-local.sh, README sections, .gitignore for local SDK paths.
This commit is contained in:
parent
2b42864eba
commit
672f2c9990
41 changed files with 9387 additions and 1 deletions
10
android/app/src/main/res/drawable/ic_launcher_background.xml
Normal file
10
android/app/src/main/res/drawable/ic_launcher_background.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#0B0B10"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
</vector>
|
||||
41
android/app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
41
android/app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Onion bulb. Adaptive-icon foreground: keep art inside the 66dp safe zone. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
|
||||
<!-- bulb -->
|
||||
<path
|
||||
android:fillColor="#7C4DFF"
|
||||
android:pathData="M54,28 C72,28 82,46 82,62 C82,78 69,88 54,88 C39,88 26,78 26,62 C26,46 36,28 54,28 Z" />
|
||||
|
||||
<!-- sprout -->
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="3"
|
||||
android:strokeLineCap="round"
|
||||
android:pathData="M54,28 L54,18" />
|
||||
|
||||
<!-- layers -->
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="2.5"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M38,40 C33,54 35,74 48,84" />
|
||||
<path
|
||||
android:strokeColor="#38F2C7"
|
||||
android:strokeWidth="2.5"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M70,40 C75,54 73,74 60,84" />
|
||||
<path
|
||||
android:strokeColor="#0B0B10"
|
||||
android:strokeWidth="2.5"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M54,32 L54,86" />
|
||||
|
||||
</vector>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
4
android/app/src/main/res/values/strings.xml
Normal file
4
android/app/src/main/res/values/strings.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">OnionWire</string>
|
||||
</resources>
|
||||
10
android/app/src/main/res/values/themes.xml
Normal file
10
android/app/src/main/res/values/themes.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Compose paints the real UI; this only sets the window before the
|
||||
first frame so there is no white flash on a dark app. -->
|
||||
<style name="Theme.OnionWire" parent="android:Theme.Material.NoActionBar">
|
||||
<item name="android:windowBackground">#FF0B0B10</item>
|
||||
<item name="android:statusBarColor">#FF0B0B10</item>
|
||||
<item name="android:navigationBarColor">#FF0B0B10</item>
|
||||
</style>
|
||||
</resources>
|
||||
19
android/app/src/main/res/xml/data_extraction_rules.xml
Normal file
19
android/app/src/main/res/xml/data_extraction_rules.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Chat bodies are encrypted at rest, but nothing is cloud-synced or
|
||||
device-transferred: an Android auto-backup of onionwire.db would hand the
|
||||
wrapped message key and the plaintext identity keys to Google Drive.
|
||||
Identity is local by design — back it up with the SDK's owbak1 export instead.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<exclude domain="file" />
|
||||
<exclude domain="database" />
|
||||
<exclude domain="sharedpref" />
|
||||
</cloud-backup>
|
||||
<device-transfer>
|
||||
<exclude domain="file" />
|
||||
<exclude domain="database" />
|
||||
<exclude domain="sharedpref" />
|
||||
</device-transfer>
|
||||
</data-extraction-rules>
|
||||
Loading…
Reference in a new issue