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

Support 16KB page size devices #97

Closed
jstewart5000 opened this issue Aug 17, 2024 · 5 comments
Closed

Support 16KB page size devices #97

jstewart5000 opened this issue Aug 17, 2024 · 5 comments

Comments

@jstewart5000
Copy link

jstewart5000 commented Aug 17, 2024

Description:

In Android 15 support for 16KB page sizes has been announced.

However,libfbjni.so ELF segments are not aligned (UNALIGNED (212)) using 16 KB ELF alignment. This results in runtime crash when loading libfbjni.so on emulator that is configured to use 16KB page size:

/tmp/my_apk_out/lib/arm64-v8a/libfbjni.so: UNALIGNED (212)

How To Reproduce:

  • This can also be verified by preparing and running alignment.sh script as described in the documentation.
  • The solution is to compile libfbjni.so with 16KB ELF alignment as described here.
Environment
  • Android Emulator 35.1.4
  • Google APIs Experimental 16k Page Size arm64 System Image - API Level VanillaIceCream - Revision 1
@cortinico
Copy link
Contributor

cc @alanleedev

@brocollie08
Copy link
Contributor

#98 this should do it

facebook-github-bot pushed a commit that referenced this issue Sep 20, 2024
Summary:
## Motivation

#97

Updated ndk to 27, enabled flexible page size support

https://developer.android.com/guide/practices/page-sizes#compile-r27-higher

Pull Request resolved: #98

Test Plan: Built locally and checked alignment via test method [here](https://developer.android.com/guide/practices/page-sizes#test) as well as `objdump` on the binary

Reviewed By: alanleedev

Differential Revision: D63021463

Pulled By: cortinico

fbshipit-source-id: d4415440836b138a76bc101320dbe4b98c32f3c7
@brocollie08
Copy link
Contributor

@cortinico would it be possible to cut a release for this so we can start pulling the artifact from maven?

@cortinico
Copy link
Contributor

Yup this will be included in 0.7.0:

@cortinico
Copy link
Contributor

This has been shipped in 0.7.0:
https://github.com/facebookincubator/fbjni/releases/tag/v0.7.0

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

No branches or pull requests

3 participants