Skip to content

Support 16 KB page sizes, and fix the build - #1

Open
nsingh-ut wants to merge 3 commits into
userzoom:mainfrom
nsingh-ut:fix/16kb-page-size-support
Open

Support 16 KB page sizes, and fix the build#1
nsingh-ut wants to merge 3 commits into
userzoom:mainfrom
nsingh-ut:fix/16kb-page-size-support

Conversation

@nsingh-ut

Copy link
Copy Markdown

Description

Makes the demo app 16 KB page-size compatible, so it runs without the OS
"Android App Compatibility" warning on Android 15+ devices, and fixes two
things that stopped the repo building at all.

1. Malformed AndroidManifest.xml (build blocker)

A duplicate <intent-filter> sat directly above the real
<intent-filter android:autoVerify="true"> with only one closing tag, so the
file was not well-formed XML and processProdDebugMainManifest failed. It came
in with the autoVerify change and has been broken on main since.

2. GPR_PACKAGE_URL placeholder (build blocker)

build.gradle declared maven { url "GPR_PACKAGE_URL" } — a literal string,
not a URL — so com.userzoom:sdk:+ had no repository to resolve from. Now
points at the public repo the SDK is actually published to, which means the
demo always picks up the latest published UZ SDK.

3. 16 KB page-size support

Measured LOAD-segment alignment of every native lib in the APK:

Library From Before After
libmapbox-gl.solibmaplibre.so MapLibre 0x1000 0x4000
libimage_processing_util_jni.so CameraX 1.4.2 0x4000 0x4000
libsurface_util_jni.so CameraX 1.4.2 0x4000 0x4000
liblanguage_id_l2c_jni.so ML Kit 17.0.5 0x4000 0x4000

MapLibre was the only offender. Bumped 10.3.011.13.5 (and the annotation
plugin 2.0.23.0.2). MapLibre 11 renamed its package
com.mapbox.mapboxsdkorg.maplibre.android and MapboxMapMapLibreMap,
which is the bulk of the diff — mechanical renames, no logic changes.

Note that 16 KB alignment is not monotonic across MapLibre releases: 11.5.0
is aligned, 11.5.2 and 11.6.0 regress to 4 KB, 11.8.8+ are aligned again. Worth
re-checking on any future bump.

desugar_jdk_libs 2.0.42.1.5, required by UZ SDK 25.x.

Testing

Built and installed on an Android 17 (API 37) 16 KB emulator:

  • APK zip alignment verified with zipalign -c -P 16 — passes
  • All four native libs confirmed 0x4000 via llvm-readelf -l
  • Compatibility warning no longer appears on launch
  • Places map screen opens and the MapLibre GL surface renders

Map tiles did not load in my environment, but that is a local TLS
interception issue (CertPathValidatorException) that also blocks Maven
Central here — unrelated to this change. Worth a sanity check on a normal
network.

Type of change

  • fix
  • feature

🤖 Generated with Claude Code

nsingh-ut and others added 3 commits August 19, 2026 12:55
A duplicate <intent-filter> left over from the autoVerify change made the
manifest un-parseable, failing processProdDebugMainManifest.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Replaces the literal "GPR_PACKAGE_URL" placeholder, which is not a URL, so
com.userzoom:sdk:+ had no repository to resolve from.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MapLibre 10.3.0 ships libmapbox-gl.so with 4 KB LOAD alignment, which
triggers the OS compatibility warning on 16 KB devices. 11.13.5 is 16 KB
aligned; it renames the package, hence the import churn.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant