build: bump NDK to r28 for 16 KB page-size compliance (conflict resolution) - #217
Merged
ErikBjare merged 2 commits intoAug 8, 2026
Merged
Conversation
Google Play rejects app updates without 16 KB page-size support since Nov 2025. The aw-server-rust native libs were built with NDK r25, which links LOAD segments 4 KB-aligned (verified: 0x1000). NDK r28+ links with -z max-page-size=16384 by default for all Android targets. Also extends scripts/check-jnilibs.py to fail CI when 64-bit libs have LOAD alignment below 0x4000, so an NDK downgrade can't silently regress compliance (mirrors Google's check_elf_alignment semantics: every LOAD segment must be >=16 KB aligned).
… reads Review findings: the gate only checked the hardcoded libaw_server.so while the Makefile also packages libaw_sync.so; and a truncated ELF declaring program headers past EOF crashed struct.unpack instead of reporting a diagnostic. Require both known libs, validate any other packaged *.so, and bounds-check phdr offsets/reads.
Greptile SummaryThe PR upgrades both CI and Gradle to Android NDK r28 and strengthens native-library validation for 16 KB page-size compliance.
Confidence Score: 5/5The PR appears safe to merge; no concrete build, packaging, or runtime defect was identified. The NDK pins are consistent across CI and Gradle, the newly required JNI libraries match the Makefile’s four-ABI output contract, and the ELF parser uses the expected Android ELF layouts and alignment criterion. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
CI[CI build] --> NDK[Install NDK r28]
NDK --> Rust[Build Rust JNI libraries]
Rust --> JNI[Package JNI libraries for four ABIs]
JNI --> Check[Run check-jnilibs.py]
Check --> ELF[Validate ELF structure]
ELF --> Align{64-bit PT_LOAD alignment >= 16 KB?}
Align -->|Yes| Artifact[Upload and package JNI artifacts]
Align -->|No| Fail[Fail build]
Reviews (1): Last reviewed commit: "fix(check-jnilibs): also validate libaw_..." | Re-trigger Greptile |
Open
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Conflict resolution from #213 — rebased onto current master.
This PR resolves the merge conflict that blocked #213. The changes are identical to #213 (bump NDK r25→r28, add ELF alignment check in
scripts/check-jnilibs.py); only the rebase onto the updated master head was needed to clear the conflict.Closes #213 — Erik can review and merge this instead of the conflicting original.
Why a separate PR:
TimeToBuildBobdoesn't have write access toActivityWatch/aw-androidbranches, so the conflict-resolved head was pushed to the fork and opened as a new PR rather than force-pushing the original branch.