Comments (9)
You can use the build_libsodium.sh
script from my fork: https://github.com/MuntashirAkon/lazysodium-android
It'll build the libsodium.so
files and move them to the corresponding ABI directories inside jniLibs. You can edit the jni_dir
inside the script to copy them anywhere you want. I've also used -j
command for make which will use all the available CPUs to build the binaries which takes about 2 minutes on my device.
Usage:
./build_libsodium.sh ndk_path [api]
api
is set to 21 if not given.
NB: It will only build for arm-v7a, arm-v8a, x86, x86_64 because latest NDK only supports these variants.
from lazysodium-android.
Hi @alexamiryan and @MuntashirAkon,
I had been contacted a few months back for a similar thing. In fact, I am increasingly seeing F-Droid mentioned. Do you know if it would be worthwhile to have a script inside Lazysodium to build sources from scratch?
from lazysodium-android.
I had been contacted a few months back for a similar thing. In fact, I am increasingly seeing F-Droid mentioned. Do you know if it would be worthwhile to have a script inside Lazysodium to build sources from scratch?
I've implemented it on my repo already (but modified it a bit for my own use). I can make a PR with just this modification if you're interested. It takes less than 2 minutes to build libsodium on my 7 gen i3 dual core (4 threads) processor with 8 GB RAM. On JitPack, it takes less than a minute.
from lazysodium-android.
Can F-Droid invoke it's own build steps? Something like ./gradlew f-droid-build
?
I don't want to rebuild libsodium binaries over and over again because:
- I'd like to keep testing time low.
- It adds extra complexity.
from lazysodium-android.
I don't want to rebuild libsodium binaries over and over again because:
- I'd like to keep testing time low.
You don't have to build it over and over again. If you're using CI, you can cache the binaries and put a check in the build script (already done in my repo). Same can be done in other cases as well. F-Droid never cache anything. So, they'll simply rebuild it instead.
- It adds extra complexity.
No, it doesn't. You'll simply need a script (which I've already done on my end) and two tasks in the build.gradle: one for building the binaries and the other for cleaning up the binaries.
from lazysodium-android.
Thank you for the advice. OK, let me see if this can be integrated.
from lazysodium-android.
@MuntashirAkon do I have permission to use and/or modify your script here? https://github.com/MuntashirAkon/lazysodium-android/blob/master/build_libsodium.sh
from lazysodium-android.
do I have permission to use and/or modify your script here? https://github.com/MuntashirAkon/lazysodium-android/blob/master/build_libsodium.sh
Sure! Just add a credit line at the top of the file (should be MPL-2.0 dated 28 Oct 2020).
from lazysodium-android.
Is there any update? The repository still seems to be using non-free binaries/blobs. If you cannot manage the time, maybe I can help.
from lazysodium-android.
Related Issues (20)
- Getting UnsatisfiedLinkError when I try to init lazySodium HOT 2
- JNA vulnerabilities HOT 3
- Keygen XCHACHA20_POLY1305_IETF HOT 2
- "Key.fromPlainString" does not works as expected. HOT 2
- Possible future issue of using this repository? HOT 5
- Lazysodium-android was removed from Google Play. HOT 5
- unable to dissolve dependency HOT 3
- file encryption example
- Weird warning when building a release version: "Missing classes detected while running R8." HOT 3
- Decryption not working on real device, but on emulator it works fine HOT 1
- Documentation link in the readme is broken HOT 1
- A getting started link in the wiki is broken HOT 1
- How to import the library HOT 2
- LazySodiumAndroid.cryptoKdfDeriveFromKey() throws an exception if key length exceeds 32 bytes HOT 1
- Base64 import error in Android SDK version below 27 HOT 3
- cryptoAeadAES256GCM is not available
- Native library (com/sun/jna/android-aarch64/libjnidispatch.so) not found in resource path (.) HOT 3
- Misleading readme: the library is NOT complete libsodium for android, it's very limited HOT 1
- Release 5.1.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazysodium-android.