
Prepare your apps for Google Play’s 16 KB page size compatibility requirement
4 Sept 2025 · 5 min read
New Android devices use 16 KB memory pages. Ensure your APKs/AABs and any native libraries are compatible so your app installs and runs flawlessly on modern hardware. Pure Kotlin/Java apps without native deps typically work—but still test on a 16 KB device/emulator. Incompatible apps can fail to install, crash, or degrade performance on devices using 16 KB pages. In Android Studio, open your APK/AAB in APK Analyzer and review the Prepare your apps for Google Play’s 16 KB page size requirement
Who should act
Usually already fine
What’s at risk
Quick checklist (do these)
lib/
for .so
).4096
/PAGE_SIZE
assumptions; query page size at runtime.zipalign
.1) Detect native code fast
lib/
folder. If you see .so
files, you must rebuild them for 16 KB.
2) Update the build stack
Enable flexible page sizes and set linker flags:
3) If you’re temporarily on older NDK
# ndk-build (Application.mk)
APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true
Linker flags
-Wl,-z,max-page-size=16384 -Wl,-z,common-page-size=16384 Review
4) Fix assumptions in code
// ❌ Don’t hardcode 4096 or PAGE_SIZE constants
// ✅ Query at runtime
#include
long ps = sysconf(_SC_PAGESIZE); // or getpagesize()mmap()
, arenas, and page-aligned buffers.
5) Test & verify
adb shell getconf PAGE_SIZE
expected: 16384
- Validate zip alignment:
zipalign -c -P 16 -v 4 app-release.apk
6) Engines & frameworks
- Unity/Unreal: use builds documented as 16 KB-ready.
- Flutter/React Native: update AGP/Gradle; rebuild or update any native plugins.
Common pitfalls
- Using prebuilt vendor
.so
without 16 KB support. - Hardcoded 4 KB assumptions in memory managers or allocators.
- Packaging misalignment (fails on install/run).
- Skipping device testing (emulator only).
Do pure Kotlin/Java apps need changes?
Usually no; still run on a 16 KB environment to catch hidden native deps.
My SDK has a .so
. What now?
Upgrade to a vendor version rebuilt with a recent NDK; you can’t safely patch old binaries yourself.