Describe the feature
Description
The aws-crt-java includes native libraries that are incompatible with the 16KB page size requirement for Android apps. This causes issues when using libraries like https://github.com/aws/aws-iot-device-sdk-java-v2/ (depending on aws-crt-java) for Android projects.
Specifically, at least the libaws-crt-jni.so library doesn't meet the alignment requirements. See the artifact analysis of an Android project using https://github.com/aws/aws-iot-device-sdk-java-v2/releases/tag/v1.27.0.
Background
As outlined in the Android Developer Guide on Page Sizes:
To support 16 KB devices, apps that use native code should complete the steps that are outlined in the following sections. If you update to AGP version 8.5.1 or higher and NDK version r28 or higher, and use 16 KB-compatible prebuilt dependencies, then apps are 16 KB compatible by default.
Additionally:
Check the output lines to ensure that the load segments don't have values less than 214. If any load segments are 213, 2**12, or lower values, you'll need to update the packaging for those libraries, then recompile your app and retest by following the steps in this section.
Source
Observations
Using llvm-objdump to inspect the libraries, the following alignment issues were identified for libaws-crt-jni.so:
LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**12
LOAD off 0x00000000004b4938 vaddr 0x00000000004b5938 paddr 0x00000000004b5938 align 2**12
Request
The following would be much appreciated:
- Please update the aws-crt-java library to use the 16 KB device-compliant native libraries.
- After the above, please get in touch with the maintainers of https://github.com/aws/aws-iot-device-sdk-java-v2 to release a version with the updated version of aws-crt-java to support the Android project in a compliant fashion.
Use Case
We want to update the IoT layer of our application to rely on https://github.com/aws/aws-iot-device-sdk-java-v2 instead of the deprecated https://github.com/aws-amplify/aws-sdk-android.
Describe the feature
Description
The aws-crt-java includes native libraries that are incompatible with the 16KB page size requirement for Android apps. This causes issues when using libraries like https://github.com/aws/aws-iot-device-sdk-java-v2/ (depending on aws-crt-java) for Android projects.
Specifically, at least the
libaws-crt-jni.solibrary doesn't meet the alignment requirements. See the artifact analysis of an Android project using https://github.com/aws/aws-iot-device-sdk-java-v2/releases/tag/v1.27.0.Background
As outlined in the Android Developer Guide on Page Sizes:
Additionally:
Source
Observations
Using llvm-objdump to inspect the libraries, the following alignment issues were identified for
libaws-crt-jni.so:Request
The following would be much appreciated:
Use Case
We want to update the IoT layer of our application to rely on https://github.com/aws/aws-iot-device-sdk-java-v2 instead of the deprecated https://github.com/aws-amplify/aws-sdk-android.