Skip to content

AMap SDK has no 16 KB page-aligned release, and the latest version drops x86_64 #66

Description

@parawanderer

The AMap SDK is the last thing in the build that is not 16 KB page-aligned. Unlike the other
libraries in #47, this one cannot be fixed by bumping: the newest release available is
still 4 KB aligned.

Measured

Alignment read from the PT_LOAD segments of the published artifacts with the NDK's
llvm-readelf, not from release notes:

Version Artifact arm64-v8a alignment
9.8.3 (current pin) 3dmap-9.8.3.aar 0x1000 — 4 KB
10.0.600 (latest) 3dmap-10.0.600.jar 0x1000 — 4 KB

For comparison, everything else in the APK is now 0x4000 after the fixes in #47.

A second problem with 10.0.600

Even setting alignment aside, the latest release is not a drop-in:

  • it is published as a .jar, not an .aar (3dmap-10.0.600.aar is a 404 on Maven Central)
  • it ships only armeabi-v7a and arm64-v8a — no x86_64

app/build.gradle.kts sets abiFilters to arm64-v8a and x86_64, and the Gradle managed
device the instrumented tests run on is x86_64. So bumping AMap would break the test device
while still not fixing alignment.

Current state

With #47's other fixes applied, the debug APK is 26 aligned / 2 unaligned, and both
remaining entries are libAMapSDK_MAP_v9_8_3.so (one per ABI).

This is not currently blocking anything. The app is distributed as APKs on GitHub releases —
build-release.yml does not build an AAB — so there is no store policy gate involved. The
reason it still matters is hardware: 16 KB page size is becoming the default on new arm64
devices, and an unaligned library will eventually fail to load rather than warn.

Options, for whoever picks this up

  1. Wait for AMap. There is no public issue tracker for the SDK; the vendor channel is
    https://lbs.amap.com. Somebody who can file there should ask for a 16 KB-aligned build.
  2. Product flavour. Keep AMap in a sideload-oriented variant and ship a fully aligned
    variant without it. Costs a build variant and a MapProviderFactory that varies by flavour.
  3. Drop the AMap provider. Fully aligned, simplest build, but leaves mainland China users
    with no working map — Google Maps is unavailable there, which is why Merge SadGare's fork: FindMy 0.9.x, map providers, and working key alignment #49 added AMap.

Worth noting #51 (replace AMapProvider's reflection with direct SDK calls) and #52 (verify
the provider still works after the fork merge) are both open, so the provider's current state
is not confirmed either way.

How to reproduce the measurement

# any .so, from an APK or an unpacked AAR/JAR
llvm-readelf -l -W libAMapSDK_MAP_v9_8_3.so | awk '$1 == "LOAD" { print $NF }'
# 0x4000 or greater is 16 KB compatible; 0x1000 is not

This issue was written by Claude Code.

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