high · M8 · MASVS-CODE-1 · PTKD-REVIEW-PLAY-16KB-TOOLCHAIN

    Build tools too old for 16 KB page support

    The project ships native code and pins a build toolchain that does not produce 16 KB-ready libraries. Google Play requires apps that target Android 15 or later, which every upload does now, to support 16 KB memory pages on 64-bit devices: below Android Gradle Plugin 8.5.1 uncompressed native libraries are not aligned on a 16 KB boundary in the package, and NDK r27 or older links them for 4 KB pages unless the 16 KB flag is set.

    How it is exploited

    Not an attack: an app with a small C++ filter library is built with AGP 8.3 and NDK r26. Both libraries and package are laid out for 4 KB pages, so on a 16 KB page phone the library fails to load and the feature crashes, and Play stops accepting updates of apps that target Android 15 or later without 16 KB support.

    Why it matters

    Updates that Google Play will not release, and native features that crash on 16 KB page devices.

    How to fix it

    1. Upgrade the Android Gradle Plugin to 8.5.1 or later (the AGP Upgrade Assistant in Android Studio does it).
    2. Set ndkVersion to r28 or later, or pass -DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON to CMake while you stay on r27.
    3. Replace prebuilt .so files and SDKs with 16 KB-ready versions, then verify the built APK with zipalign -c -P 16 and the APK Analyzer.

    Does your app have this?

    PTKD checks your build or your source project for PTKD-REVIEW-PLAY-16KB-TOOLCHAIN and every other check in this knowledge base.

    Scan your app

    References

    Related checks (M8)