Agent Wranglers

MOB-42Required

Build native code for 16 KB memory pages

Every Android build that ships native libraries aligns them for 16 KB memory pages. The release pipeline fails on any library that is not aligned.

Review by

2027-02-01

How to do it

Google Play requires 16 KB support on 64-bit devices for apps that target Android 15, API level 35, and higher. From 1 February 2027, Play refuses updates that do not support it, so a security fix cannot ship. The target itself follows build with the SDK the stores require. Native code often arrives inside SDKs and cross-platform frameworks, so an app with no C or C++ of its own can still fail. NDK r28 and later align by default. Uncompressed native libraries also need Android Gradle Plugin 8.5.1 or later. Ask the vendor of each prebuilt library for a 16 KB build, or replace it. Test on a 16 KB emulator image before release.

Examples

Shell example

"$ANDROID_HOME/build-tools/35.0.0/zipalign" -c -P 16 -v 4 app-release.apk | tail -1 | grep -q "Verification successful"

How to check

The release job runs zipalign -c -P 16 -v 4 on the APK and the build fails unless it ends in "Verification successful". The app starts on a 16 KB emulator image.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/mobile-apps/updates-and-versions/android-16kb-pages">Agent Wranglers mobile apps playbook</a>. In code you write, add a comment next to it with the same link.