pdfium-lib icon indicating copy to clipboard operation
pdfium-lib copied to clipboard

16 KB page size support

Open silkdata-victor-semenovich opened this issue 10 months ago • 2 comments

Hello. Do you have plans to support 16 KB page size devices for Android? I've tried to use the .so files from the latest release 6694 on the emulator with Android 15 and 16 KB page size support, but faced the following issue:

Native libraries failed to load java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in "/data/app/~~Xzb4Ucvg6WPgRY4v3ls2JA==/<app.package.name>-BQaZrWH1TUrJR5FkT-NgjA==/base.apk!/lib/arm64-v8a/libpdfiumandroid.so" (new hash type from the future?) I'm not quite sure if this is about the 16 KB pages support, but everything works fine on old emulators.

More info about the Android 16 KB page size support: https://developer.android.com/guide/practices/page-sizes https://android-developers.googleblog.com/2024/08/adding-16-kb-page-size-to-android.html

Hi,

I will try compile with these flags and post results here.

Thanks.

paulocoutinhox avatar Jan 08 '25 20:01 paulocoutinhox

Hi,

I think that is was solved in latest version.

In the chromium source code it already have support for 16kb memory page size: https://github.com/chromium/chromium/blob/f326b706fba722464d8db9a0c3e5aee1a04427c8/build/config/android/BUILD.gn#L39-L43

Can you check again using our latest version?

Thanks.

paulocoutinhox avatar Jun 18 '25 04:06 paulocoutinhox

@paulocoutinhox Hi, I don't think this is was solved in latest version. I changed my library to latest version, but still got warnings below in google play console.

base/lib/arm64-v8a/libc++_shared.so base/lib/arm64-v8a/libjniPdfium.so base/lib/arm64-v8a/libmodft2.so base/lib/arm64-v8a/libmodpdfium.so base/lib/arm64-v8a/libmodpng.so base/lib/x86_64/libc++_shared.so base/lib/x86_64/libjniPdfium.so base/lib/x86_64/libmodft2.so base/lib/x86_64/libmodpdfium.so base/lib/x86_64/libmodpng.so

Thank you for your effort

HanDongWook avatar Oct 31 '25 05:10 HanDongWook

What library exactly?

Because i tested and it pass:

python3 main.py --package /Users/paulo/Downloads/release\ 2/lib/arm64-v8a/libpdfium.so --readelf /opt/homebrew/Cellar/binutils/2.45/bin/readelf
Summary (last LOAD per .so - 64-bit only):
- /Users/paulo/Downloads/release 2/lib/arm64-v8a/libpdfium.so -> 16384 -> COMPLIANT (16384 bytes)
python3 main.py --package /Users/paulo/Downloads/release\ 2/lib/x86_64/libpdfium.so  --readelf /opt/homebrew/Cellar/binutils/2.45/bin/readelf
Summary (last LOAD per .so - 64-bit only):
- /Users/paulo/Downloads/release 2/lib/x86_64/libpdfium.so -> 16384 -> COMPLIANT (16384 bytes)

Try this tool to understand what exactly is wrong: https://github.com/paulocoutinhox/android-16kb-validator

paulocoutinhox avatar Oct 31 '25 14:10 paulocoutinhox

Hi,

It was solved?

Did you test the latest version?

Thanks.

paulocoutinhox avatar Dec 01 '25 17:12 paulocoutinhox