File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Instructions to build sqlcipher for Android
2+
3+ * Extract Android build toolChain from NDK
4+ 1. Download android-ndk-r10e
5+ 2. Create android build toolchain
6+ $NDK/build/tools/make-standalone-toolchain.sh --arch=arm --install-dir=<ANDROID_BUILD_TOOLCHAIN>
7+ 3. Export some environment variables
8+ export ANDROID_BUILD_TOOLCHAIN=<ANDROID_BUILD_TOOLCHAIN>
9+ export PATH=$ANDROID_BUILD_TOOLCHAIN/bin;$PATH
10+ export CROSS_SYSROOT=$ANDROID_BUILD_TOOLCHAIN/sysroot # important for cross compile
11+
12+ * Build OpenSSL
13+ 1. Download openssl-1.1.0g
14+ 2. Build OpenSSL
15+ ./Configure no-shared --cross-compile-prefix=arm-linux-androideabi- android-armeabi
16+ make
17+ make install DESTDIR=$CROSS_SYSROOT
18+
19+ * Build sqlcipher
20+ ./configure --disable-shared --enable-static=yes --enable-tempstore=yes CFLAGS="-fPIE -DSQLITE_HAS_CODEC -I$CROSS_SYSROOT/usr/local/include" LDFLAGS="-fPIE -pie -L$CROSS_SYSROOT/usr/local/lib $CROSS_SYSROOT/usr/local/lib/libcrypto.a" --host=arm-linux-androideabi
21+ make
You can’t perform that action at this time.
0 commit comments