runnerup icon indicating copy to clipboard operation
runnerup copied to clipboard

Android system page 16KB

Open gerhardol opened this issue 6 months ago • 8 comments

Failed to load native shared library. java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/~~NHUnr1sKUL1HuQnIBCwK0A==/org.runnerup.debug-W5-F5Fty9iV4ImPkhZD1vA==/lib/x86_64/libmapbox-gl.so" program alignment (4096) cannot be smaller than system page size (16384) at java.lang.Runtime.loadLibrary0(Runtime.java:1090) at java.lang.Runtime.loadLibrary0(Runtime.java:1012) at java.lang.System.loadLibrary(System.java:1765) with tag Mbgl-LibraryLoader

Since Android 15 system page can be set to 16 instead of 4 KB to improve performance. https://developer.android.com/guide/practices/page-sizes It requires bootloader unlock for Pixel, so not common I assume. There are emulator images where this can be tested. From Nov 1 this is required in Play.

RU currently fails to display the history for an activity as MapBox is NDK 23 and 4KB, other is fine. There is currently no update, there will likely be in som time though.

However, there are reasons to consider removing Mapbox and use osmdroid as in the F-Droid version.

  • Migration from v9 to v11 required. Probably some days work.
  • Mapbox is a paid service, if we exceed the current quota I will have to pay. Not so high risk, currently 1/25 of the free quota, then I will have to pay som hundred dollor a month or so unless I react very quickly and see the email.
  • I recall something about licensing changed with >v9 too (in addition to no longer open sourced), but do not see that now.

Current master do not add osmdroid correctly.

gerhardol avatar Jun 16 '25 20:06 gerhardol

I have never used/coded MapBox or osmdroid, so I have no input regarding removing MapBox in favour of osmdroid. Upon looking at the osmdroid repository, I noticed that the owner archived it on November 20, 2024, and it is now read-only. Will that affect RU in some way?

roberi avatar Jul 14 '25 17:07 roberi

I noticed that the owner archived it on November 20, 2024, and it is now read-only

Then that is not an alternative for replacement.

There are some other alternatives like MapLibre (open source fork of MapBox). The system page may not be fixed there yet. Map tiles may still be a cost though.

To be investigated closer to the deadline...

gerhardol avatar Jul 16 '25 19:07 gerhardol

Is google maps not an option ?

jonasoreland avatar Aug 13 '25 05:08 jonasoreland

Google maps allows up to 10K calls /month before there is a cost: https://mapsplatform.google.com/pricing/ So it is likely not a good solution.

gerhardol avatar Aug 15 '25 22:08 gerhardol

Hey,

Starting November 1st, 2025, 16 KB page size support will be required to update apps on the Play Store (with some apps possibly granted an extension until May 2026).

Migration from v9 to v11 required. Probably some days work.

According to this issue, 16 KB device support was also added in v10. Migrating to v10 may be simpler than going all the way to v11 (see this commit regarding MapBox changes for NDK 27).

Another option would be to fork mapbox-gl-native-android and attempt to add 16 KB support there. While technically possible (supporting 16 KB in v9 is as simple as adding the right compiler flags in CMakeLists.txt), the bigger challenge would be depending from that custom fork on runnerup (do we add it as a submodule?).

manugildev avatar Aug 30 '25 11:08 manugildev

The easiest way is probably still to update MapBox. MapBox do not support 16kb in the default builds, but they do now document that the ndk27 build is required. Maybe there is a 12.x version with 16kb by default soon?

MapLibre is a fork of the last open source version of MapBox, but when I looked at that the mapping in the free tier was more limited.

gerhardol avatar Sep 06 '25 19:09 gerhardol

I think the deadline (November 1st) is slowly approaching and there's still no plan on how to solve this.

After November 1st, the app won't be able to be updated on the Play Store.

manugildev avatar Sep 30 '25 11:09 manugildev

Well, the plan is to update mapbox, someone just have to do the work. When we need to make a new release with other changes (like the no-gps etc that @jonasoreland implements), someone need to fix it.

gerhardol avatar Sep 30 '25 17:09 gerhardol