8000 adding in new so's for now - need to replace this later · Fiv38/android-database-sqlcipher@191bc61 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 191bc61

Browse files
committed
adding in new so's for now - need to replace this later
1 parent 7b5feda commit 191bc61

17 files changed

+184
-0
lines changed

external/Android.mk-2.2

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#
2+
# Before building using this do:
3+
# make -f Android.mk build-local-hack
4+
# ndk-build
5+
# ndk-build
6+
# make -f Android.mk copy-libs-hack
7+
8+
LOCAL_PATH := $(call my-dir)
9+
LOCAL_PRELINK_MODULE := false
10+
11+
# how on earth to you make this damn Android build system run cmd line progs?!?!
12+
build-local-hack: sqlcipher/sqlite3.c ../obj/local/armeabi/libcrypto.so
13+
14+
sqlcipher/sqlite3.c:
15+
cd sqlcipher && ./configure
16+
make -C sqlcipher sqlite3.c
17+
18+
# TODO include this Android.mk to integrate this into the build
19+
../obj/local/armeabi/libcrypto.so:
20+
cd openssl && ndk-build -j4
21+
install -p openssl/libs/armeabi/libcrypto.so openssl/libs/armeabi/libssl.so \
22+
../obj/local/armeabi/
23+
24+
copy-libs-hack: build-local-hack
25+
install -p -m644 openssl/libs/armeabi/*.so ../obj/local/armeabi/
26+
install -p -m644 libs/armeabi/*.so ../obj/local/armeabi/
27+
## install -p -m644 android-2.2/*.so ../obj/local/armeabi/
28+
29+
project_ldflags:= -Llibs/armeabi/ -Landroid-2.2/
30+
31+
#------------------------------------------------------------------------------#
32+
# libsqlite3
33+
34+
# NOTE the following flags,
35+
# SQLITE_TEMP_STORE=3 causes all TEMP files to go into RAM. and thats the behavior we want
36+
# SQLITE_ENABLE_FTS3 enables usage of FTS3 - NOT FTS1 or 2.
37+
# SQLITE_DEFAULT_AUTOVACUUM=1 causes the databases to be subject to auto-vacuum
38+
android_sqlite_cflags := -DHAVE_USLEEP=1 -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 -DSQLITE_THREADSAFE=1 -DNDEBUG=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_DEFAULT_AUTOVACUUM=1 -DSQLITE_TEMP_STORE=3 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_BACKWARDS
39+
40+
sqlcipher_files := \
41+
sqlcipher/sqlite3.c
42+
43+
sqlcipher_cflags := -DSQLITE_HAS_CODEC -DHAVE_FDATASYNC=0 -Dfdatasync=fsync
44+
45+
include $(CLEAR_VARS)
46+
47+
LOCAL_CFLAGS += $(android_sqlite_cflags) $(sqlcipher_cflags)
48+
LOCAL_C_INCLUDES := openssl/include sqlcipher
49+
LOCAL_LDFLAGS += $(project_ldflags)
50+
LOCAL_LDLIBS += -lcrypto
51+
LOCAL_MODULE := libsqlcipher
52+
LOCAL_SRC_FILES := $(sqlcipher_files)
53+
54+
include $(BUILD_SHARED_LIBRARY)
55+
56+
#------------------------------------------------------------------------------#
57+
# libsqlcipher_android (our version of Android's libsqlite_android)
58+
59+
# these are all files from various external git repos
60+
libsqlite3_android_local_src_files := \
61+
android-sqlite/android/sqlite3_android.cpp
62+
# android-sqlite/android/PhonebookIndex.cpp \
63+
# android-sqlite/android/PhoneNumberUtils.cpp \
64+
# android-sqlite/android/OldPhoneNumberUtils.cpp \
65+
# android-sqlite/android/PhoneticStringUtils.cpp \
66+
# android-sqlite/android/PhoneNumberUtilsTest.cpp \
67+
# android-sqlite/android/PhoneticStringUtilsTest.cpp \
68+
69+
include $(CLEAR_VARS)
70+
71+
## this might save us linking against the private android shared libraries like
72+
## libnativehelper.so, libutils.so, libcutils.so, libicuuc, libicui18n.so
73+
LOCAL_ALLOW_UNDEFINED_SYMBOLS := false
74+
75+
# TODO this needs to depend on libsqlcipher being built, how to do that?
76+
77+
LOCAL_REQUIRED_MODULES += libsqlcipher
78+
LOCAL_CFLAGS += $(android_sqlite_cflags) $(sqlite_cflags)
79+
LOCAL_C_INCLUDES := \
80+
$(LOCAL_PATH)/sqlcipher \
81+
$(LOCAL_PATH)/include \
82+
$(LOCAL_PATH)/icu4c/i18n \
83+
$(LOCAL_PATH)/icu4c/common \
84+
# $(LOCAL_PATH)/platform-system-core/include \
85+
# $(LOCAL_PATH)/platform-frameworks-base/include
86+
#LOCAL_LDFLAGS += $(project_ldflags)
87+
LOCAL_LDFLAGS += -L$(LOCAL_PATH)/android-2.2/ -L$(LOCAL_PATH)/libs/armeabi/
88+
LOCAL_LDLIBS := -lsqlcipher -llog -licuuc -licui18n -lutils -lcutils
89+
LOCAL_MODULE := libsqlcipher_android
90+
LOCAL_SRC_FILES := $(libsqlite3_android_local_src_files)
91+
92+
include $(BUILD_SHARED_LIBRARY)

external/Android.mk-2.3

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#
2+
# Before building using this do:
3+
# make -f Android.mk build-local-hack
4+
# ndk-build
5+
# ndk-build
6+
# make -f Android.mk copy-libs-hack
7+
8+
LOCAL_PATH := $(call my-dir)
9+
LOCAL_PRELINK_MODULE := false
10+
11+
# how on earth to you make this damn Android build system run cmd line progs?!?!
12+
build-local-hack: sqlcipher/sqlite3.c ../obj/local/armeabi/libcrypto.so
13+
14+
sqlcipher/sqlite3.c:
15+
cd sqlcipher && ./configure
16+
make -C sqlcipher sqlite3.c
17+
18+
# TODO include this Android.mk to integrate this into the build
19+
../obj/local/armeabi/libcrypto.so:
20+
cd openssl && ndk-build -j4
21+
install -p openssl/libs/armeabi/libcrypto.so openssl/libs/armeabi/libssl.so \
22+
../obj/local/armeabi/
23+
24+
copy-libs-hack: build-local-hack
25+
install -p -m644 openssl/libs/armeabi/*.so ../obj/local/armeabi/
26+
install -p -m644 libs/armeabi/*.so ../obj/local/armeabi/
27+
## install -p -m644 android-2.2/*.so ../obj/local/armeabi/
28+
29+
project_ldflags:= -Llibs/armeabi/ -Landroid-2.3/
30+
31+
#------------------------------------------------------------------------------#
32+
# libsqlite3
33+
34+
# NOTE the following flags,
35+
# SQLITE_TEMP_STORE=3 causes all TEMP files to go into RAM. and thats the behavior we want
36+
# SQLITE_ENABLE_FTS3 enables usage of FTS3 - NOT FTS1 or 2.
37+
# SQLITE_DEFAULT_AUTOVACUUM=1 causes the databases to be subject to auto-vacuum
38+
android_sqlite_cflags := -DHAVE_USLEEP=1 -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 -DSQLITE_THREADSAFE=1 -DNDEBUG=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_DEFAULT_AUTOVACUUM=1 -DSQLITE_TEMP_STORE=3 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_BACKWARDS
39+
40+
sqlcipher_files := \
41+
sqlcipher/sqlite3.c
42+
43+
sqlcipher_cflags := -DSQLITE_HAS_CODEC -DHAVE_FDATASYNC=0 -Dfdatasync=fsync
44+
45+
include $(CLEAR_VARS)
46+
47+
LOCAL_CFLAGS += $(android_sqlite_cflags) $(sqlcipher_cflags)
48+
LOCAL_C_INCLUDES := openssl/include sqlcipher
49+
LOCAL_LDFLAGS += $(project_ldflags)
50+
LOCAL_LDLIBS += -lcrypto
51+
LOCAL_MODULE := libsqlcipher
52+
LOCAL_SRC_FILES := $(sqlcipher_files)
53+
54+
include $(BUILD_SHARED_LIBRARY)
55+
56+
#------------------------------------------------------------------------------#
57+
# libsqlcipher_android (our version of Android's libsqlite_android)
58+
59+
# these are all files from various external git repos
60+
libsqlite3_android_local_src_files := \
61+
android-sqlite/android/sqlite3_android.cpp
62+
# android-sqlite/android/PhonebookIndex.cpp \
63+
# android-sqlite/android/PhoneNumberUtils.cpp \
64+
# android-sqlite/android/OldPhoneNumberUtils.cpp \
65+
# android-sqlite/android/PhoneticStringUtils.cpp \
66+
# android-sqlite/android/PhoneNumberUtilsTest.cpp \
67+
# android-sqlite/android/PhoneticStringUtilsTest.cpp \
68+
69+
include $(CLEAR_VARS)
70+
71+
## this might save us linking against the private android shared libraries like
72+
## libnativehelper.so, libutils.so, libcutils.so, libicuuc, libicui18n.so
73+
LOCAL_ALLOW_UNDEFINED_SYMBOLS := false
74+
75+
# TODO this needs to depend on libsqlcipher being built, how to do that?
76+
77+
LOCAL_REQUIRED_MODULES += libsqlcipher
78+
LOCAL_CFLAGS += $(android_sqlite_cflags) $(sqlite_cflags)
79+
LOCAL_C_INCLUDES := \
80+
$(LOCAL_PATH)/sqlcipher \
81+
$(LOCAL_PATH)/include \
82+
$(LOCAL_PATH)/icu4c/i18n \
83+
$(LOCAL_PATH)/icu4c/common \
84+
# $(LOCAL_PATH)/platform-system-core/include \
85+
# $(LOCAL_PATH)/platform-frameworks-base/include
86+
#LOCAL_LDFLAGS += $(project_ldflags)
87+
LOCAL_LDFLAGS += -L$(LOCAL_PATH)/android-2.3/ -L$(LOCAL_PATH)/libs/armeabi/
88+
LOCAL_LDLIBS := -lsqlcipher -llog -licuuc -licui18n -lutils -lcutils
89+
LOCAL_MODULE := libsqlcipher_android
90+
LOCAL_SRC_FILES := $(libsqlite3_android_local_src_files)
91+
92+
include $(BUILD_SHARED_LIBRARY)

external/android-2.2/libcrypto.so

635 KB
Binary file not shown.

external/android-2.2/libcutils.so

58 KB
Binary file not shown.

external/android-2.2/liblog.so

13.2 KB
Binary file not shown.

external/android-2.2/libssl.so

155 KB
Binary file not shown.
2.65 MB
Binary file not shown.

external/android-2.2/libutils.so

148 KB
Binary file not shown.

external/android-2.3/libcrypto.so

815 KB
Binary file not shown.

external/android-2.3/libcutils.so

58.2 KB
Binary file not shown.

external/android-2.3/libicui18n.so

1020 KB
Binary file not shown.

external/android-2.3/libicuuc.so

833 KB
Binary file not shown.

external/android-2.3/liblog.so

13.4 KB
Binary file not shown.
193 KB
Binary file not shown.

external/android-2.3/libssl.so

199 KB
Binary file not shown.
2.65 MB
Binary file not shown.

external/android-2.3/libutils.so

165 KB
Binary file not shown.

0 commit comments

Comments
 (0)
0