Skip to content

fix(map): pin the maplibre native ffi snapshot so 32-bit F-Droid gets a map engine - #7003

Closed
jamesarich wants to merge 1 commit into
mainfrom
test/maplibre-arm32-snapshot
Closed

jamesarich wants to merge 1 commit into
mainfrom
test/maplibre-arm32-snapshot

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

Why

#6901 moved the F-Droid flavor from OSMdroid to maplibre-compose. maplibre-compose 0.15.0's native stack — maplibre-native-ffi 0.202608.3 — publishes arm64-v8a and x86_64 only, but androidApp/build.gradle.kts still lists armeabi-v7a in both abiFilters and the ABI splits. The 32-bit split builds and installs happily with no map engine in it, and opening the map tab dies:

FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: dlopen failed: library "libjniMaplibreNativeC.so" not found
  at org.maplibre.nativeffi.internal.javacpp.MaplibreNativeC.<clinit>(MaplibreNativeC.java:10)
  at org.maplibre.compose.mlnffi.EnsureMlnFfiConfigured(EnsureMlnFfiConfigured.android.kt:12)
  at org.meshtastic.feature.map.maplibre.MeshMapKt.MeshMap(MeshMap.kt:139)
  at org.meshtastic.feature.map.maplibre.MapLibreMapViewProvider.MapView(MapLibreMapViewProvider.kt:150)

Every armeabi-v7a install of 29322131 and later has no map, by construction. Shipped artifacts from v2.8.2-closed.1:

release APK size MapLibre .so
androidApp-fdroid-arm64-v8a-release.apk 32.5 MB present
androidApp-fdroid-armeabi-v7a-release.apk 18.2 MB absent

Relates to #7001.

🐛 Bug Fixes

  • Pin the org.maplibre.nativeffi group to 0.1.0-SNAPSHOT, the rolling publication that carries armeabi-v7a, so the 32-bit split ships a map engine again.
  • Set cacheChangingModulesFor(0, "seconds") so a snapshot pin is not served stale from the dependency cache.

Not for merge in this form

A snapshot pin is not shippable. Upstream merged Android ARM32 on 2026-08-24 — maplibre-native-ffi #658 (ARMv7 OpenGL), #659 (Kotlin/Native androidNativeArm32), #660 (ARMv7 Vulkan) — but the newest release, 0.202608.3 (2026-08-20), predates them, and maplibre-compose main still pins that version.

The shipping fix is a two-step upstream wait:

  1. maplibre-native-ffi cuts a release containing Honor radio's option to use Fahrenheit. #658/fix: close Socket from onDeviceDisconnect #659/feat: add preferred LocationManager providers #660.
  2. maplibre-compose bumps its maplibre-nativeFfi pin to it and publishes.

Then this becomes a one-line maplibre-compose bump in gradle/libs.versions.toml and this block gets deleted.

This PR exists to prove the fix works and to produce a 32-bit APK affected users can test.

Testing Performed

Verified against the artifacts, not just the build:

  • :androidApp:assembleFdroidDebug — the armeabi-v7a split grows 60 MB → 70 MB and now contains lib/armeabi-v7a/libmaplibre-native-c.so (8.8 MB) and lib/armeabi-v7a/libjniMaplibreNativeC.so (908 KB).
  • Both are genuine 32-bit binaries: ELF 32-bit LSB shared object, ARM, EABI5 version 1, Tag_CPU_arch: v7, NDK r28c, built for Android 24.
  • The snapshot FFI is drop-in compatible with maplibre-compose 0.15.0 — the arm64 build from this branch installs and renders on a Pixel 6a: maplibre-compose: Rendered the first map frame with OPENGL. This also clears the concern that feat: add preferred LocationManager providers #660's Vulkan handle ABI break would affect our OpenGL path. It does not.
  • Reproduced the original failure first, to confirm the diagnosis: stripping the two MapLibre .so files from the arm64 APK (leaving exactly the lib set the v7a split ships), re-signing and installing gives the identical UnsatisfiedLinkError above.
  • spotlessApply spotlessCheck detekt green.

Not verified: the ARM32 code path actually executing. armeabi-v7a emulator system images stop at API 25 and minSdk is 26, so no emulator can run it, and the only physical device here is arm64-only. That rests on upstream's CI until a 32-bit phone runs the artifact from this PR.

🤖 Generated with Claude Code

… a map engine

#6901 moved the F-Droid flavor from OSMdroid to maplibre-compose. Its 0.15.0
native stack, maplibre-native-ffi 0.202608.3, publishes arm64-v8a and x86_64
only, but our abiFilters and ABI splits still list armeabi-v7a. The 32-bit
split therefore installs with no map engine at all, and opening the map tab
dies with UnsatisfiedLinkError on libjniMaplibreNativeC.so (#7001).

Upstream merged Android ARM32 on 2026-08-24 across maplibre-native-ffi #658,
#659 and #660, but the newest release predates those merges. The rolling
0.1.0-SNAPSHOT publication does carry armeabi-v7a, so pin the whole
org.maplibre.nativeffi group to it until a release exists.

Not for merge in this form. A snapshot pin is not shippable; this is here to
prove the fix and to produce a 32-bit APK that affected users can test.
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jamesarich

Copy link
Copy Markdown
Collaborator Author

Closing - the pin cannot ship in any form, and the check that replaces it is #7013.

  • 0.1.0-SNAPSHOT was re-published overnight: yesterday 20260825.201433-1, today 20260902.064417-1. Same version string, different engine, and rb-check assembles once so it would never notice.
  • A timestamped pin does not work either: the timestamps are per artifact (-android 064417-1, -runtime-opengl-android 064601-1), and Central prunes snapshots after 90 days, so a merged pin 404s for any rebuild of that tag after late November.
  • Renovate cannot see resolutionStrategy.eachDependency, so the force would silently override the maplibre-compose bump it does deliver.

The v7a test build from this PR's CI run stays valid for the artifact's 7-day retention: https://github.com/meshtastic/Meshtastic-Android/actions/runs/33562083023/artifacts/9821973919

@jamesarich jamesarich closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag testing Test additions or modifications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant