Technical request for guidance on enabling 16 KB page size support in Unreal Engine 5.4 using NDK r25b

Hello Team,

As you may know, Google Play now requires the use of 16 KB page sizes, as stated in the following document: Support 16 KB page sizes | Compatibility | Android Developers

We also noticed that your team has recently released support for this requirement in Unreal Engine 5.6.

We would like to ask about two points as outlined below:

  1. In our case, we are still using Unreal Engine 5.4 for our game. Could you please advise which components or changes we should consider merging from Unreal Engine 5.6 into 5.4 in order to support the 16 KB page size requirement?
  2. Since the 16 KB page size support requires NDK 28 or later, we would like to ask how we can enable this functionality in Unreal Engine when using an older NDK version (we are currently using NDK r25b). Is there any workaround or configuration that allows us to proceed without upgrading the NDK?

Let me know if you need more info.

Thanks a lot,

Nga Le

Hi Nga,

16K page size support is supported under r26b as per Google documentation here: https://developer.android.com/guide/practices/page-sizes#compile-r26-lower

Here’s a list of CLs for UE 5.6 that would need to be backported if staying on UE 5.4 is necessary for your project:

1) https://github.com/EpicGames/UnrealEngine/commit/4445a80451ac54f614416ab7426abbfa6ded6889

2) https://github.com/EpicGames/UnrealEngine/commit/0de5bbf20027ac6f8524ac587b3d99095894d962

3) https://github.com/EpicGames/UnrealEngine/commit/27ba14cf694705e694ed2c9f8c891b2cc0c0d946

4) https://github.com/EpicGames/UnrealEngine/commit/149561050ea8fff20b63c3997e154b0c7dbc9e9c

5) https://github.com/EpicGames/UnrealEngine/commit/4905609bf6051076e2f121473fcc030fb4886096

6) https://github.com/EpicGames/UnrealEngine/commit/1ebef47796732cc9421a59a049307d6b5f950d52

Best regards.

Hello [Content removed]

Thanks a lot for your help — it’s working perfectly on my end.

Thanks a lot,

Nga Le

Wonderful news. Thanks for the update Nga.

I just did it and can confirm that it also works for Unreal Engine 5.3.
For 5.3 some things were a little bit different though.

Here is the additional info for 5.3 for the 6 links from above:

  1. In Engine/Source/ThirdParty/HWCPipe/include/CMakeLists.txt
    I also changed cmake_minimum_required(VERSION 3.6) to version 3.13 and
    target_link_options(hwcpipe PRIVATE -z max-page-size=16384) has to be added to the end of the file as this line did not exist before.

    in Engine/Build/Android/Prebuilt/PSOService/Android/CMakeLists.txt
    target_link_options(psoservice PRIVATE -z max-page-size=16384) has to be added to the end of the file as this line did not exist before.

    in Engine/Build/Commit.gitdeps.xml
    you actually have to ignore all removed lines that start with <BlobHash or <PackHash. Instead remove the lines starting with <BlobHash or <PackHash found in this commit:
    https://github.com/EpicGames/UnrealEngine/commit/a73d0e1f9fd4df9b9a795e8afde47da34e6e0fc2
    The additions starting with <BlobHash or <PackHash have to be taken from the original commit. I am not sure if this is necessary, but as the hashes are sorted alphabetically I inserted them at the correct position. You can easily do this by searching one of the few lines above or beneath the change. Some of those lines do not exist in 5.3 so if that happens, just pick another until you find one. Then look where it fits alpabetically and insert it.

  2. Only do the changes for: Engine/Source/ThirdParty/GoogleGameSDK/gamesdk/games-frame-pacing/CMakeLists.txt
    Omit the other changes from the commit.

  3. Not needed for 5.3

  4. Like in the 5.4 solution

  5. You have to insert the whole function, as it does not exist yet. So just insert the whole
    static FORCEINLINE int64 GetMemoryMappingAlignment() function at line 127

  6. FPlatformProperties::GetMemoryMappingAlignment() is found twice in the file. Replace both instances with FPlatformMemory::GetStats().PageSize

Hope that helps!