Recompile your app with 16 KB native library alignment

Hi! I have the exact same problem with you. Have you already know where the listed .so files comes from? By which library?

base/lib/arm64-v8a/libtobEmbedPagEncrypt.so
base/lib/arm64-v8a/libpglarmor.so
base/lib/arm64-v8a/libnms.so

It is really important to me. Please! Help!

Do you happen to use the Appodeal Plugin? I tried removing this plugin as a test, and the problem disappeared.

Hi Scott, I hope you’re doing well. I was wondering if you’ve had any further findings or updates regarding the Appodeal-related issue discussed earlier. Any insight you could share would be greatly appreciated. Thank you again for your time and support!

In the process of updating appodeal

2 Likes

I’m wondering if I need to align to 16KB for 32-bit as well?

After investigating, I feel that we shouldn’t compile the 32-bit *.so file (ELF) to 16KB for the following reasons, in order to maintain maximum compatibility:

  1. regarding to Support 16 KB page sizes mentions 64-bit devices and only arm64-v8a or x86_64 libraries need to be recompile.

    Starting November 1st, 2025, all new apps and updates to existing apps submitted to Google Play and targeting Android 15+ devices must support 16 KB page sizes on 64-bit devices.

    1. If any arm64-v8a or x86_64 shared libraries are UNALIGNED , you’ll need to update the packaging for those libraries, then recompile your app and retest by following the steps in this section.
  2. The NDK Changelog r28

    PAGE_SIZE is no longer defined by default for arm64-v8a or x86_64.

    The default alignment of shared libraries for arm64-v86 and x86_64 is now 16k.

    And the libc++_shared.so inside the 28.1.13356709/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib have 2**12 on arm/i686 and 2**14 on aarch64/x86_64.

  3. From 16 KB page size

    16 KB pages are only supported on arm64 targets with 16 KB kernels.

  4. Also Is the 16KB alignment requirement for 64 bit ABIs?

So should we adjust the align to 16KB for all core *.so and plugin *.so to 64-bit only?
And another issue is that recent 16KB commits may have inadvertently specified that other platforms also align to 16KB, which 16KB requirement is only for Android and the others should be left as is.
What do you think? @Scott_Harrison @vlads @StarCrunch