Skip to content

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

Open
@chorniyn

Description

@chorniyn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions