Robosodium was born as a fork of kalium-jni. With this library you will be able to compile libsodium for Android platforms and automatically create the wrapper for the JNI.
Credits to:
- Libsodium: author Frank Denis and Contributors
- Kalium-jni: author joshjdevl and Contributors
- First of all download this repository and its submodules:
$ git clone https://github.com/GerardSoleCa/Robosodium
$ git submodule init
$ git submodule update
- Start from first clone:
$ ./do_the_job.sh
- Build JNI for Linux instead of Android:
$ ./do_the_job.sh linux
- Where to find the compiled libs:
cd libs # Libs for Android using the architecture dirs
cd linux_lib # Lib for Linux. To be used copy to /usr/lib for example. Or just place anywhere you want
- If something goes wrong or you want to run again some parts of the compilation, just call the following scripts:
do_the_job.sh # Start and run all the scripts
install_software.sh # First update aptitude cache and install necessary packages
build_jni_linux.sh # Build libsodium with jni for linux.
download_ndk.sh # Download the required Android NDK
build_android_libsodium.sh # Compile Libsodium for Android
build_jni.sh # Generate the JNI library (*.so)
On Linux, simply run:
$ ./build_aar
On OS X, ensure that you have SWIG, Android SDK and NDK installed, and your JAVA_HOME
, ANDROID_HOME
, ANDROID_NDK_HOME
set, then run:
$ ./build_aar_osx
Each part has its own software license, including:
- Libsodium ISC License
- kalium-jni Apache License. Version 2.0
- Robosodium Apache License. Version 2.0