Skip to content

HOW TO BUILD sqlcipher libs for Android with android ndk r19

Asterios Dimitriou edited this page Feb 3, 2019 · 1 revision

HOW TO BUILD sqlcipher libs for Android with android-ndk-r19

According to android-ndk-r19 changelog

Standalone toolchains are now unnecessary. Clang, binutils, the sysroot, and other toolchain pieces are now all installed to $NDK/toolchains/llvm/prebuilt/ and Clang will automatically find them.

Dependencies and assumptions

Android SDK Manager is installed in $HOME/androidsdk/

Android NDK is installed in $HOME/androidsdk/ndk-bundle/

export NDK=$HOME/androidsdk/ndk-bundle

Build OpenSSL library

wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1a.tar.gz
tar xf OpenSSL_1_1_1a.tar.gz
cd openssl-OpenSSL
ANDROID_NDK=$NDK \
  CC=clang \
  PATH=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH \
  ./Configure android-arm -D__ANDROID_API__=16