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

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.
This commit is contained in:
agent 2026-09-20 00:52:43 -04:00
commit e2c77da6bc
No known key found for this signature in database
3 changed files with 308 additions and 78 deletions

View file

@ -1,22 +1,28 @@
# Bundled native executables (`jniLibs`)
The wallet screen starts an **app-owned `monero-wallet-rpc` child** (issue #107,
`src/wallet_child.rs`). Monero ships no Android binaries, so this repository
carries one, built here.
[`src/wallet_child.rs`](../src/wallet_child.rs)). Monero ships no Android
binaries, so this repository carries one, built here.
| | |
|---|---|
| File in the tree | `android/app/src/main/jniLibs/arm64-v8a/libmonerowalletrpc.so` |
| Bytes | 19 954 224 (stripped) |
| sha256 | `d9126788030ecd1ccdb40c7764e66e9a14d158a147ad335b256f0577681b5ad4` |
| Format | `ELF 64-bit LSB shared object, ARM aarch64, dynamically linked, interpreter /system/bin/linker64, for Android 21, built by NDK r17b` |
| Format | `ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker64, for Android 21, built by NDK r17b (4828580), stripped` |
| Needed libs | `libc.so`, `libm.so`, `libdl.so` — everything else is static |
| Source | `https://github.com/monero-project/monero` |
| Tag | `v0.18.4.4` |
| Commit | `516e5355a103a2bf0b7e10328ebcaa2945019445` |
| Commit | `516e5355a103a2bf0b7e10328ebcaa2945019445` (peeled annotated tag) |
| Reproduce with | `scripts/build-monero-wallet-rpc-android.sh` |
| Verified by | `android/monero-binaries.sha256`, checked by `scripts/build-android-local.sh` on every build (local and CI) |
Re-checked on this tree (`fa0e4b2`): `stat -c %s` is 19954224; `sha256sum` of the
blob equals the hash above and equals the line in `android/monero-binaries.sha256`
(that file's path is relative to `android/`:
`app/src/main/jniLibs/arm64-v8a/libmonerowalletrpc.so`). `readelf -d` NEEDED is
`libdl.so`, `libm.so`, `libc.so`.
Only `arm64-v8a` is built. `-Ponionwire.abis=x86_64` produces an APK with no
wallet binary in it — the screen says so (`NO_WALLET_RPC_MESSAGE`) instead of
offering a Start that cannot work.
@ -28,8 +34,10 @@ cross-compile path — `contrib/depends` (boost, openssl, libunbound, libzmq,
libsodium, ncurses, readline, libiconv, expat for `aarch64-linux-android`) plus
the `toolchain.cmake` it emits — and then builds the single CMake target
`wallet_rpc_server`. It takes ~40 min on 12 cores and needs ~15 GB of scratch
space. It is **not** part of the CI path: CI here runs on a Raspberry Pi and the
Gradle build is already ~9 minutes. CI verifies the committed bytes instead.
space. It is **not** part of the CI path: the Android Gradle jobs already run
on `docker-amd64` for ~9 minutes with warm volumes, and rebuilding Monero's C++
tree is a separate 30–45 min host job. CI verifies the committed bytes instead
(`sha256sum -c` plus the APK-entry check in `scripts/build-android-local.sh`).
Four things about the build are worth writing down, because each one is a
failure that looks like something else:
@ -83,6 +91,11 @@ shipped blob** and the thing CI re-verifies — not a reproducible-build
assertion. If you rebuild, update both `android/monero-binaries.sha256` and this
table in the same commit, and say what changed in the tag or the toolchain.
The reproduce script pins **the tag** (`MONERO_TAG=v0.18.4.4`, shallow clone).
The commit in the table is the peeled object of that annotated tag on GitHub,
recorded here so a rebuild can be compared; it is not a second pin in the
script.
## Why it is a `jniLibs` `.so` and not an asset
Since Android 10 (API 29) an app may not `exec()` a file in its own data
@ -108,6 +121,8 @@ AGP's strip pass cannot rewrite the bytes that CI verifies.
Cost: the release APK grows from ~9 MB to ~28 MB (the binary is deflate-stored
at 6.9 MB) and installs ~20 MB into the app's native library directory.
(Those packaging sizes are the original measurement when the blob landed; the
committed blob's **uncompressed** size is the 19 954 224 bytes above.)
## `arti` is NOT bundled
@ -116,8 +131,7 @@ daemon, and `ChildConfig::validate` requires a non-empty `arti_bin` for any
chain source that is not receive-only. There is no `arti` executable in this
build, and producing one (a standalone `arti` binary for
`aarch64-linux-android`, from a crate the Rust side does not currently build as
a bin) is a follow-up, not something this card could do without editing
`Cargo.toml`/`crates/**`.
a bin) is a follow-up, not something this document can invent.
What the app does about it, honestly:
@ -133,9 +147,9 @@ So today: **loopback and clearnet daemons work; `.onion` daemons do not.**
## Verification in CI
`.forgejo/workflows/android-ci.yml` builds the APK on every `android/**` PR and
`scripts/build-android-local.sh` does the checking, so both CI jobs and local
builds get it:
`.forgejo/workflows/android-ci.yml` (and `android-release.yml`) build the APK on
`docker-amd64` and `scripts/build-android-local.sh` does the checking, so both
CI jobs and local builds get it:
1. before Gradle, `sha256sum -c android/monero-binaries.sha256` against the
committed blob;
@ -171,8 +185,7 @@ at the arti notice above.
The third chain source — Cuprate's chain daemon running inside the OnionWire
process — is a **linked feature of the SDK's `.so`**, not a `jniLibs` executable,
so it has its own record: `android/CUPRATE_DAEMON.md` (feature wiring, the NDK C++
/ compiler-rt link line, the CI check that greps the shipped `.so` for a
cuprated-only string, and what has not been verified). `monero-wallet-rpc` above
stays a child process for it — Cuprate has no wallet layer.
so it has its own record: [CUPRATE_DAEMON.md](CUPRATE_DAEMON.md) (feature wiring,
the NDK C++ / compiler-rt link line, the CI check that greps the shipped `.so`
for a cuprated-only string, and what has not been verified). `monero-wallet-rpc`
above stays a child process for it — Cuprate has no wallet layer.