fix(android): align ELF segments to 16 KB pages for Android 15+ compliance (closes #605) #607
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the Android build process for J2V8 to ensure that all generated ELF binaries are properly aligned to 16 KB page boundaries. This change is necessary to meet new requirements for Android 15+ (API level 35 and above), as outlined in Issue #605. Specifically, I added the linker flag -Wl,-z,max-page-size=16384 to both the CMake and Android.mk build scripts. With these updates, all native libraries produced for Android will be compatible with the upcoming 16 KB page size mandate from Google Play, helping prevent installation or runtime issues on newer devices.
To verify the fix, I rebuilt the native libraries for all Android ABIs and used the recommended alignment check script to confirm that each .so file is now correctly aligned. No other changes were made outside of what was needed for this compliance update. If any further testing or tweaks are needed, please let me know!
#605