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

Android builds arm arm64 and x86 #777

Merged
merged 30 commits into from
Jun 28, 2018
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a98a882
Android build scripts for arm arm64 and x86 architectures
faisal00813 May 21, 2018
bb4bede
Fixed dependency build script
faisal00813 May 21, 2018
1ea665b
Merge branch 'master' into android_builds
faisal00813 May 21, 2018
6e0d31a
Fixed external storage path for universal compatibility
faisal00813 May 21, 2018
fbd59c0
upgraded log crate and env_logger to work with android_logger
faisal00813 May 31, 2018
ebcd7e5
fixed libsqlcipher-sys version in cargo.lock
Artemkaaas May 21, 2018
56fe80d
Merge remote-tracking branch 'upstream/master' into android_builds
faisal00813 May 31, 2018
1062c97
Added bundled feature to rusqlite
faisal00813 May 31, 2018
9a50823
Merge remote-tracking branch 'origin/android_builds' into android_builds
faisal00813 May 31, 2018
a6e37b8
Merge branch 'master' into android_builds
faisal00813 May 31, 2018
326ffef
Fixed a log statement
faisal00813 Jun 1, 2018
2c8045c
- Added build scripts for libnullpay for android support
faisal00813 Jun 7, 2018
2888dd6
Merge branch 'master' into android_builds
faisal00813 Jun 11, 2018
1a7c0ec
- simplified logic to find the android target in build.rs
faisal00813 Jun 13, 2018
c647217
Now sqlite is staically linked only on android platform.
faisal00813 Jun 15, 2018
b8a8d0e
Now sqlite is staically linked for android and ios.
faisal00813 Jun 15, 2018
33a609d
Updated openssl scripts to checkout the tag from build git repository
faisal00813 Jun 16, 2018
0d7dca8
Updated version of libsodium in build scripts
faisal00813 Jun 18, 2018
28a79d2
Simplified android build scripts. Now single script will build for al…
faisal00813 Jun 26, 2018
8279283
Moved the logic of creating the directory in android environment to a…
faisal00813 Jun 26, 2018
9a537d1
Now libindy panics when it cannot find path in EXTERNAL_STORAGE varia…
faisal00813 Jun 26, 2018
7d2b666
Added prebuild downloads capability in build.withoutdocker.sh script
faisal00813 Jun 27, 2018
4eb089b
Merge branch 'master' into android_builds
jovfer Jun 27, 2018
2ec128d
Merge branch 'android_builds' of https://github.com/faisal00813/indy-…
faisal00813 Jun 27, 2018
3ee6359
Changed `match` to `if else` in build.rs
faisal00813 Jun 27, 2018
a83969a
moved android declaration of rusqlite for better visibility
faisal00813 Jun 27, 2018
adfcde4
moved android declaration and general rusqlite togather to bottom of …
faisal00813 Jun 27, 2018
f5f8d69
Reverted: moved android declaration of rusqlite for better visibility
faisal00813 Jun 28, 2018
7ba938c
Fixed libnullpay build.rs
faisal00813 Jun 28, 2018
1774122
Merge branch 'master' into android_builds
jovfer Jun 28, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
55 changes: 55 additions & 0 deletions doc/android-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Building binaries of LibIndy for Android

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

## Prerequisites

- Docker
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can i build it on windows and MacOS?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only Linux is supported as of now.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this info to per-requirements? It is better to provide info about platform that we tested.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That info is present in Known Issues segment at the bottom of the document.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok


## 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` .


# 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