-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Description
Hi everyone,
Please let us know if this question is posted already in the issues section here in the repository. We have an issue with the application with regards to this request on the Android and Google side to support 16kb page sizes on newer Android mobile devices - https://developer.android.com/guide/practices/page-sizes.
Our application contains native NDK libraries (.so - shared object) libraries, that come from the 3rd party dependencies, which also includes OpenCV library with any version added to the Android project. Based on these requirements, we do not support 16kb ELF assignment, which on Android 16 emulator with 16kb image we are actually getting the dialog warning from the Android operating system.
When testing this on Android 15 emulator with 16kb image (16kb Page Size Google Play ARM Intel x86_64 Atom System Image) we don't get any issues, we are not getting this dialog and everything seems to be working fine.
The issue here is that - and hopefully I am explaining this correctly - on 64-bit environments, the NDK library is updated to the minimum value of 2#**14. However, the problem arises with the 32-bit environments, where the value is less than minimum - 2#**12 (# is used to escape star characters).
We will share the information and the results we got from our APK build with regards to what the load segments show on the logs. There are bunch of libraries that will either have to be updated or completely replaced because of this requirement, but fell free to focus only on libopencv_v4.so library.
The zipalign test showed that the library verification was successful, but we are still getting this dialog warning for Android 16 emulator devices.
Can you please check and test this integration for those Android 16 emulator devices and see if the issues arise on your side as well? Are there any plans to address this 16kb page size issues in the future versions of the library?
Thanks for all the help.
16kb test for ndk libraries.txt
in OpenCV module build.gradle file:
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_shared", "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
targets "opencv_jni_shared"
}
}
with Android Gradle Plugin version 8.9.0 and Gradle version 8.11.1
