docs(android): rewrite the Android docs to match the tree #135

Merged
sirius merged 1 commit from onionwire/t_4afe292a-docs-android-audit-rewrite-the-android-d into main 2026-09-20 04:53:13 +00:00
Owner

docs-only. Audited android/README.md, android/CUPRATE_DAEMON.md, and android/MONERO_BINARIES.md against origin/main.

Started on fa0e4b2. While this card was in flight, PR #134 (t_07542df0) merged: the APK poller now paints with wallet_status then ticks wallet_child_refresh. This branch was rebased onto d2d49d2 (origin/main). #134 did not touch these three markdown files. PR base is main.

Files

  • android/README.md — full rewrite (operator-facing)
  • android/CUPRATE_DAEMON.md — audit + update
  • android/MONERO_BINARIES.md — audit + update

Nothing else changed (git diff --stat origin/main...HEAD is those three files).

Audit table

doc claim → what the code actually does → file:line

The four card findings (confirmed or corrected)

# Doc claim (on main before this PR) What the code actually does Evidence
1 android/README.md said any push to main that touches Android sources/build config builds and attaches onionwire-<version>-android-arm64-v8a.apk (mangled sentence around the old path filter). Wrong. android-release.yml on: is workflow_dispatch (+ unused workflow_call). No push. release.yml on: is workflow_dispatch only. Releases are two manual dispatches: release.yml mints the tag (dry_run=true first), then android-release with tag=<that tag>. android-ci.yml does run on push/PR path filters, but it is debug-signed and publishes nothing. .forgejo/workflows/android-release.yml:31-51, .forgejo/workflows/release.yml:13-37, .forgejo/workflows/android-ci.yml:21-41, docs/RELEASING.md:88-118
2 Version is "the latest v*.*.* tag plus patch, or v0.1.0"; versionName matches the tag. Partly wrong / incomplete. Operator path: android-release is dispatched with tag= and checks out that tag (ref: ${{ github.event.inputs.tag || inputs.tag || github.sha }}). versionCode is major*10000 + minor*100 + patch. Empty tag checks out github.sha (usually main) and may join the previous release's version (re-stamp old versionName) if that release is missing the APK, or patch+1 if it already has one — Android will refuse to install a restamped same versionName over the installed app. Core (release.yml) owns minting; default bump=minor. The APK is built from the tag's tree when tag= is set, not from main. android-release.yml:85-90,101-174, android/app/build.gradle.kts:28-30, docs/RELEASING.md:53-59,144-152
3 Layout listed crypto/, ui/, src/test/, src/androidTest/ only. Stale. Tree also has wallet/ (ChainStorage.kt, WalletChildBinaries.kt), keepalive/ (NodeHost.kt, KeepAliveService.kt, KeepAlivePolicy.kt, NodeLifetime.kt), and newer ui/ files (WalletChildStatusText.kt, OutboxDetail.kt, Insets.kt, UnlockSubmit.kt, MessageDelivery.kt). README also claimed no FOREGROUND_SERVICE / keep-alive in v1. Wrong: manifest declares FOREGROUND_SERVICE, FOREGROUND_SERVICE_SPECIAL_USE, POST_NOTIFICATIONS; KeepAliveService is registered. android/app/src/main/java/com/siriusdevops/onionwire/{wallet,keepalive,ui}/, android/app/src/main/AndroidManifest.xml:15-33,62-69
4 Card: README never points at the wallet-child status line's chain progress; live-refresh (Wire::wallet_child_refresh) is not described for the Android reader. Both confirmed missing from the Android docs, now written. Status line: WalletChildStatusText.walletChildLine appends · sync h/t (WalletChildStatusText.kt:304-313). Live loop (after #134): openWalletChild → walletChildRefreshLoop — first paint paintWalletChildCached() → Wire.walletStatus(); every 2 s refreshWalletChild() → Wire.walletChildRefresh(). Serialized; never spawns. WireViewModel.kt:652-709,909-922, WalletChildStatusText.kt:287-328, crates/onionwire-sdk/src/lib.rs:647-677

Other findings this rewrite fixed

Doc claim (on main) What the code actually does Evidence
CUPRATE_DAEMON.md "Not verified" omitted the exited limit the card required. SDK: in-process node_state is projected from wallet-child state; a daemon that dies after the wallet child came up cannot be reported exited — probe fails, state stays syncing. exited still means the monero-wallet-rpc child is gone. crates/onionwire-sdk/src/lib.rs:907-921
CUPRATE_DAEMON.md "the job's timeout-minutes is 120". android-ci.yml is 120; android-release.yml Android job is 90; publish job 20. android-ci.yml:79, android-release.yml:78,404
CUPRATE_DAEMON.md Start refused below a 3 GiB floor only. Floors: 3 GiB testnet, 64 GiB mainnet-pruned, 280 GiB mainnet-full. Unreadable StatFs is fail-closed. WalletChildStatusText.kt:379-429, ChainStorage.kt:20-28
CUPRATE_DAEMON.md companion paths docs/WALLET.md (no ../). From android/ those do not resolve. Now ../docs/…. this PR
MONERO_BINARIES.md "CI here runs on a Raspberry Pi". Android Gradle CI (android-ci.yml / android-release.yml) runs on docker-amd64. The Pi runs Linux ci.yml / release.yml and the Android publish job. The wallet-rpc rebuild is still not a CI job. android-ci.yml:78, android-release.yml:77,403
Blob bytes / sha256 Match. stat 19954224; sha256 d9126788…1b5ad4; equals android/monero-binaries.sha256; readelf NEEDED libdl.so libm.so libc.so. Tag v0.18.4.4 peels to commit 516e5355… (GitHub). Script pins the tag, not the commit. blob + android/monero-binaries.sha256 + scripts/build-monero-wallet-rpc-android.sh:28

Already correct (not churned)

  • platform 36 / build-tools 36.0.0 / NDK 28.2.13676358 — android/sdk/build.gradle.kts:21-26, android/app/build.gradle.kts:14,25-26
  • minSdk 26 — android/app/build.gradle.kts:25
  • both Android workflows install cmake — android-ci.yml:128, android-release.yml:237
  • isMinifyEnabled = false — android/app/build.gradle.kts:65
  • --features cuprate-daemon on cargoBuildAndroid only; host bindgen feature-free — android/sdk/build.gradle.kts:69,176-181,204-265
  • RUST_TOOLCHAIN: "1.98" vs workspace MSRV 1.91 — both Android workflows; Cargo.toml:5
  • Locked decisions kept: .onion refused without arti; wallet RPC loopback; chain traffic off until opt-in; in-process node opt-in with warning above Start; storage floor is a floor; no percent / progress bar / ETA

Blob verification (this run)

19954224 android/app/src/main/jniLibs/arm64-v8a/libmonerowalletrpc.so
d9126788030ecd1ccdb40c7764e66e9a14d158a147ad335b256f0577681b5ad4  android/app/src/main/jniLibs/arm64-v8a/libmonerowalletrpc.so

android/monero-binaries.sha256 is the same digest for app/src/main/jniLibs/arm64-v8a/libmonerowalletrpc.so. scripts/build-android-local.sh:56-59 is sha256sum -c of that file; :98-109 compares the APK entry.

Drift that belongs in docs/ or scripts/ (not edited — out of scope)

  • scripts/build-monero-wallet-rpc-android.sh:8 still says "CI here runs on an arm64 Raspberry Pi". True of Linux CI; false as a description of the Android Gradle jobs. Left alone (forbidden path).
  • docs/WALLET.md:188-194 describes wallet_status vs wallet_child_refresh as SDK methods. After #134 the APK loop matches that pair (cached first paint, live ticks). No docs/ edit in this PR.
  • Root README.md Android/release sections already match the two-dispatch story (PR #133).

Not examined / not verified

  • Did not rebuild the APK, AAR, or libonionwire_sdk.so on this card. CUPRATE CI cost table (runs 402 / 406 / 412, .so / APK / AAR byte sizes, librandomx_rs 1,122,296 B) is kept as the recorded provenance of those runs, labelled not re-measured on this HEAD.
  • Did not readelf -d a built libonionwire_sdk.so (only the committed wallet-rpc blob). The "DT_NEEDED is liblog.so and nothing else" sentence remains the original measurement.
  • Did not execute monero-wallet-rpc or cuprated on a device or emulator. Cross-compiled is not device-proven; mainnet remains unvalidated.
  • Did not re-run Forgejo Actions or inspect live run logs 402/406/412.
  • Did not audit docs/**, root README.md, Gradle, or workflows (forbidden). Path-filter claims for android-ci.yml were read from the workflow file, not from a live run.
  • Did not verify Play's 16 KB page-size requirement beyond the existing README recipe.
  • UniFFI-generated Kotlin under android/sdk/build/ is a build output; not in the tree; not opened.
  • Device/emulator execution of the live poller was not done; #134's unit test (WalletChildRefreshLoopTest.kt) was read as the loop contract, not re-run here.
docs-only. Audited `android/README.md`, `android/CUPRATE_DAEMON.md`, and `android/MONERO_BINARIES.md` against `origin/main`. Started on `fa0e4b2`. While this card was in flight, **PR #134** (`t_07542df0`) merged: the APK poller now paints with `wallet_status` then ticks `wallet_child_refresh`. This branch was **rebased onto `d2d49d2` (`origin/main`)**. #134 did not touch these three markdown files. **PR base is `main`.** ## Files - `android/README.md` — full rewrite (operator-facing) - `android/CUPRATE_DAEMON.md` — audit + update - `android/MONERO_BINARIES.md` — audit + update Nothing else changed (`git diff --stat origin/main...HEAD` is those three files). ## Audit table `doc claim → what the code actually does → file:line` ### The four card findings (confirmed or corrected) | # | Doc claim (on `main` before this PR) | What the code actually does | Evidence | |---|---|---|---| | 1 | `android/README.md` said any push to `main` that touches Android sources/build config builds and attaches `onionwire-<version>-android-arm64-v8a.apk` (mangled sentence around the old path filter). | **Wrong.** `android-release.yml` `on:` is `workflow_dispatch` (+ unused `workflow_call`). No `push`. `release.yml` `on:` is `workflow_dispatch` only. Releases are two manual dispatches: `release.yml` mints the tag (`dry_run=true` first), then `android-release` with `tag=<that tag>`. `android-ci.yml` *does* run on push/PR path filters, but it is debug-signed and publishes nothing. | `.forgejo/workflows/android-release.yml:31-51`, `.forgejo/workflows/release.yml:13-37`, `.forgejo/workflows/android-ci.yml:21-41`, `docs/RELEASING.md:88-118` | | 2 | Version is "the latest `v*.*.*` tag plus patch, or v0.1.0"; `versionName` matches the tag. | **Partly wrong / incomplete.** Operator path: `android-release` is dispatched with `tag=` and **checks out that tag** (`ref: ${{ github.event.inputs.tag \|\| inputs.tag \|\| github.sha }}`). `versionCode` is `major*10000 + minor*100 + patch`. Empty `tag` checks out `github.sha` (usually `main`) and may **join** the previous release's version (re-stamp old `versionName`) if that release is missing the APK, or `patch+1` if it already has one — Android will refuse to install a restamped same `versionName` over the installed app. Core (`release.yml`) owns minting; default `bump=minor`. The APK is built from the **tag's tree** when `tag=` is set, not from `main`. | `android-release.yml:85-90,101-174`, `android/app/build.gradle.kts:28-30`, `docs/RELEASING.md:53-59,144-152` | | 3 | Layout listed `crypto/`, `ui/`, `src/test/`, `src/androidTest/` only. | **Stale.** Tree also has `wallet/` (`ChainStorage.kt`, `WalletChildBinaries.kt`), `keepalive/` (`NodeHost.kt`, `KeepAliveService.kt`, `KeepAlivePolicy.kt`, `NodeLifetime.kt`), and newer `ui/` files (`WalletChildStatusText.kt`, `OutboxDetail.kt`, `Insets.kt`, `UnlockSubmit.kt`, `MessageDelivery.kt`). README also claimed **no** `FOREGROUND_SERVICE` / keep-alive in v1. **Wrong:** manifest declares `FOREGROUND_SERVICE`, `FOREGROUND_SERVICE_SPECIAL_USE`, `POST_NOTIFICATIONS`; `KeepAliveService` is registered. | `android/app/src/main/java/com/siriusdevops/onionwire/{wallet,keepalive,ui}/`, `android/app/src/main/AndroidManifest.xml:15-33,62-69` | | 4 | Card: README never points at the wallet-child status line's chain progress; live-refresh (`Wire::wallet_child_refresh`) is not described for the Android reader. | **Both confirmed missing from the Android docs, now written.** Status line: `WalletChildStatusText.walletChildLine` appends ` · sync h/t` (`WalletChildStatusText.kt:304-313`). Live loop (after #134): `openWalletChild` → `walletChildRefreshLoop` — first paint `paintWalletChildCached()` → `Wire.walletStatus()`; every 2 s `refreshWalletChild()` → `Wire.walletChildRefresh()`. Serialized; never spawns. | `WireViewModel.kt:652-709,909-922`, `WalletChildStatusText.kt:287-328`, `crates/onionwire-sdk/src/lib.rs:647-677` | ### Other findings this rewrite fixed | Doc claim (on `main`) | What the code actually does | Evidence | |---|---|---| | `CUPRATE_DAEMON.md` "Not verified" omitted the `exited` limit the card required. | SDK: in-process `node_state` is projected from wallet-child state; a daemon that dies after the wallet child came up cannot be reported `exited` — probe fails, state stays `syncing`. `exited` still means the `monero-wallet-rpc` child is gone. | `crates/onionwire-sdk/src/lib.rs:907-921` | | `CUPRATE_DAEMON.md` "the job's timeout-minutes is 120". | `android-ci.yml` is 120; `android-release.yml` Android job is **90**; publish job 20. | `android-ci.yml:79`, `android-release.yml:78,404` | | `CUPRATE_DAEMON.md` Start refused below a 3 GiB floor only. | Floors: 3 GiB testnet, 64 GiB mainnet-pruned, 280 GiB mainnet-full. Unreadable `StatFs` is fail-closed. | `WalletChildStatusText.kt:379-429`, `ChainStorage.kt:20-28` | | `CUPRATE_DAEMON.md` companion paths `docs/WALLET.md` (no `../`). | From `android/` those do not resolve. Now `../docs/…`. | this PR | | `MONERO_BINARIES.md` "CI here runs on a Raspberry Pi". | Android Gradle CI (`android-ci.yml` / `android-release.yml`) runs on **`docker-amd64`**. The Pi runs Linux `ci.yml` / `release.yml` and the Android *publish* job. The wallet-rpc **rebuild** is still not a CI job. | `android-ci.yml:78`, `android-release.yml:77,403` | | Blob bytes / sha256 | **Match.** `stat` 19954224; sha256 `d9126788…1b5ad4`; equals `android/monero-binaries.sha256`; `readelf` NEEDED `libdl.so` `libm.so` `libc.so`. Tag `v0.18.4.4` peels to commit `516e5355…` (GitHub). Script pins the tag, not the commit. | blob + `android/monero-binaries.sha256` + `scripts/build-monero-wallet-rpc-android.sh:28` | ### Already correct (not churned) - platform 36 / build-tools 36.0.0 / NDK `28.2.13676358` — `android/sdk/build.gradle.kts:21-26`, `android/app/build.gradle.kts:14,25-26` - `minSdk 26` — `android/app/build.gradle.kts:25` - both Android workflows install `cmake` — `android-ci.yml:128`, `android-release.yml:237` - `isMinifyEnabled = false` — `android/app/build.gradle.kts:65` - `--features cuprate-daemon` on `cargoBuildAndroid` only; host bindgen feature-free — `android/sdk/build.gradle.kts:69,176-181,204-265` - `RUST_TOOLCHAIN: "1.98"` vs workspace MSRV `1.91` — both Android workflows; `Cargo.toml:5` - Locked decisions kept: `.onion` refused without `arti`; wallet RPC loopback; chain traffic off until opt-in; in-process node opt-in with warning above Start; storage floor is a floor; no percent / progress bar / ETA ## Blob verification (this run) ``` 19954224 android/app/src/main/jniLibs/arm64-v8a/libmonerowalletrpc.so d9126788030ecd1ccdb40c7764e66e9a14d158a147ad335b256f0577681b5ad4 android/app/src/main/jniLibs/arm64-v8a/libmonerowalletrpc.so ``` `android/monero-binaries.sha256` is the same digest for `app/src/main/jniLibs/arm64-v8a/libmonerowalletrpc.so`. `scripts/build-android-local.sh:56-59` is `sha256sum -c` of that file; `:98-109` compares the APK entry. ## Drift that belongs in `docs/` or `scripts/` (not edited — out of scope) - `scripts/build-monero-wallet-rpc-android.sh:8` still says "CI here runs on an arm64 Raspberry Pi". True of Linux CI; false as a description of the Android Gradle jobs. Left alone (forbidden path). - `docs/WALLET.md:188-194` describes `wallet_status` vs `wallet_child_refresh` as **SDK** methods. After #134 the APK loop matches that pair (cached first paint, live ticks). No `docs/` edit in this PR. - Root `README.md` Android/release sections already match the two-dispatch story (PR #133). ## Not examined / not verified - Did **not** rebuild the APK, AAR, or `libonionwire_sdk.so` on this card. CUPRATE CI cost table (runs 402 / 406 / 412, `.so` / APK / AAR byte sizes, `librandomx_rs` 1,122,296 B) is kept as the recorded provenance of those runs, labelled not re-measured on this HEAD. - Did **not** `readelf -d` a built `libonionwire_sdk.so` (only the committed wallet-rpc blob). The "DT_NEEDED is `liblog.so` and nothing else" sentence remains the original measurement. - Did **not** execute `monero-wallet-rpc` or `cuprated` on a device or emulator. Cross-compiled is not device-proven; mainnet remains unvalidated. - Did **not** re-run Forgejo Actions or inspect live run logs 402/406/412. - Did **not** audit `docs/**`, root `README.md`, Gradle, or workflows (forbidden). Path-filter claims for `android-ci.yml` were read from the workflow file, not from a live run. - Did **not** verify Play's 16 KB page-size requirement beyond the existing README recipe. - UniFFI-generated Kotlin under `android/sdk/build/` is a build output; not in the tree; not opened. - Device/emulator execution of the live poller was not done; #134's unit test (`WalletChildRefreshLoopTest.kt`) was read as the loop contract, not re-run here.
docs(android): rewrite Android docs to match the tree
All checks were successful
android-ci / android (pull_request) Successful in 10m14s
c65946bfd5
android/README.md, CUPRATE_DAEMON.md and MONERO_BINARIES.md were the
half PR #133 left out. Releases are two manual dispatches, not a push
to main; the APK version comes from the tag android-release checks out;
the layout now includes wallet/ and keepalive/; the status line's
sync h/t is documented; the APK poller still calls wallet_status, not
wallet_child_refresh.
sirius merged commit 53b5e6c762 into main 2026-09-20 04:53:13 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/onionwire!135
No description provided.