ADFA-4729: Keep native libs compressed in CI debug APKs - #1532
Conversation
The app manifest hard-codes extractNativeLibs="true" (the installer must materialize libs in nativeLibraryDir, e.g. libshizuku.so is an executable run from there), which overrides the useLegacyPackaging DSL - so AGP already packages lib/*.so deflate-compressed in every APK, debug included. But the CI-only debug recompressApk pass kept "so" in its no-compress list and silently re-stored them, making CI debug APKs ~5.9 MB larger than locally built ones. Drop "so" from noCompressDebug, matching the release fix from ADFA-2306. Verified: CI-simulated v8 debug APK has all 11 libs deflated (8.07 MB -> 1.75 MB) and installs/launches cleanly on an arm64 emulator; locally built debug APKs are byte-identical to before (they never run recompressApk). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 Walkthrough
WalkthroughThe change updates CI debug APK packaging so native ChangesNative library packaging
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes ADFA-4729.
What
CI-built debug APKs now keep their native libs deflate-compressed, shrinking them by ~5.9 MB (v8: 8.07 MB -> 1.75 MB of
lib/). One-line fix plus comments/docs: drop"so"fromnoCompressDebug, the exclusion list used by the CI-only debugrecompressApkpass.Root cause
The app manifest hard-codes
android:extractNativeLibs="true"(required — the installer must materialize libs innativeLibraryDir; e.g.libshizuku.sois an executable the adb shell runs from there). That attribute overrides thejniLibs.useLegacyPackagingDSL, so AGP already packageslib/<abi>/*.sodeflate-compressed in every APK — locally built debug APKs included (verified byte-identical against a pre-change test-farm APK). The only APKs with uncompressed libs were the ones that went throughrecompressApkwith"so"in its no-compress list: release (fixed in ADFA-2306 / #1527) and CI debug (this PR).ARCHITECTURE.md's native-lib-compression bullet is rewritten to document the real mechanism: the manifest attribute is the operative fact, and the
recompressApkno-compress lists are the trap that can silently undo AGP's compression.Verification
GITHUB_ACTIONS=true ./gradlew :app:assembleV8Debug): all 11.soentries deflated (8,072,840 -> 1,745,413 bytes),extractNativeLibs=true; APK installs on an arm64 emulator, installer extracts all 11 libs tonativeLibraryDir, app launches with a project open and zeroUnsatisfiedLinkError.recompressApk).🤖 Generated with Claude Code