diff --git a/Makefile b/Makefile index 180054a..58c42b6 100644 --- a/Makefile +++ b/Makefile @@ -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 - diff --git a/README.md b/README.md index cd13410..d321e54 100644 --- a/README.md +++ b/README.md @@ -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 (, public domain) with a low-level JNI interface accessible from a single (singleton) single `SQLiteNative` class. diff --git a/jni/Android.mk b/jni/Android.mk index 79d3571..8bda209 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -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) diff --git a/jni/Application.mk b/jni/Application.mk index 64623e9..46e87ab 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -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 \ No newline at end of file diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000..ea59934 --- /dev/null +++ b/notes.txt @@ -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 \ No newline at end of file