Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 16kb page size on Android #19658

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Nov 26, 2024

Android devices will show up with 16kb pages in the future, although there are none right now. https://developer.android.com/guide/practices/page-sizes

More information here: https://android-developers.googleblog.com/2024/08/adding-16-kb-page-size-to-android.html

When trying to test the virtual 16kb image on Windows, I run into this issue. Silly that there's no better error message than some logspam.

Anyway, this means that this needs to be tested in a VM on Mac, reminder to self.

@hrydgard
Copy link
Owner Author

hrydgard commented Nov 26, 2024

This seems to not be enough. Will need to work on this - it seems TLS is broken and other things too.

Testing is most practical on a Mac with Android Studio, it turns out, as we can run ARM VMs with 16kb pages "natively" in the Android Emulator.

We probably need to switch to a newer NDK version, which will sacrifice compatibility with the very oldest devices.

Unfortunately that will require rebuilding the Android ffmpeg libraries with the new SDK and -fPIC, which is a bit painful but doable.

I'm holding off for now, but will get done before 1.19 - we need to get ahead of production devices appearing with this.

@hrydgard hrydgard marked this pull request as draft November 26, 2024 12:06
@hrydgard
Copy link
Owner Author

hrydgard commented Jan 5, 2025

Alright, initial compatibility checking with new NDK:

  • All ARM64 devices tried: Working (with ffmpeg recompile)
  • Nexus One (ARM32, : Not working anymore, missing symbol: __memcpy_chk
  • Redmi 9A (ARM32 userland) (Android 30): Working! Without recompiling ffmpeg.
  • Spreadtrum x86-64 test device (Android 24): Working! Without recompiling ffmpeg

So we now just have to figure out how far back ARM32 is broken. Maybe it's possible to define the missing symbols ourselves, if they're not too many...

@hrydgard
Copy link
Owner Author

hrydgard commented Jan 5, 2025

Got it working in the emulator on the Mac now! Things are looking good, well, except for old device compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant