Feature: Support 16 KB page sizes
Describe the bug/feature request/question We need a library that is aligned for 16KB memory pages as described here
https://developer.android.com/guide/practices/page-sizes
Do you think you might have an updated version with this kind of support?
Version 0.1.1 with 16kb was released in Sept 2024.
https://github.com/scottyab/rootbeer/releases/tag/0.1.1
In my report I still see
/var/folders/95/7vdyp6cx38g4481n1t40zj8h0000gn/T/app-prod-debug_out_XXXXX.AS3CypP3ir/lib/x86/libtoolChecker.so: \e[31mUNALIGNED\e[0m (2**12)
Will this be fixed when
https://github.com/scottyab/rootbeer/pull/244
is merged? will there be another version released?
Hi, Same here. I have upgraded RootBeer to 0.1.1 But still found it is UNALIGNED
/var/folders/97/rrwwqgc138s466tqfbsbr3c80000gn/T/app-debug_aligned_out_XXXXX.lKQRG43oGO/lib/armeabi-v7a/libtoolChecker.so: \e[31mUNALIGNED\e[0m (2**12)
Update: Fixed it using 0.1.1.
@corepuncher It's already done. See https://github.com/scottyab/rootbeer/issues/241#issuecomment-2604281957
People complaining about x86 and armeabi-v7a libraries being unaligned haven't read the docs and/or the output from check_elf_alignment.sh:
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...
only arm64-v8a/x86_64 libs need to be aligned
@liamjones thanks for pointing out the mistake. I can confirm this is the case. Thanks for the support
@corepuncher It's already done. See #241 (comment)
People complaining about
x86andarmeabi-v7alibraries being unaligned haven't read the docs and/or the output fromcheck_elf_alignment.sh: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...
only arm64-v8a/x86_64 libs need to be aligned
The problem is that even when I submit builds that include x86 and armeabi‑v7a libraries to Google Play, it still warns that we don’t meet the 16 KB page‑size requirement. Should I ignore the warning, or filter out x86 and armeabi‑v7a?
@0x0BB9 Interesting, I've not got to submission yet on our apps. Are you submitting AABs or APKs? If it's APKs, are they split by ABI? If it was a universal APK, or, if it were split APKs and your 64-bit APKs were ending up with 32-bit libraries inside them somehow I can see how it'd probably still complain.
It might be worth querying with Google's dev support?
@0x0BB9 Interesting, I've not got to submission yet on our apps. Are you submitting AABs or APKs? If it's APKs, are they split by ABI? If it was a universal APK, or, if it were split APKs and your 64-bit APKs were ending up with 32-bit libraries inside them somehow I can see how it'd probably still complain.
It might be worth querying with Google's dev support?
@liamjones AABs, not APKs.
Any updates on this issue? i am facing this issue too.
up
Any updates on this issue? i am facing this issue too.
Hi all, is anyone able to solve the issue? Mind to share the solution. Thanks 😊
Update: fix it by adding the following configuration in build.gradle
packagingOptions { jniLibs {useLegacyPackaging true}}
or upgrade the Gradle version to 8.5 or above.
Update: fix it by adding the following configuration in build.gradle
packagingOptions { jniLibs {useLegacyPackaging true}}or upgrade the Gradle version to 8.5 or above.
the configuration above is to disable the apk to support 16kb? Please correct if I'm wrong. If yes, will it be rejected by google playstore?
There was a problem in the Android Studio, that make the "Analyze APK" give the 16 KB warning. In the new version(Narwhal 3 Feature Drop | 2025.1.3) this issue is solved. The issue: https://issuetracker.google.com/issues/432782053
The problem with the library isn't fixed, the deadline imposed by Play Store is near.
This is the warning from PlayStore for our app:
The librealmc.so is related to rootbeer:
The librealmc.so is related to rootbeer
@maavalos I'm not sure why you think that, rootbeer only produces a libtoolChecker.so: https://github.com/scottyab/rootbeer/blob/eff976a9eec1706957b2fa594672105fa9c3fa1e/rootbeerlib/src/main/cpp/CMakeLists.txt#L12
From a quick web search it looks like it's from realm-kotlin? https://github.com/realm/realm-kotlin/issues/1202
Over there, that was fixed and released in realm-kotlin 2.3.0: https://github.com/realm/realm-kotlin/pull/1834
Hey guys i added rootbeer as a module in my app and did the following changes and it seems to work for me, if anyone want's to give it a shot as well
in the file CMakeLists.txt
if(ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-z,max-page-size=16384")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,max-page-size=16384")
endif()
in the file RootBeerTest.java
from
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyString;
changed it to
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
if anyone gives it a shot and it works for him as well let me know so i can open a pull request and maybe get approved!