Android: native libraries need 16 KB ELF page alignment before May 31, 2026 (Google Play mandate) #752

Closed
opened 2026-04-14 21:32:48 -05:00 by ab300819 · 4 comments
ab300819 commented 2026-04-14 21:32:48 -05:00 (Migrated from github.com)

Background

The Android subproject under android/ is currently on a 2023-era tech stack:

Component Current Issue
Gradle 7.6 EOL, incompatible with modern AGP
AGP 7.4.1 No namespace support, can't target SDK 35
Kotlin 1.8.0 EOL, kapt metadata incompatible with newer processors
compileSdk / targetSdk 34 Play Store rejects updates since Aug 2025 (requires 35+)
JDK target 1.8 AGP 8+ requires JDK 17
NDK not pinned (defaults to 23) No 16 KB page alignment support
RxJava 2.x 2.2.20 EOL since 2021, replaced by Coroutines/Flow in Kotlin ecosystem
jcenter() referenced Repository shut down in 2021
lifecycle-extensions 2.2.0 Deprecated since 2020

These issues collectively block Play Store submission and accumulate technical debt that makes future contributions harder.

Problem Statement

  1. Play Store hard blockers: Apps targeting < SDK 35 are rejected since Aug 2025. Apps with native .so files not aligned to 16 KB pages will be rejected by May 31, 2026 on Android 15+ devices.
  2. Build system outdated: AGP 7.4.1 doesn't support namespace (required by AGP 8+), can't use KSP (kapt is deprecated), and references dead repositories (jcenter).
  3. Architecture debt: RxJava 2.x reached EOL in 2021. Room, Lifecycle, and the Kotlin ecosystem have moved to Coroutines/Flow. Maintaining RxJava2 dependencies adds binary size and cognitive overhead for contributors.
  4. Native code compatibility: NDK 29's stricter Clang compiler flags two pre-existing issues in chiaki-jni.c — a video_sample_cb signature mismatch (error) and a sockaddr_storage** → sockaddr** implicit cast (warning).

Planned Changes

I'm preparing a series of PRs to address all of the above. Each PR is independently reviewable and leaves the project in a buildable state.

PR 1 — Baseline hygiene (no SDK/AGP changes)

  • jcenter() → mavenCentral()
  • Remove deprecated lifecycle-extensions:2.2.0
  • Fix -Xuse-experimental → -opt-in (Kotlin 1.7+ syntax)
  • kotlin-stdlib-jdk7 → kotlin-stdlib (merged in Kotlin 1.8)
  • Disable Jetifier (all deps are already AndroidX)

Why: Dead dependencies and deprecated configs that will break on any future upgrade. Zero-risk cleanup.

PR 2 — AGP 8.7 LTS + Kotlin 1.9 + namespace migration

  • Gradle 7.6 → 8.11.1, AGP 7.4.1 → 8.7.3, Kotlin 1.8.0 → 1.9.24
  • JDK target 1.8 → 17
  • Add namespace "com.metallic.chiaki" in build.gradle, remove package= from AndroidManifest.xml
  • Migrate to plugins {} DSL + dependencyResolutionManagement in settings.gradle
  • Bump all AndroidX dependencies to current stable (AppCompat 1.7, Material 1.12, Lifecycle 2.8.7, Room 2.6.1, etc.)
  • Moshi 1.14.0 → 1.15.2 (required for Kotlin 1.9 metadata compatibility)
  • Pin NDK version explicitly

Why: AGP 8+ is required for namespace (which replaces the deprecated manifest package attribute). Kotlin 1.9 is the minimum for Moshi 1.15 codegen. JDK 17 is required by AGP 8+. These are prerequisite for targetSdk 35.

PR 3 — targetSdk 35 + edge-to-edge + Predictive Back

  • compileSdk / targetSdk 34 → 35
  • Replace deprecated SYSTEM_UI_FLAG_* with WindowInsetsControllerCompat in StreamActivity
  • Replace onBackPressed() with OnBackPressedDispatcher in MainActivity
  • Replace intent.getParcelableExtra<T>() with IntentCompat.getParcelableExtra()
  • Remove windowTranslucentStatus / windowTranslucentNavigation from StreamTheme (ignored under targetSdk 35 edge-to-edge enforcement)

Why: Play Store mandatory requirement since Aug 2025. The deprecated system UI APIs are no-ops on Android 15 and cause incorrect behavior under edge-to-edge enforcement.

PR 4 — NDK r28 + 16 KB ELF page alignment ⚠️ (this issue)

  • Pin NDK to r28, bump CMake version
  • Add -DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON
  • Propagate -Wl,-z,max-page-size=16384 -Wl,-z,common-page-size=16384 to ExternalProject builds (OpenSSL, json-c, miniupnpc)
  • Bump Oboe from 1.9.3 to latest (pre-16 KB prefab)
  • Fix video_sample_cb signature mismatch in video-decoder.c/h (missing int32_t frames_lost, bool frame_recovered parameters — error on NDK 29's Clang 18)
  • Fix sockaddr_storage** → sockaddr** cast in chiaki-jni.c:593

Why: Google Play deadline May 31, 2026. All .so files in the APK must have 16 KB aligned LOAD segments. This is the only PR that touches the parent cmake/ directory and native code — see coordination question below.

PR 5 — RxJava 2.x → Coroutines/Flow

  • Room DAO return types: Flowable → Flow, Single/Completable/Maybe → suspend fun
  • BehaviorSubject → MutableStateFlow (Preferences, DiscoveryManager, TouchControls, TouchpadView, ChiakiRxLog)
  • CompositeDisposable → viewModelScope / lifecycleScope
  • Observables.combineLatest → combine() on Flow
  • toLiveData() → asLiveData() (from lifecycle-livedata-ktx)
  • Delete RxLiveData.kt
  • Remove rxjava, rxkotlin, rxandroid, lifecycle-reactivestreams, room-rxjava2 dependencies
  • Add kotlinx-coroutines-android, lifecycle-livedata-ktx
  • JNI boundary: MutableStateFlow.value = is thread-safe, replaces BehaviorSubject.onNext() called from native threads

Why: RxJava 2.x is EOL. Room, Lifecycle, and Kotlin all natively support Flow/Coroutines. This removes 3 transitive dependency trees and ~90 lines of glue code. Every ViewModel and data layer file is touched, but the changes are mechanical (type substitution, no logic changes).

PR 6 (future) — kapt → KSP + version catalog

PR 7 (future) — Minimal test scaffolding

Coordination Needed (PR 4)

The 16 KB alignment PR is the only one that touches code outside android/. The ExternalProject builds (OpenSSL, json-c, miniupnpc) in the parent cmake/ directory need linker flags propagated. Three options:

Option A (recommended) — Android-guarded linker flag: pass the flags only when CHIAKI_ENABLE_ANDROID=ON. Zero impact on iOS/Windows/Linux/Switch/SteamDeck.

Option B — Unconditional linker flag: always pass 16 KB alignment. Safe on all ELF platforms, no-op on Mach-O/PE. Simpler but slight footprint change on non-Android Linux.

Option C — Static linking: link OpenSSL/json-c/miniupnpc statically into libchiaki-jni.so. Removes per-lib alignment concern but much bigger refactor.

Questions for maintainers

  1. Is Option A acceptable? If yes, should the flag plumbing live in a central cmake/ helper or per-ExternalProject?
  2. Can Oboe be bumped from 1.9.3 to latest?
  3. The native code fixes (video_sample_cb signature, sockaddr cast) — should these go in the 16 KB PR or a separate one?

Verification

After the full series, on a release APK:

cd android && ./gradlew assembleRelease
unzip -o app/build/outputs/apk/release/app-release.apk -d /tmp/apk
for f in /tmp/apk/lib/arm64-v8a/*.so; do
  echo "=== $(basename "$f") ==="
  readelf -l "$f" | grep -E 'LOAD|Align'
done
# All LOAD segments should report Align 0x4000

Dependency health:

./gradlew :app:dependencies | grep -iE 'rxjava|jcenter|lifecycle-extensions|support-v4'
# Should return empty

What's NOT changing

  • No Compose migration — Views + ViewBinding work fine for 6 Activities
  • No multi-module split — 45 Kotlin files + JNI, no reuse case
  • No Hilt/Dagger — manual ViewModel factories are ~5 lines each
  • No AGP 9 / Kotlin 2 — AGP 8.7 LTS is supported through 2026, avoids NDK/prefab/parcelize unknowns
  • No ABI drops — all 4 ABIs retained (armeabi-v7a, arm64-v8a, x86, x86_64)
## Background The Android subproject under `android/` is currently on a 2023-era tech stack: | Component | Current | Issue | |---|---|---| | Gradle | 7.6 | EOL, incompatible with modern AGP | | AGP | 7.4.1 | No `namespace` support, can't target SDK 35 | | Kotlin | 1.8.0 | EOL, kapt metadata incompatible with newer processors | | compileSdk / targetSdk | 34 | **Play Store rejects updates** since Aug 2025 (requires 35+) | | JDK target | 1.8 | AGP 8+ requires JDK 17 | | NDK | not pinned (defaults to 23) | No 16 KB page alignment support | | RxJava 2.x | 2.2.20 | EOL since 2021, replaced by Coroutines/Flow in Kotlin ecosystem | | jcenter() | referenced | Repository shut down in 2021 | | lifecycle-extensions | 2.2.0 | Deprecated since 2020 | These issues collectively block Play Store submission and accumulate technical debt that makes future contributions harder. ## Problem Statement 1. **Play Store hard blockers**: Apps targeting < SDK 35 are rejected since Aug 2025. Apps with native `.so` files not aligned to 16 KB pages will be rejected by **May 31, 2026** on Android 15+ devices. 2. **Build system outdated**: AGP 7.4.1 doesn't support `namespace` (required by AGP 8+), can't use KSP (kapt is deprecated), and references dead repositories (`jcenter`). 3. **Architecture debt**: RxJava 2.x reached EOL in 2021. Room, Lifecycle, and the Kotlin ecosystem have moved to Coroutines/Flow. Maintaining RxJava2 dependencies adds binary size and cognitive overhead for contributors. 4. **Native code compatibility**: NDK 29's stricter Clang compiler flags two pre-existing issues in `chiaki-jni.c` — a `video_sample_cb` signature mismatch (error) and a `sockaddr_storage**` → `sockaddr**` implicit cast (warning). ## Planned Changes I'm preparing a series of PRs to address all of the above. Each PR is independently reviewable and leaves the project in a buildable state. ### PR 1 — Baseline hygiene (no SDK/AGP changes) - `jcenter()` → `mavenCentral()` - Remove deprecated `lifecycle-extensions:2.2.0` - Fix `-Xuse-experimental` → `-opt-in` (Kotlin 1.7+ syntax) - `kotlin-stdlib-jdk7` → `kotlin-stdlib` (merged in Kotlin 1.8) - Disable Jetifier (all deps are already AndroidX) **Why**: Dead dependencies and deprecated configs that will break on any future upgrade. Zero-risk cleanup. ### PR 2 — AGP 8.7 LTS + Kotlin 1.9 + namespace migration - Gradle 7.6 → 8.11.1, AGP 7.4.1 → 8.7.3, Kotlin 1.8.0 → 1.9.24 - JDK target 1.8 → 17 - Add `namespace "com.metallic.chiaki"` in `build.gradle`, remove `package=` from `AndroidManifest.xml` - Migrate to `plugins {}` DSL + `dependencyResolutionManagement` in `settings.gradle` - Bump all AndroidX dependencies to current stable (AppCompat 1.7, Material 1.12, Lifecycle 2.8.7, Room 2.6.1, etc.) - Moshi 1.14.0 → 1.15.2 (required for Kotlin 1.9 metadata compatibility) - Pin NDK version explicitly **Why**: AGP 8+ is required for `namespace` (which replaces the deprecated manifest `package` attribute). Kotlin 1.9 is the minimum for Moshi 1.15 codegen. JDK 17 is required by AGP 8+. These are prerequisite for targetSdk 35. ### PR 3 — targetSdk 35 + edge-to-edge + Predictive Back - `compileSdk` / `targetSdk` 34 → 35 - Replace deprecated `SYSTEM_UI_FLAG_*` with `WindowInsetsControllerCompat` in `StreamActivity` - Replace `onBackPressed()` with `OnBackPressedDispatcher` in `MainActivity` - Replace `intent.getParcelableExtra<T>()` with `IntentCompat.getParcelableExtra()` - Remove `windowTranslucentStatus` / `windowTranslucentNavigation` from `StreamTheme` (ignored under targetSdk 35 edge-to-edge enforcement) **Why**: Play Store mandatory requirement since Aug 2025. The deprecated system UI APIs are no-ops on Android 15 and cause incorrect behavior under edge-to-edge enforcement. ### PR 4 — NDK r28 + 16 KB ELF page alignment ⚠️ (this issue) - Pin NDK to r28, bump CMake version - Add `-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON` - Propagate `-Wl,-z,max-page-size=16384 -Wl,-z,common-page-size=16384` to ExternalProject builds (OpenSSL, json-c, miniupnpc) - Bump Oboe from 1.9.3 to latest (pre-16 KB prefab) - Fix `video_sample_cb` signature mismatch in `video-decoder.c/h` (missing `int32_t frames_lost, bool frame_recovered` parameters — error on NDK 29's Clang 18) - Fix `sockaddr_storage**` → `sockaddr**` cast in `chiaki-jni.c:593` **Why**: Google Play deadline May 31, 2026. All `.so` files in the APK must have 16 KB aligned LOAD segments. This is the only PR that touches the parent `cmake/` directory and native code — see coordination question below. ### PR 5 — RxJava 2.x → Coroutines/Flow - Room DAO return types: `Flowable` → `Flow`, `Single`/`Completable`/`Maybe` → `suspend fun` - `BehaviorSubject` → `MutableStateFlow` (Preferences, DiscoveryManager, TouchControls, TouchpadView, ChiakiRxLog) - `CompositeDisposable` → `viewModelScope` / `lifecycleScope` - `Observables.combineLatest` → `combine()` on Flow - `toLiveData()` → `asLiveData()` (from `lifecycle-livedata-ktx`) - Delete `RxLiveData.kt` - Remove `rxjava`, `rxkotlin`, `rxandroid`, `lifecycle-reactivestreams`, `room-rxjava2` dependencies - Add `kotlinx-coroutines-android`, `lifecycle-livedata-ktx` - JNI boundary: `MutableStateFlow.value =` is thread-safe, replaces `BehaviorSubject.onNext()` called from native threads **Why**: RxJava 2.x is EOL. Room, Lifecycle, and Kotlin all natively support Flow/Coroutines. This removes 3 transitive dependency trees and ~90 lines of glue code. Every ViewModel and data layer file is touched, but the changes are mechanical (type substitution, no logic changes). ### PR 6 (future) — kapt → KSP + version catalog ### PR 7 (future) — Minimal test scaffolding ## Coordination Needed (PR 4) The 16 KB alignment PR is the only one that touches code outside `android/`. The ExternalProject builds (OpenSSL, json-c, miniupnpc) in the parent `cmake/` directory need linker flags propagated. Three options: **Option A (recommended)** — Android-guarded linker flag: pass the flags only when `CHIAKI_ENABLE_ANDROID=ON`. Zero impact on iOS/Windows/Linux/Switch/SteamDeck. **Option B** — Unconditional linker flag: always pass 16 KB alignment. Safe on all ELF platforms, no-op on Mach-O/PE. Simpler but slight footprint change on non-Android Linux. **Option C** — Static linking: link OpenSSL/json-c/miniupnpc statically into `libchiaki-jni.so`. Removes per-lib alignment concern but much bigger refactor. ### Questions for maintainers 1. Is **Option A** acceptable? If yes, should the flag plumbing live in a central `cmake/` helper or per-ExternalProject? 2. Can **Oboe be bumped** from 1.9.3 to latest? 3. The native code fixes (`video_sample_cb` signature, `sockaddr` cast) — should these go in the 16 KB PR or a separate one? ## Verification After the full series, on a release APK: ```bash cd android && ./gradlew assembleRelease unzip -o app/build/outputs/apk/release/app-release.apk -d /tmp/apk for f in /tmp/apk/lib/arm64-v8a/*.so; do echo "=== $(basename "$f") ===" readelf -l "$f" | grep -E 'LOAD|Align' done # All LOAD segments should report Align 0x4000 ``` Dependency health: ```bash ./gradlew :app:dependencies | grep -iE 'rxjava|jcenter|lifecycle-extensions|support-v4' # Should return empty ``` ## What's NOT changing - **No Compose migration** — Views + ViewBinding work fine for 6 Activities - **No multi-module split** — 45 Kotlin files + JNI, no reuse case - **No Hilt/Dagger** — manual ViewModel factories are ~5 lines each - **No AGP 9 / Kotlin 2** — AGP 8.7 LTS is supported through 2026, avoids NDK/prefab/parcelize unknowns - **No ABI drops** — all 4 ABIs retained (armeabi-v7a, arm64-v8a, x86, x86_64)
ab300819 commented 2026-04-15 10:10:42 -05:00 (Migrated from github.com)

Update: scope is smaller than the original issue described

After working through Phase 1b locally, I found the actual surface area is narrower than Option A suggested in the original post. Sharing the findings so the eventual PR is easier to review.

Finding: OpenSSL / json-c / miniupnpc don't ship as .so in the APK

All three are built statically under CHIAKI_ENABLE_ANDROID=ON:

  • cmake/OpenSSLExternalProject.cmake — Configured with no-shared → libcrypto.a / libssl.a
  • cmake/JsoncExternalProject.cmake — BUILD_SHARED_LIBS=OFF → libjson-c.a
  • cmake/MiniupnpcExternalProject.cmake — UPNPC_BUILD_STATIC=ON, UPNPC_BUILD_SHARED=OFF → libminiupnpc.a

They get linked into libchiaki-jni.so. Actual shared libraries in the APK (per ABI):

lib/arm64-v8a/
├── libc++_shared.so   (NDK STL)
├── libchiaki-jni.so   (our code — includes libchiaki + OpenSSL + json-c + miniupnpc statically)
└── liboboe.so         (prefab)

So 16 KB alignment only needs to apply to libraries built within the Android CMake invocation (where CMAKE_SHARED_LINKER_FLAGS naturally propagates) plus the prefab Oboe.

Minimal change that works

No parent CMakeLists.txt / cmake/*.cmake changes required. Only android/ files:

// android/app/build.gradle
externalNativeBuild.cmake.arguments += [
    "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON",
    "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-z,max-page-size=16384 -Wl,-z,common-page-size=16384",
]

Plus bump Oboe 1.9.3 → 1.10.0 (1.10.0 ships a 16 KB aligned prefab).

Verification

After rebuilding with the above, llvm-readelf -l on every 64-bit .so in the release APK reports Align 0x4000 on all LOAD segments. Example:

=== libchiaki-jni.so (arm64-v8a) ===
  LOAD  0x000000  R E  0x4000
  LOAD  0x400bb0  RW   0x4000
  LOAD  0x438060  RW   0x4000
=== liboboe.so (arm64-v8a) ===
  LOAD  0x000000  R E  0x4000
  LOAD  0x04c3d0  RW   0x4000
  LOAD  0x04f648  RW   0x4000

32-bit ABIs (armeabi-v7a, x86) retain 4 KB pages — that's correct and not Play Store's concern.

Implication for the PR

This collapses the Phase 1b PR to a 2-file, 4-line diff in android/ only. No upstream CMake surgery, no Option B/C. Will open as part of a broader Android modernization PR chain once the rest of the phases (AGP 8.7, targetSdk 35, Coroutines migration, etc.) are reviewed.

## Update: scope is smaller than the original issue described After working through Phase 1b locally, I found the actual surface area is narrower than Option A suggested in the original post. Sharing the findings so the eventual PR is easier to review. ### Finding: OpenSSL / json-c / miniupnpc don't ship as `.so` in the APK All three are built **statically** under `CHIAKI_ENABLE_ANDROID=ON`: - `cmake/OpenSSLExternalProject.cmake` — Configured with `no-shared` → `libcrypto.a` / `libssl.a` - `cmake/JsoncExternalProject.cmake` — `BUILD_SHARED_LIBS=OFF` → `libjson-c.a` - `cmake/MiniupnpcExternalProject.cmake` — `UPNPC_BUILD_STATIC=ON, UPNPC_BUILD_SHARED=OFF` → `libminiupnpc.a` They get linked into `libchiaki-jni.so`. Actual shared libraries in the APK (per ABI): ``` lib/arm64-v8a/ ├── libc++_shared.so (NDK STL) ├── libchiaki-jni.so (our code — includes libchiaki + OpenSSL + json-c + miniupnpc statically) └── liboboe.so (prefab) ``` So 16 KB alignment only needs to apply to libraries built within the Android CMake invocation (where `CMAKE_SHARED_LINKER_FLAGS` naturally propagates) plus the prefab Oboe. ### Minimal change that works No parent `CMakeLists.txt` / `cmake/*.cmake` changes required. Only `android/` files: ```groovy // android/app/build.gradle externalNativeBuild.cmake.arguments += [ "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON", "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-z,max-page-size=16384 -Wl,-z,common-page-size=16384", ] ``` Plus bump Oboe `1.9.3 → 1.10.0` (1.10.0 ships a 16 KB aligned prefab). ### Verification After rebuilding with the above, `llvm-readelf -l` on every 64-bit `.so` in the release APK reports `Align 0x4000` on all LOAD segments. Example: ``` === libchiaki-jni.so (arm64-v8a) === LOAD 0x000000 R E 0x4000 LOAD 0x400bb0 RW 0x4000 LOAD 0x438060 RW 0x4000 === liboboe.so (arm64-v8a) === LOAD 0x000000 R E 0x4000 LOAD 0x04c3d0 RW 0x4000 LOAD 0x04f648 RW 0x4000 ``` 32-bit ABIs (`armeabi-v7a`, `x86`) retain 4 KB pages — that's correct and not Play Store's concern. ### Implication for the PR This collapses the Phase 1b PR to a 2-file, 4-line diff in `android/` only. No upstream CMake surgery, no Option B/C. Will open as part of a broader Android modernization PR chain once the rest of the phases (AGP 8.7, targetSdk 35, Coroutines migration, etc.) are reviewed.
github-actions[bot] commented 2026-07-14 23:22:31 -05:00 (Migrated from github.com)

This issue is stale because it has been open for 90 days with no activity.

This issue is stale because it has been open for 90 days with no activity.
ab300819 commented 2026-08-03 21:09:52 -05:00 (Migrated from github.com)

Implemented in #791.

All seven planned PRs are in that one branch, one commit per phase.
Two findings differ from this issue:

  • No changes outside android/ are needed — OpenSSL, json-c, and miniupnpc
    are statically linked into libchiaki-jni.so, so none of Option A/B/C applies.
  • NDK is pinned to r28c (28.2.13676358), and all four ABIs end up 16 KB
    aligned — correcting my earlier comment, which said 32-bit would stay at 4 KB.

Happy to split it into separate PRs if that's easier to review.

Implemented in #791. All seven planned PRs are in that one branch, one commit per phase. Two findings differ from this issue: - No changes outside `android/` are needed — OpenSSL, json-c, and miniupnpc are statically linked into `libchiaki-jni.so`, so none of Option A/B/C applies. - NDK is pinned to r28c (28.2.13676358), and all four ABIs end up 16 KB aligned — correcting my earlier comment, which said 32-bit would stay at 4 KB. Happy to split it into separate PRs if that's easier to review.
ab300819 commented 2026-09-27 21:48:08 -05:00 (Migrated from github.com)

Correcting one claim I made in my previous comment here, now that #791 has landed.

I wrote that "all four ABIs end up 16 KB aligned". That is not accurate. Alignment follows where each .so comes from, not the ABI — measured across all 12 libraries in the release APK, every LOAD segment:

Library Origin 32-bit 64-bit
libchiaki-jni.so built here; governed by the linker flags #791 adds 0x4000 0x4000
liboboe.so prebuilt in the Oboe AAR (1.10.0 ships aligned) 0x4000 0x4000
libc++_shared.so prebuilt in the NDK (ANDROID_STL=c++_shared) 0x1000 0x4000

So the original statement in this issue — that 32-bit would stay at 4 KB — was right for the NDK's prebuilt libc++_shared.so. My "correction" of it was an overreach; only the two libraries this project controls end up aligned on 32-bit.

The conclusion is unchanged: all six 64-bit libraries are 16 KB aligned, which is what the requirement covers, since 16 KB page devices are arm64-only. The NDK follows the same policy — 64-bit prebuilts aligned, 32-bit left at 4 KB.

#791's description was corrected with the full table at the time; this comment brings the issue thread in line.

Correcting one claim I made in my previous comment here, now that #791 has landed. I wrote that "all four ABIs end up 16 KB aligned". That is not accurate. Alignment follows where each `.so` comes from, not the ABI — measured across all 12 libraries in the release APK, every LOAD segment: | Library | Origin | 32-bit | 64-bit | |---|---|---|---| | `libchiaki-jni.so` | built here; governed by the linker flags #791 adds | `0x4000` | `0x4000` | | `liboboe.so` | prebuilt in the Oboe AAR (1.10.0 ships aligned) | `0x4000` | `0x4000` | | `libc++_shared.so` | prebuilt in the NDK (`ANDROID_STL=c++_shared`) | `0x1000` | `0x4000` | So the original statement in this issue — that 32-bit would stay at 4 KB — was right for the NDK's prebuilt `libc++_shared.so`. My "correction" of it was an overreach; only the two libraries this project controls end up aligned on 32-bit. The conclusion is unchanged: all six 64-bit libraries are 16 KB aligned, which is what the requirement covers, since 16 KB page devices are arm64-only. The NDK follows the same policy — 64-bit prebuilts aligned, 32-bit left at 4 KB. #791's description was corrected with the full table at the time; this comment brings the issue thread in line.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-streetpea/chiaki-ng#752
No description provided.