Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maximalien/curl-android

Script which allows to build curl with OpenSSL support for Android. Test app is included as well.
https://github.com/maximalien/curl-android

android curl jni ndk openssl zlib

Last synced: 3 days ago
JSON representation

Script which allows to build curl with OpenSSL support for Android. Test app is included as well.

Awesome Lists containing this project

README

        

# curl-android

Before running ./build.sh make sure you have all dependencies. At least on my Linux Ubuntu machine I had to install:
$ sudo apt-get install autoconf

Also make sure you have selected correct path to Android NDK.

openssl, crypto and libz libraries can be found in build folder.
curl libraries/includes can be found in build/curl/arm64-v8a folder.

To test .so library on Android device (for dynamically linked curl):
```bash
$ cd test-app
$ ndk-build NDK_APPLICATION_MK=./jni/Application.mk
$ cd obj/local/arm64-v8a/
$ adb push test.out /data/local/tmp/
$ adb push libcurl.so /data/local/tmp/
$ adb push libssl.so /data/local/tmp/
$ adb push libcrypto.so /data/local/tmp/
$ adb shell
$ cd /data/local/tmp/
$ export LD_LIBRARY_PATH=.
$ ./test.out
```

Example output:
```bash
$ ./test.out
Sending cURL request...
* Trying 172.217.168.228:443...
* TCP_NODELAY set
* Connected to www.google.com (172.217.168.228) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 0
```