Skip to content

The native library arm64-v8a/libmodft2.so is not 16 KB aligned #97

Open

Description

@shakht

The native library arm64-v8a/libmodft2.so (from com.github.barteksc:pdfium-android:1.9.0) is not 16 KB aligned Toggle info (Ctrl+F1)
Inspection info: Android has traditionally used 4 KB memory page sizes. However, to support future devices that only work with 16 KB aligned libraries apps containing native libraries need to be built with 16 KB alignment.

Apps with 4 KB aligned native libraries may not work correctly on devices requiring 16 KB alignment. To ensure compatibility and future-proof your app, it is strongly recommended that your native libraries are aligned to 16 KB boundaries.

If your app uses any NDK libraries, directly or indirectly through an SDK, you should rebuild your app to meet this recommendation. Make sure all native libraries within your application, including those from dependencies, are built with 16 KB page alignment.

This lint check looks at all native libraries that your app depends on. If any are found to be aligned to 4 KB instead of 16 KB, you will need to address this.

When a library is flagged, first try to update to a newer version that supports 16 KB alignment. If an updated version is not available, contact the library vendor to ask about their plans for 16 KB support and request a compatible version. Updating your libraries proactively will help ensure your app works properly on a wider range of devices.

Issue id: Aligned16KB

More info:
https://developer.android.com/guide/practices/page-sizes

Activity

  1. andrewKarachun0304 commented on Sep 17, 2025

    @andrewKarachun0304

    Hello, please tell me if there are plans to update in the near future with support for 16KB?

  2. Wangyamei commented on Sep 18, 2025

    @Wangyamei

    +1
    arm64-v8a/libmodft2.so、arm64-v8a/libmodpdfium.so、arm64-v8a/libmodpng.so
    armeabi-v7a/libmodft2.so、armeabi-v7a/libmodpdfium.so、armeabi-v7a/libmodpng.so、armeabi-v7a/libc++_share.so、armeabi-v7a/libjniPdfium.so all not 16 KB aligned。

    please tell me if there are plans to update in the near future with support for 16KB?

  3. amishsxt commented on Sep 25, 2025

    @amishsxt

    any update?? :{

  4. shakht commented on Sep 25, 2025

    @shakht
    Author

    @andrewKarachun0304, @Wangyamei, @amishsxt
    well, based on number of issues still open, i think there are no update in near future.

  5. andrewKarachun0304 commented on Sep 25, 2025

    @andrewKarachun0304

    Hello everyone, I found a solution, using the code from this repository I rebuilt the library for my application
    #95 (comment)

    @andrewKarachun0304, @Wangyamei, @amishsxt well, based on number of issues still open, i think there are no update in near future.

    +1 arm64-v8a/libmodft2.so、arm64-v8a/libmodpdfium.so、arm64-v8a/libmodpng.so armeabi-v7a/libmodft2.so、armeabi-v7a/libmodpdfium.so、armeabi-v7a/libmodpng.so、armeabi-v7a/libc++_share.so、armeabi-v7a/libjniPdfium.so all not 16 KB aligned。

    please tell me if there are plans to update in the near future with support for 16KB?

    any update?? :{

  6. Wangyamei commented on Sep 25, 2025

    @Wangyamei

    +1 arm64-v8a/libmodft2.so、arm64-v8a/libmodpdfium.so、arm64-v8a/libmodpng.so armeabi-v7a/libmodft2.so、armeabi-v7a/libmodpdfium.so、armeabi-v7a/libmodpng.so、armeabi-v7a/libc++_share.so、armeabi-v7a/libjniPdfium.so all not 16 KB aligned。

    please tell me if there are plans to update in the near future with support for 16KB?


    hello everyone, I'm going to try rebuild the native code myself.

  7. Xneutral commented on Oct 4, 2025

    @Xneutral

    Check out my git repo, I have build the .so files with 16Kb page size, include them as a module...
    https://github.com/Xneutral/MyPdfViewer16KB

  8. marain87 commented on Oct 6, 2025

    @marain87

    ref to #93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions