Building binaries of LibIndy for Android

Not ready for production use! Not fully tested.

Supported architectures are arm, armv7, arm64, x86 and x86_64


  • Docker


  • The build scripts downloads the prebuilt dependencies while building. The prebuilt dependencies are available here
  • If you want build the dependencies by yourself the instructions for that can be found here

How to build.

  • If on Ubuntu make sure you have these packages installed

    apt-get install -y \
             pkg-config \
             libssl-dev \
             libgmp3-dev \
             curl \
             build-essential \
             libsqlite3-dev \
             cmake \
             apt-transport-https \
             ca-certificates \
             wget \
             devscripts \
             libncursesw5-dev \
             libzmq3-dev \
             zip \
             unzip \
  • Run indy-sdk/libindy/ to build libindy for arm, arm64 and x86

    • This generates the libindy zip file with each architecture in the indy-sdk/libindy
    • You can also set the LIBINDY_VERSION environment variable to append version number to generated zip file.
  • To generate the build for a single architecture run

    • e.g -d arm . The flag -d will download the dependencies automatically
    • e.g arm <PATH_TO_OPENSSL> <PATH_TO_SODIUM> <PATH_TO_ZMQ>. If -d flag is not passed you have to give paths to dependencies


  • Unzip the generated library.
  • Copy generated indy-sdk/libindy/build_scripts/android/libindy_arm/, indy-sdk/libindy/build_scripts/android/indy-android-dependencies/prebuild/sodium/libsodium_arm/lib/, and indy-sdk/libindy/build_scripts/android/indy-android-dependencies/prebuild/zmq/libzmq_arm/lib/ to the jniLibs/armeabi-v7a folder of your android project
  • Copy the corresponding files for jniLibs/arm64-v8a and jniLibs/x86 (similar to step above)
    • file is the dynamic library which is statically linked to its dependencies. This library can be loaded into apk without having dependencies along with it.
    • file is the dynamic library which is dynamically linked to its dependencies. you need to pass the dependencies into apk.
  • In order to use the library in Android, you need to set the EXTERNAL_STORAGE environment variable and load the library using JNA

Os.setenv("EXTERNAL_STORAGE", getExternalFilesDir(null).getAbsolutePath(), true);



The shared binary ( of only x86_64 architecture is not statically linked with its dependencies.

Make sure the Android app which is going to use libindy has permissions to write to external storage.

Add following line to AndroidManifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

Android emulator generally use x86 images

If you receive a JNA error, you may need to add additonal files into your jniLibs folder.

  • Add the correct version of to the corresponding subfolder in jniLibs ->
  • For example, android-aarch64.jar goes into the jniLibs/arm64-v8a subfolder
  • NOTE: You need to download the correct version of (tag 4.5.1 in the jna repo is the version accepted by Indy SDK v1.5)

##Known Issues

  • The Android build does not successfully compile on OSX
    • It fails on the libzmq linking

Building binaries of Libnullpay for Android

Not ready for production use! Not fully tested.


  • Docker


  • Libindy for Android

How to build.

  • Unzip libindy_android_<ARCH>_<VERSION>
  • Copy the extracted folder to indy-sdk/libnullpay/
  • Run indy-sdk/libnullpay/ to build libnullpay for arm, arm64 and x86
  • To build for individual architecture, run indy-sdk/libnullpay/ -d arm <PATH_TO_LIBINDY> to build libnullpay for arm
    • Or set env variable INDY_DIR=<PATH_TO_LIBINDY> and run -d arm to generate for arm
    • Set env variable INDY_DIR=<PATH_TO_LIBINDY> and run -d arm64 to generate for arm64
    • Set env variable INDY_DIR=<PATH_TO_LIBINDY> and run -d x86 to generate for x86