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 #195

Open
mlewandowskipt opened this issue Jul 30, 2024 · 0 comments
Open

Support 16KB page size devices #195

mlewandowskipt opened this issue Jul 30, 2024 · 0 comments

Comments

@mlewandowskipt
Copy link

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

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

java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in "/data/app/~~-4biVEV5Nsst_51cMfx4Rg==/com.myapp-UApKSN3Ka7mJzUoGgCsMEg==/base.apk!/lib/arm64-v8a/libsqlite3x.so" (new hash type from the future?)
    at java.lang.Runtime.loadLibrary0(Runtime.java:1081)
    at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
    at java.lang.System.loadLibrary(System.java:1765)
    at io.requery.android.database.sqlite.SQLiteDatabase.<clinit>(Unknown Source:2)
    at io.requery.android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(Unknown Source:95)
    at io.requery.android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SourceFile:3)
    at io.requery.android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SourceFile:1)

This can also be verified by preparing and running alignment.sh script as described in the documentation.

The solution is to compile libsqlite3x.so with 16KB ELF alignment as described here.

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

1 participant