feat(android): installable demo APK exercising the Rust JNI core

Add android/demo — a minimal, dependency-free app (plain Android Views,
no Gradle/AGP/AndroidX/Compose) that calls the Phase-4 JNI core on-device
and displays the results. build-apk.sh drives the SDK build-tools directly
(aapt2 -> javac -> d8 -> zip -> zipalign -> apksigner), compiling against
android.jar alone so it needs no network and tolerates a very new system
JDK by routing the SDK tools through a JDK <= 21.

The app has three buttons -> platformFromUrl/platformDirName, classifyError,
and vttParse, each calling libcatacomb_core.so and showing the JSON.

Verified on an Android 14 (API 34) x86_64 emulator: installs, launches,
loads the .so, and returns correct JSON on-device
({"dir_name":"channels","display_name":"YouTube","icon":"..."} for a
YouTube URL). Output APK (out/, git-ignored): catacomb-spike-debug.apk,
v2+v3 signed, minSdk 24, native code for arm64-v8a + x86_64.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Luna 2026-07-03 16:33:51 -07:00
parent 9a613239f2
commit 1790fd1a22
7 changed files with 362 additions and 0 deletions

View file

@ -18,6 +18,15 @@ Phases 2/3/5 require a physical Android device with a logged-in Google session
environment. Phase 4 — the "shared Rust core" leg the feasibility research
marked **PROVEN** — is fully implemented and verified here.
## Installable demo APK (`demo/`)
[`demo/`](demo/) is a minimal, dependency-free app (plain Android Views, no
Gradle/AGP/Compose) that calls the Phase-4 JNI core on-device and shows the
results. Build it with `demo/build-apk.sh` (drives `aapt2`/`d8`/`zipalign`/
`apksigner` directly) → `demo/out/catacomb-spike-debug.apk`. Verified on an
Android 14 x86_64 emulator: the app launches, loads `libcatacomb_core.so`, and
the JNI calls return correct JSON. See [`demo/README.md`](demo/README.md).
## Phase 4: `rust/catacomb_core`
A `cdylib` that reuses Catacomb's **pure** modules verbatim (`vtt`,