From abff200a76fba3450d1d89cd682232f41207139b Mon Sep 17 00:00:00 2001 From: hooliapps <39572794+hooliapps@users.noreply.github.com> Date: Thu, 8 Aug 2024 22:27:53 +0200 Subject: [PATCH 1/6] 2024-08-08 Android 15 : Add Page Size 16 Kb support https://developer.android.com/guide/practices/page-sizes https://source.android.com/docs/core/architecture/16kb-page-size/16kb --- jni/Android.mk | 5 +++++ jni/Application.mk | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/jni/Android.mk b/jni/Android.mk index 79d3571..8c754c6 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 +# 08/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..9a0f754 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -1,5 +1,7 @@ #APP_ABI := all -APP_ABI := armeabi armeabi-v7a x86 x86_64 arm64-v8a +#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 +APP_PLATFORM := android-22 From 07de7695b2f2c121d82ba5a7b5af343eacffd8e0 Mon Sep 17 00:00:00 2001 From: hooliapps <39572794+hooliapps@users.noreply.github.com> Date: Tue, 13 Aug 2024 18:51:25 +0200 Subject: [PATCH 2/6] test test --- Makefile | 2 +- README.md | 9 +++++++++ notes.txt | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 notes.txt diff --git a/Makefile b/Makefile index 180054a..2d0d068 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ regen: # NOTE: adding v (verbose) flag for the beginning stage: ndkbuild: rm -rf lib libs - ndk-build + /cygdrive/c/Users/alex/AppData/Local/Android/Sdk/ndk/26.1.10909125/ndk-build.cmd zip sqlite-native-driver-libs.zip libs/*/* mv libs lib jar cf sqlite-native-driver.jar lib 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/notes.txt b/notes.txt new file mode 100644 index 0000000..d5a814d --- /dev/null +++ b/notes.txt @@ -0,0 +1,6 @@ +C:\Users\alex\Documents\GitHub\Android-sqlite-native-driver +Edit Android.mk +Add LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384" +cd C:\Users\alex\Documents\GitHub\Android-sqlite-native-driver with cygwin +make init +make From 9b8691bf8d32ae921dfeb2253b61c4454909d386 Mon Sep 17 00:00:00 2001 From: hooliapps <39572794+hooliapps@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:50:46 +0200 Subject: [PATCH 3/6] Test Test --- notes.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/notes.txt b/notes.txt index d5a814d..06727e8 100644 --- a/notes.txt +++ b/notes.txt @@ -1,6 +1,10 @@ C:\Users\alex\Documents\GitHub\Android-sqlite-native-driver Edit Android.mk -Add LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384" -cd C:\Users\alex\Documents\GitHub\Android-sqlite-native-driver with cygwin -make init -make +Add LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384,-z,common-page-size=16384" +Open cygwin + cd /cygdrive/c/Users/alex/Documents/GitHub/Android-sqlite-native-driver + make init + make + + +* arm64-v8a non recompilé \ No newline at end of file From fe75068962f15cd8a384786c8f497d0e4e7cba19 Mon Sep 17 00:00:00 2001 From: hooliapps <39572794+hooliapps@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:01:40 +0200 Subject: [PATCH 4/6] Test Test --- Makefile | 5 +++-- jni/Android.mk | 3 ++- jni/Application.mk | 5 ++--- notes.txt | 14 ++++++++++---- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 2d0d068..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 - /cygdrive/c/Users/alex/AppData/Local/Android/Sdk/ndk/26.1.10909125/ndk-build.cmd + # 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/jni/Android.mk b/jni/Android.mk index 8c754c6..2ea322d 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -29,9 +29,10 @@ LOCAL_CFLAGS += -DSQLITE_ENABLE_RTREE LOCAL_CFLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024 LOCAL_CFLAGS += -DSQLITE_DEFAULT_CACHE_SIZE=2000 -# 08/08/2024 Android 15 : Add Page Size 16Kb support +# 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 +APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384" LOCAL_SRC_FILES := ../native/sqlc_all.c diff --git a/jni/Application.mk b/jni/Application.mk index 9a0f754..a6880f4 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -1,7 +1,6 @@ #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 -APP_PLATFORM := android-22 - diff --git a/notes.txt b/notes.txt index 06727e8..4b50870 100644 --- a/notes.txt +++ b/notes.txt @@ -1,10 +1,16 @@ -C:\Users\alex\Documents\GitHub\Android-sqlite-native-driver +Notes to compile on Windows with Cygwin + Edit Android.mk +APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true Add LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384,-z,common-page-size=16384" + 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/26.1.10909125/ + export PATH=$PATH:export PATH=$PATH:/cygdrive/c/Program\ Files/Java/jdk-18.0.2/bin/ + source ~/.bashrc make init make - - -* arm64-v8a non recompilé \ No newline at end of file + +Remarks: +- armeabi platform is obsolete \ No newline at end of file From d3b0e1b0a69199197621cf04b31ea185e36a3ee4 Mon Sep 17 00:00:00 2001 From: hooliapps <39572794+hooliapps@users.noreply.github.com> Date: Wed, 4 Sep 2024 20:19:39 +0200 Subject: [PATCH 5/6] test test --- jni/Android.mk | 1 - jni/Application.mk | 3 +++ notes.txt | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/jni/Android.mk b/jni/Android.mk index 2ea322d..8bda209 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -32,7 +32,6 @@ 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 -APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384" LOCAL_SRC_FILES := ../native/sqlc_all.c diff --git a/jni/Application.mk b/jni/Application.mk index a6880f4..46e87ab 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -4,3 +4,6 @@ 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 index 4b50870..a436e00 100644 --- a/notes.txt +++ b/notes.txt @@ -1,12 +1,14 @@ 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 -Add LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384,-z,common-page-size=16384" 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/26.1.10909125/ + 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 From ffc32bf1ce621f1f52819f98466db75f31d42a4f Mon Sep 17 00:00:00 2001 From: hooliapps <39572794+hooliapps@users.noreply.github.com> Date: Wed, 4 Sep 2024 20:20:01 +0200 Subject: [PATCH 6/6] test test --- notes.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notes.txt b/notes.txt index a436e00..ea59934 100644 --- a/notes.txt +++ b/notes.txt @@ -1,3 +1,5 @@ +THIS IS A TEST ! + Notes to compile on Windows with Cygwin Edit Android.mk