Skip to content

Native libraries are not 16 KB page-aligned (blocks Play updates, warns on Android 15+ devices) #47

Description

@parawanderer
Image

Symptom

On a 16 KB page-size device (reproduced on a Galaxy S25, Android 16), launching a debuggable build shows the system dialog:

Android app compatibility
This warning is showing because this is a debuggable app which is currently being tested.
This app isn't 16 KB-compatible. ELF alignment check failed. Please follow the steps on https://developer.android.com/16kb-page-size

Production builds do not show the dialog — Android only surfaces it for debuggable apps — so this has been invisible until now.

Unaligned libraries

Reported by the dialog. All come from third-party dependencies; none are built by this project.

Library Comes from Currently pinned
libpython3.12.so, libchaquopy_java.so, libsqlite3_chaquopy.so, libssl_chaquopy.so, libcrypto_chaquopy.so, libssl_python.so, libsqlite3_python.so, libcrypto_python.so Chaquopy 16.0.0
libcronet.119.0.6045.31.so org.chromium.net:cronet-embedded 119.6045.31
libdatastore_shared_counter.so androidx.datastore 1.1.3

cronet-embedded 119 corresponds to Chrome 119 (late 2023), by some distance the most stale native dependency in the build.

Why it matters

  • Google Play requires 16 KB alignment for apps targeting Android 15+. This project sets compileSdk/targetSdk = 35, so this blocks publishing an update there.
  • 16 KB page size is becoming the default on new arm64 hardware. Unaligned libraries will eventually fail to load rather than merely warn.

What the fix involves

The .so files are prebuilt upstream, so they cannot be realigned here — each has to be rebuilt with -Wl,-z,max-page-size=16384 by its publisher. In practice this is a dependency-bump exercise:

  1. Bump Chaquopy to a release shipping 16 KB-aligned native libs, and confirm the Python runtime plus the FindMy / NSKeyedUnArchiver wheels still resolve.
  2. Bump cronet-embedded — a large jump, and the most likely to require code changes.
  3. Bump androidx.datastore.
  4. Verify on a real 16 KB device (adb shell getconf PAGE_SIZE reports 16384). The CI emulator is 4 KB and will not reproduce this.

Notes

Deliberately kept out of the FindMy 0.9.x backend work (#30 / #44), which touches persistence and the Apple auth path and should not also carry a networking-stack upgrade.

Found while testing the FindMy 0.9.x migration branch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

@appIssues regarding the OpenTagViewer Android appbugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions