Skip to content

Latest AAR does not support 16KB page size #1928

@MiCkSoftware

Description

@MiCkSoftware

Describe the bug
Google Play Console rejects the app because the native GenAI libraries packaged in onnxruntime-genai-android are not aligned for
16 KB page size. The warning lists libonnxruntime-genai.so and libonnxruntime-genai-jni.so (arm64-v8a, x86_64) as non‑aligned.

To Reproduce

  1. Build an Android app that includes onnxruntime-genai-android AAR (e.g., 0.11.4).
  2. Upload the APK/AAB to Google Play Console.
  3. Play Console reports: “APK … is not compatible with 16 KB devices. Some libraries have LOAD segments not aligned at 16 KB
    boundaries …” for the GenAI libs.

Expected behavior
The GenAI AAR should ship with 16 KB page‑size compatible native libs so apps targeting API 35+ pass Play Console checks.

Screenshots
Play Console warning text:
“APK app‑debug.apk is not compatible with 16 KB devices. Some libraries have LOAD segments not aligned at 16 KB boundaries:
lib/arm64‑v8a/libonnxruntime‑genai‑jni.so
lib/arm64‑v8a/libonnxruntime‑genai.so
lib/x86_64/libonnxruntime‑genai‑jni.so
lib/x86_64/libonnxruntime‑genai.so
Starting November 1st, 2025, all new apps and updates to existing apps submitted to Google Play and targeting Android 15+
devices must support 16 KB page sizes.”

Desktop (please complete the following information):

  • OS: Android (built on macOS)
  • Browser: NA
  • Version: latest

Smartphone (please complete the following information):

  • Device: Pixel 4a / Pixel 9 Pro / Generic emulator
  • OS: Android 14/15
  • Browser: NA
  • Version: latest

Additional context

  • Project includes com.microsoft.onnxruntime:onnxruntime-android and onnxruntime-genai-android AAR.
  • The issue is with GenAI native libs only.
  • Request: publish updated GenAI Android AAR with 16 KB aligned LOAD segments (p_align=0x4000) for Android 15+ compliance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions