Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ regen:
# NOTE: adding v (verbose) flag for the beginning stage:
ndkbuild:
rm -rf lib libs
ndk-build
# 29/08/2024 Android 15 : Add Page Size 16Kb support
# ndk-build
ndk-build.cmd
zip sqlite-native-driver-libs.zip libs/*/*
mv libs lib
jar cf sqlite-native-driver.jar lib

clean:
rm -rf obj lib libs sqlite-native-driver.jar *.zip

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# WARNING TEST PLUGIN

This plugin is forked from https://github.com/liteglue/Android-sqlite-native-driver, and only provided to test the compilation of new Libs for Android 15 16Kb Page Size.
TODO:
- Test libraries
- Replace hardcoded path (ex: ndk-build in Mainfile)
- Test with https://github.com/hooliapps/cordova-sqlite-legacy-build-support / https://github.com/brodycj/cordova-sqlite-legacy-build-support /
- Commit in the original package

# Android sqlite native driver

Provides Android NDK build of sqlite3 (<http://sqlite.org/>, public domain) with a low-level JNI interface accessible from a single (singleton) single `SQLiteNative` class.
Expand Down
5 changes: 5 additions & 0 deletions jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ LOCAL_CFLAGS += -DSQLITE_ENABLE_RTREE
LOCAL_CFLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024
LOCAL_CFLAGS += -DSQLITE_DEFAULT_CACHE_SIZE=2000

# 29/08/2024 Android 15 : Add Page Size 16Kb support
# https://developer.android.com/guide/practices/page-sizes
# https://source.android.com/docs/core/architecture/16kb-page-size/16kb
LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"

LOCAL_SRC_FILES := ../native/sqlc_all.c

include $(BUILD_SHARED_LIBRARY)
6 changes: 5 additions & 1 deletion jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#APP_ABI := all
APP_ABI := armeabi armeabi-v7a x86 x86_64 arm64-v8a
# 29/08/2024 Android 15 : Add Page Size 16Kb support
# APP_ABI := armeabi armeabi-v7a x86 x86_64 arm64-v8a
APP_ABI := armeabi-v7a x86 x86_64 arm64-v8a
# For future consideration (needs testing):
#APP_ABI += mips mips64

# 03/09/2024 Android 15 : Add Page Size 16Kb support
APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true
20 changes: 20 additions & 0 deletions notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
THIS IS A TEST !

Notes to compile on Windows with Cygwin

Edit Android.mk
LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"

Edit Application.mk
APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true

Open cygwin
cd /cygdrive/c/Users/alex/Documents/GitHub/Android-sqlite-native-driver
export PATH=$PATH:/cygdrive/c/Users/alex/AppData/Local/Android/Sdk/ndk/27.0.12077973/
export PATH=$PATH:export PATH=$PATH:/cygdrive/c/Program\ Files/Java/jdk-18.0.2/bin/
source ~/.bashrc
make init
make

Remarks:
- armeabi platform is obsolete