2 Commits
Author SHA1 Message Date
irisandClaude Opus 5 c6da735134 docs/RUST.md: the ABI-cache half of the build-apk.sh box is done (4f6ec3a)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 11:17:15 -04:00
irisandClaude Opus 5 4f6ec3a900 iris-android-app: clear Gradle's native-libs cache, so an ABI switch takes
`build-apk.sh` already removed `app/src/main/jniLibs` before each build,
with its own comment saying why. It does not reach Gradle's own copy:
`mergeReleaseNativeLibs` is up to date against its cached inputs, so a
build that switches ABI packages the previous one. An `--abi x86_64`
release APK containing `lib/arm64-v8a/libmain.so` installed fine and
aborted at startup with `Could not get adapter!: NotFound {
active_backends: VULKAN }` under libndk_translation -- which reads
exactly like the phone's own Vulkan problem and is nothing of the kind.
It cost an hour on 2026-09-07 and was written down rather than fixed.

Scoped to the three native-lib directories rather than all of
app/build, so an ABI change costs the native merge and not the whole
Gradle build. Verified on the case that produced it: this checkout held
an x86_64 libmain.so from emulator work, and `./build-apk.sh release
--abi arm64-v8a` produced an APK whose only .so is
lib/arm64-v8a/libmain.so (7,518,840 bytes) -- that APK is
ai-app-bench a012ff9.

docs/RUST.md's queue box keeps its second half open: the 648 MB debug
bench APK still will not install.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 11:17:07 -04:00
2 changed files with 25 additions and 3 deletions

No files matched your search

+13 -3
View File
@@ -725,9 +725,19 @@ closes it.
`log_upload`, `POST /client-log` and the `AI_APP_LOG_*` baking went out `log_upload`, `POST /client-log` and the `AI_APP_LOG_*` baking went out
whole rather than being rewired first -- done the same day, "Phone whole rather than being rewired first -- done the same day, "Phone
logging" above. `build.rs` had nothing left to do and is gone with them. logging" above. `build.rs` had nothing left to do and is gone with them.
- [ ] `iris/android-app/build-apk.sh`: clear Gradle's merged-native-libs - [~] `iris/android-app/build-apk.sh`. **First half done 2026-09-08**
cache when the ABI changes (the x86_64 trap), and make the debug bench (4f6ec3a): the script now removes `merged_native_libs`,
APK installable (648 MB) -- RUST.md's logging section names both. `stripped_native_libs` and `merged_jni_libs` alongside
`app/src/main/jniLibs`, since `mergeReleaseNativeLibs` is up to date
against its cached inputs and `rm -rf jniLibs` does not reach them.
Scoped to those three rather than all of `app/build`, so an ABI change
costs the native merge and not the whole Gradle build. Verified on the
case that produced it -- an x86_64 lib left in the checkout from
emulator work, then `./build-apk.sh release --abi arm64-v8a`, whose
APK's only `.so` is `lib/arm64-v8a/libmain.so`. **Still open**: the
debug bench APK is 648 MB and will not install
(`INSTALL_PARSE_FAILED_NOT_APK`), because the debug `libmain.so` is
325 MB; use `release` on the emulator until that is fixed.
- [ ] Input-event and timing instrumentation into the log ring, copied - [ ] Input-event and timing instrumentation into the log ring, copied
by the report button. After the logging route lands (same ring). by the report button. After the logging route lands (same ring).
- [x] **Catch-a-fling (done 2026-09-07, b87f5a5; verified and ticked - [x] **Catch-a-fling (done 2026-09-07, b87f5a5; verified and ticked
+12
View File
@@ -57,6 +57,18 @@ export ANDROID_NDK_HOME="$NDK_DIR"
# finds -- a debug x86_64 emulator build left behind made an arm64 "release" # finds -- a debug x86_64 emulator build left behind made an arm64 "release"
# 339 MB on 2026-09-06. # 339 MB on 2026-09-06.
rm -rf app/src/main/jniLibs rm -rf app/src/main/jniLibs
# ...and Gradle's own copy of them, which `rm -rf jniLibs` does not reach.
# `mergeReleaseNativeLibs` is *up to date* against its cached inputs, so a
# build that switches ABI packages the previous ABI: an `--abi x86_64`
# release APK containing `lib/arm64-v8a/libmain.so` installed fine and
# aborted at startup with `Could not get adapter!: NotFound {
# active_backends: VULKAN }` under libndk_translation -- which reads
# exactly like the phone's own Vulkan problem and is nothing of the kind.
# Scoped to the merge task's directory rather than all of `app/build`, so
# an ABI change costs the native merge and not the whole Gradle build.
rm -rf app/build/intermediates/merged_native_libs \
app/build/intermediates/stripped_native_libs \
app/build/intermediates/merged_jni_libs
echo "build-apk.sh: cargo ndk -t $ABI build ${BUILD_TYPE:+(${BUILD_TYPE})} --features \"$FEATURES\"" echo "build-apk.sh: cargo ndk -t $ABI build ${BUILD_TYPE:+(${BUILD_TYPE})} --features \"$FEATURES\""
if [ "$BUILD_TYPE" = "release" ]; then if [ "$BUILD_TYPE" = "release" ]; then
cargo ndk -t "$ABI" -P 29 -o app/src/main/jniLibs/ build --release --features "$FEATURES" cargo ndk -t "$ABI" -P 29 -o app/src/main/jniLibs/ build --release --features "$FEATURES"