Skip to content

Support 16KB page size devices #195

@mlewandowskipt

Description

@mlewandowskipt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions