Jump to content
apachx

Android 16 KB page sizes support

Recommended Posts

To ensure apps run correctly on recent Android releases, Google Play requires that all apps targeting Android 15+ support 16 KB memory pages.

I’m using Delphi CE 12.1 with AndroidSDK-2525-23.0.51961.7529 and NDK 23.2.8568313. My app contains only one native .so library and no third-party native libraries. The .aab I build contains under base/lib only a single arm64-v8a folder, and inside it just libMyApp.so.

In the Delphi Compiler linking settings I added the flag -z max-page-size=16384 to Options passed to the LD linker. After building, I analyze the .so with llvm-readelf.exe and for every LOAD header I see Align 0x4000 - which indicates 16 KB alignment.

 

image.thumb.png.52204855bb11e4842b772667db83db01.png

 

When inspecting the .aab in Android Studio, the Alignment column shows no warnings either, which also suggests the library supports 16 KB pages.

 

image.thumb.png.dfd6a18f72f7814376d137d6a2739ce4.png

 

However, I uploaded the .aab to the Play Console three days ago and I still see the message: "Page size — does not support 16 KB memory pages".

My question: How should I implement 16 KB page size support in Delphi 12.1 so that Google Play Console accepts the app and the check passes? 

Share this post


Link to post

What’s confusing is that if you look at the ELF LOAD sections in the .so, the alignment is correct (0x4000), but when I inspect it with llvm-readelf -n, the .note.gnu.property section is either missing or not formed properly. From what I can tell, Google seems to rely on this ELF note as the official marker for 16 KB support, not just the LOAD alignment.

 

I tried patching the .so with llvm-objcopy to add .note.gnu.property manually, and even hooked a PowerShell script into Delphi’s Post-Build Events, but the event actually fires before Delphi finishes producing libMyApp.so, so the patch never applies.

 

The frustrating part is that Embarcadero clearly knows about Google’s new requirements, yet the Delphi toolchain still doesn’t emit a proper .note.gnu.property and there’s been no hotfix or workaround provided. Right now developers are left trying to patch .so files by hand, re-pack .aab files, or experiment with NDK tools, while time is running out before the Play Console enforces the rule.

  • Confused 1

Share this post


Link to post

I don't know about your Delphi CE, but in the regular Delphi 12.3 you fill in this and it works:

 

test.png

Share this post


Link to post
1 hour ago, Doug Rudd said:

I don't know about your Delphi CE, but in the regular Delphi 12.3 you fill in this and it works:

In Delphi 12.1 these settings look like this:

 

image.thumb.png.69831813b7c4e4d8832417c25ae416c4.png

Share this post


Link to post
7 hours ago, apachx said:

The frustrating part is that Embarcadero clearly knows about Google’s new requirements..

Yes, and they're catered for in Delphi 12.2 and above. The page alignment occurs during the packaging phase, and the support for 16KB was added then.

Share this post


Link to post
12 hours ago, Dave Nottage said:

Yes, and they're catered for in Delphi 12.2 and above. The page alignment occurs during the packaging phase, and the support for 16KB was added then.

Yes, I know this works in newer versions of Delphi. But the point is, if Embarcadero makes the Community Edition available for free, then it should also ensure some degree of backward support - at least in small details that Google periodically requires. A hotfix once every six months, or at least once a year, wouldn’t take many resources, but it would automatically generate significant "marketing" support from users. It’s not a good look to abandon developers who built their products with your tools, gained their own users, but then can't update in time and risk being blocked in the Play Market or elsewhere.

Share this post


Link to post
15 hours ago, apachx said:

In Delphi 12.1 these settings look like this:

 

image.thumb.png.69831813b7c4e4d8832417c25ae416c4.png

hello 

Will this method pass the Play Store’s 16 KB requirement?

I’m using Delphi 12.1

Share this post


Link to post
4 hours ago, donie said:

hello 

Will this method pass the Play Store’s 16 KB requirement?

I’m using Delphi 12.1

Hi. No. That’s why I created this thread.

Share this post


Link to post

Just to report that I'm on Delphi 12.2 (unpatched) and this is how my Linking settings look like (no Maximum Page Size entry):

image.thumb.png.b10696d3cb50ebf73f30c5c4c3686c8d.png


And in Application -> Packaging the page alignment override is not present either:


image.thumb.png.c09d8c4e4acb1278255fb4a8193e9f8f.png

 

So I think Delphi 12.3 and up is the way to go for proper 16KB page size support.

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×