Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update amazon-chime-sdk native Libraries for 16KB Page Size Compatibility on Android #642

Open
chorniyn opened this issue Dec 20, 2024 · 0 comments
Labels
feature-request New feature or request

Comments

@chorniyn
Copy link

Description

The software.aws.chimesdk:amazon-chime-sdk:0.23.0 for Android includes native libraries that are incompatible with the 16KB page size requirement for Android apps. Specifically, the following libraries do not meet the alignment requirements:

  • librsjni.so
  • librsjni_androidx.so
  • libRSSupport.so

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 2**14. If any load segments are 2**13, 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:

  • librsjni.so:
    LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**12
    LOAD off 0x000000000000ed00 vaddr 0x000000000000fd00 paddr 0x000000000000fd00 align 2**12

  • librsjni_androidx.so:
    LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**12
    LOAD off 0x0000000000007000 vaddr 0x0000000000007000 paddr 0x0000000000007000 align 2**12
    LOAD off 0x0000000000010000 vaddr 0x0000000000010000 paddr 0x0000000000010000 align 2**12

  • libRSSupport.so:
    LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**12
    LOAD off 0x000000000015d500 vaddr 0x000000000015e500 paddr 0x000000000015e500 align 2**12

Request

One of the following is appreciated:

  1. Layout the way how to use existing Chime library in the Android app to be compliant with the 16kb devices (is it possible/safe to replace the native libraries with their 16kb-device-compliant versions)
  2. Update the chime-sdk library to use the 16kb-device-compliant native libraries
@chorniyn chorniyn added the feature-request New feature or request label Dec 20, 2024
@chorniyn chorniyn changed the title Update amazon-chime-sdk тative Libraries for 16KB Page Size Compatibility on Android Update amazon-chime-sdk native Libraries for 16KB Page Size Compatibility on Android Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant