android icon indicating copy to clipboard operation
android copied to clipboard

How to support the 16KB page size of Android 15

Open TenXu opened this issue 1 year ago β€’ 1 comments

Hello, Team Have you researched how to support the 16KB page size of Android 15 How to make Android WebRTC support the 16KB page size of Android 15

TenXu avatar Jul 25 '24 08:07 TenXu

I have tested, v125.6422.04 already supports 16KB page size of Android 15.

imndx avatar Aug 31 '24 09:08 imndx

WebRTC has supported 16KB page size since M121.

The following link is the commit with the fix.

  • https://chromium.googlesource.com/chromium/src/build/+/8918c32e85c10226c37806fde56f9d5c4dba11f3%5E%21

CASL0 avatar May 23 '25 07:05 CASL0

Good afternoon @davidliu, @cloudwebrtc ! I would really appreciate your help on this πŸ™ Is there any possibility to have 16Kb page size support to meet Google requirements? Here is info from google about it:

Starting November 1st, 2025, all new apps and updates to existing apps submitted to Google Play and targeting Android 15+ devices must support 16 KB page sizes on 64-bit devices.

Source Android | Set Android userspace to 16 KB Developer Android | Support 16 KB page sizes

Thank you!

DanyloOliinykSSG avatar Jul 25 '25 09:07 DanyloOliinykSSG

@DanyloOliinykSSG it already supports 16KB page size.

davidliu avatar Jul 26 '25 01:07 davidliu

@davidliu unfortunately looks like 137.7151.01 still have some issues with 16 Kb page size alignment πŸ˜•

I've added this dependency into a sample project (i can share it with you if needed):

implementation 'io.github.webrtc-sdk:android-prefixed:137.7151.01'

Then i've run script provided by Google to verify Android app has all *.so files aligned correctly. Here's script output:

./check_elf_alignment.sh app-release.apk

Recursively analyzing app-release.apk

NOTICE: Zip alignment check requires build-tools version 35.0.0-rc3 or higher.
  You can install the latest build-tools by running the below command
  and updating your $PATH:

    sdkmanager "build-tools;35.0.0-rc3"

=== ELF alignment ===
/var/folders/dl/v2fx13714qq6stp0ypqjsxk80000gq/T/app-release_out_XXXXX.2Cd3sRuy6q/lib/armeabi-v7a/liblkjingle_peerconnection_so.so: \e[31mUNALIGNED\e[0m (2**12)
/var/folders/dl/v2fx13714qq6stp0ypqjsxk80000gq/T/app-release_out_XXXXX.2Cd3sRuy6q/lib/armeabi-v7a/libandroidx.graphics.path.so: \e[32mALIGNED\e[0m (2**14)
/var/folders/dl/v2fx13714qq6stp0ypqjsxk80000gq/T/app-release_out_XXXXX.2Cd3sRuy6q/lib/x86/liblkjingle_peerconnection_so.so: \e[31mUNALIGNED\e[0m (2**12)
/var/folders/dl/v2fx13714qq6stp0ypqjsxk80000gq/T/app-release_out_XXXXX.2Cd3sRuy6q/lib/x86/libandroidx.graphics.path.so: \e[32mALIGNED\e[0m (2**14)
/var/folders/dl/v2fx13714qq6stp0ypqjsxk80000gq/T/app-release_out_XXXXX.2Cd3sRuy6q/lib/arm64-v8a/liblkjingle_peerconnection_so.so: \e[32mALIGNED\e[0m (2**14)
/var/folders/dl/v2fx13714qq6stp0ypqjsxk80000gq/T/app-release_out_XXXXX.2Cd3sRuy6q/lib/arm64-v8a/libandroidx.graphics.path.so: \e[32mALIGNED\e[0m (2**14)
/var/folders/dl/v2fx13714qq6stp0ypqjsxk80000gq/T/app-release_out_XXXXX.2Cd3sRuy6q/lib/x86_64/liblkjingle_peerconnection_so.so: \e[32mALIGNED\e[0m (2**14)
/var/folders/dl/v2fx13714qq6stp0ypqjsxk80000gq/T/app-release_out_XXXXX.2Cd3sRuy6q/lib/x86_64/libandroidx.graphics.path.so: \e[32mALIGNED\e[0m (2**14)
\e[31mFound 2 unaligned libs (only arm64-v8a/x86_64 libs need to be aligned).\e[0m

Please, note the UNALIGNED x86/liblkjingle_peerconnection_so.so and armeabi-v7a/liblkjingle_peerconnection_so.so

Am i missing something? Thank you!

DanyloOliinykSSG avatar Jul 28 '25 13:07 DanyloOliinykSSG

@DanyloOliinykSSG As the script mentions, only arm64-v8a/x86_64 libs need to be aligned. The libs you pointed at are not for 64-bit platforms and thus are not required to be aligned.

davidliu avatar Jul 28 '25 18:07 davidliu

@davidliu thank you for pointing that out! Looks like everything is fine then πŸ™ Have a nice day 😌

DanyloOliinykSSG avatar Aug 01 '25 12:08 DanyloOliinykSSG

To support the 16KB page size, I changed the dependency library from org.webrtc:google-webrtc:1.0.30039 to io.github.webrtc-sdk:android:137.7151.03. I noticed that after the voice call ended, the microphone still shows "In Use"。It didn't happen before 。I have already called AudioTrack.dispose(), do I need to call any other methods?

h001erolee avatar Nov 13 '25 08:11 h001erolee