Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #777 from faisal00813/android_builds
Browse files Browse the repository at this point in the history
Android builds arm arm64 and x86
  • Loading branch information
Vyacheslav authored Jun 28, 2018
2 parents 891a41a + 1774122 commit 0518ecf
Show file tree
Hide file tree
Showing 22 changed files with 1,106 additions and 148 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ After successfully compiling `libindy`, you will need to add the path containing
* [RHEL based distributions (Amazon Linux 2017.03)](doc/rhel-build.md)
* [Windows](doc/windows-build.md)
* [MacOS](doc/mac-build.md)
* [Android](doc/android-build.md)

**Note:**
By default `cargo build` produce debug artifacts with a large amount of run-time checks.
Expand Down
57 changes: 57 additions & 0 deletions doc/android-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Building binaries of LibIndy for Android

**Not ready for production use! Not fully tested.**

## Prerequisites

- Docker

## Dependencies
- The build scripts downloads the prebuilt dependencies while building. The prebuilt dependencies are available [here](/~https://github.com/evernym/indy-android-dependencies/tree/master/prebuilt)
- If you want build the dependencies by yourself the instructions for that can be found [here](/~https://github.com/evernym/indy-android-dependencies)

## How to build.
- Run `indy-sdk/libindy/build-libindy-android.sh` to build libindy for arm, arm64 and x86

## Usage
- Copy generated `indy-sdk/libindy/build_scripts/android/libindy_<ARCHITECTURE>/libindy.so` to the jniLibs folder of your android project
- Load library using the JNA


## Notes:
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

##Known Issues

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

- If you are using Linux and want to build without docker, use the script`indy-sdk/libindy/build_scripts/android/build.withoutdocker.sh` .
- usage e.g `./build.withoutdocker.sh -d x86 16 i686-linux-android` to download the prebuilt binaries and build for x86 using api level 16 with ABI i686-linux-android
- e.g `./build.withoutdocker.sh x86 16 i686-linux-android openssl_x86 libsodium_x86 libzmq_x86` if you want to pass the dependencies to the script


# Building binaries of Libnullpay for Android

**Not ready for production use! Not fully tested.**

## Prerequisites

- Docker

## Dependencies
- Libindy for Android


## How to build.
- Copy the `indy-sdk/libindy/build_scripts/android/libindy_<ARCHITECTURE>` folders to `indy-sdk/libnullpay/build_scripts/android/`
- Run `indy-sdk/libnullpay/build-libnullpay-android.sh` to build libnullpay for arm, arm64 and x86



Loading

0 comments on commit 0518ecf

Please sign in to comment.