Problem
Android 15+ devices with 16 KB page sizes cannot load native libraries whose ELF LOAD segments are only 4 KB aligned. Starting November 2025, Google Play requires all apps targeting Android 15+ to support 16 KB page sizes.
Currently all four native libraries produce alignment warnings:
libUVCCamera.so
libjpeg-turbo1500.so
libusb100.so
libuvc.so
Solution
Add the following to lib/src/main/jni/Application.mk:
APP_LDFLAGS := -Wl,-z,max-page-size=16384
This forces the linker to align all LOAD segments to 16 KB boundaries, making the libraries compatible with both 4 KB and 16 KB devices.
Verification
After rebuilding, verify with:
readelf -lL libUVCCamera.so | grep LOAD
All LOAD segments should show Align: 0x4000 (16384 bytes).
References
Problem
Android 15+ devices with 16 KB page sizes cannot load native libraries whose ELF LOAD segments are only 4 KB aligned. Starting November 2025, Google Play requires all apps targeting Android 15+ to support 16 KB page sizes.
Currently all four native libraries produce alignment warnings:
libUVCCamera.solibjpeg-turbo1500.solibusb100.solibuvc.soSolution
Add the following to
lib/src/main/jni/Application.mk:APP_LDFLAGS := -Wl,-z,max-page-size=16384This forces the linker to align all LOAD segments to 16 KB boundaries, making the libraries compatible with both 4 KB and 16 KB devices.
Verification
After rebuilding, verify with:
readelf -lL libUVCCamera.so | grep LOADAll LOAD segments should show
Align: 0x4000(16384 bytes).References