Skip to content

Native libraries are not 16 KB page aligned #656

Description

@TomBeckett

Summary

When integrating the Zenoh Kotlin Android dependency into an Android app, Android Studio reports the following lint warning:

Aligned16KB

Android has traditionally used 4 KB memory page sizes. However, to support future devices that only work with 16 KB aligned libraries apps containing native libraries need to be built with 16 KB alignment.

This appears to come from the native .so libraries bundled with Zenoh Kotlin.

Why this matters

Google is moving Android toward support for devices using 16 KB memory page sizes. Native libraries built with only 4 KB alignment may fail or behave incorrectly on future devices.

See Android 16 KB page size support documentation

Expected behavior

All native libraries included in the Zenoh Kotlin Android artifacts should be built with 16 KB page alignment so Android Studio lint passes cleanly and apps remain compatible with future Android devices.

Current behavior

Android Studio reports Aligned16KB warnings for Zenoh native libraries included transitively by the dependency.

Request

Could the Android native libraries be rebuilt/configured with 16 KB page alignment support?

For example, this may require linker flags such as:

-Wl,-z,max-page-size=16384

depending on the build system/toolchain being used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions