Microsoft Windows [Version 10.0.19045.6332]
(c) Microsoft Corporation. All rights reserved.
d:\16kb>powershell Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6
PS D:\16kb> .\leafy-check-16kb.ps1 -Path "D:\16kb\result.apk" -NdkPath "D:\16kb\android-ndk-r27d"
Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run D:\16kb\leafy-check-16kb.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): R
=== Android NDK 16KB Page Size Checker (Enhanced) ===
Found llvm-readobj: D:\16kb\android-ndk-r27d\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-readobj.exe
Analyzing: D:\16kb\result.apk
Extracting archive...
Found 6 .so file(s) in arm64-v8a folder
Checking: libc++_shared.so
WARNING: No .note.gnu.property section found (may indicate old NDK)
FAIL - See details below:
- p_vaddr (0xD35C8) not aligned to p_align (65536)
- p_offset (0xC35C8) not aligned to p_align (65536)
Checking: libjniPdfium.so
WARNING: No .note.gnu.property section found (may indicate old NDK)
FAIL - See details below:
- p_vaddr (0x1CA30) not aligned to p_align (65536)
- p_offset (0xCA30) not aligned to p_align (65536)
Checking: libmodft2.so
WARNING: No .note.gnu.property section found (may indicate old NDK)
FAIL - See details below:
- p_align (4096) < 16384
- p_vaddr (0x83E08) not aligned to p_align (4096)
- p_offset (0x82E08) not aligned to p_align (4096)
Checking: libmodpdfium.so
WARNING: No .note.gnu.property section found (may indicate old NDK)
FAIL - See details below:
- p_align (4096) < 16384
- p_vaddr (0x4DFBB0) not aligned to p_align (4096)
- p_offset (0x4DEBB0) not aligned to p_align (4096)
Checking: libmodpng.so
WARNING: No .note.gnu.property section found (may indicate old NDK)
FAIL - See details below:
- p_align (4096) < 16384
- p_vaddr (0x34588) not aligned to p_align (4096)
- p_offset (0x33588) not aligned to p_align (4096)
Checking: libsqlcipher.so
WARNING: No .note.gnu.property section found (may indicate old NDK)
FAIL - See details below:
- p_align (4096) < 16384
- p_vaddr (0x372228) not aligned to p_align (4096)
- p_offset (0x370228) not aligned to p_align (4096)
= * 80
FINAL RESULT
= * 80
FAILED: 6 non-compliant file(s):
- libc++_shared.so
- libjniPdfium.so
- libmodft2.so
- libmodpdfium.so
- libmodpng.so
- libsqlcipher.so
Required fixes:
1. Update to NDK 27+ which has proper 16KB alignment support
2. Add -Wl,-z,max-page-size=16384 to your linker flags
3. Recompile all native libraries
4. Contact third-party library vendors for 16KB-compatible versions
For gradle builds, add to build.gradle:
android.defaultConfig.ndk.abiFilters 'arm64-v8a'
android.defaultConfig.externalNativeBuild.cmake.arguments '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON'
PS D:\16kb> exit
d:\16kb>