Coder Social home page Coder Social logo

curl-boringssl-android's Introduction

curl-boringssl-android

Compiles curl (and dependencies ) for Android

Dynamic linking (default) has most features, static has some removed due to various issues/incompatibilities

Prerequisites

Linux (I've tested this on Manjaro)

for Ubuntu

sudo apt install -y cmake autoconf libtool go ninja-build ln -s /usr/bin/ninja /usr/bin/ninja-build

Download

If you do not want to compile them yourself, you can download pre-compiled static binaries from Cross-Compiled-Binaries-Android.
Doing your own compilation is recommended, since the pre-compiled binary can become outdated soon.

Update git submodules to compile newer versions of the libraries:

cd submodule_directory
git checkout LATEST_STABLE_TAG
cd ..

Usage

bash
git clone --recurse-submodules https://github.com/Zackptg5/curl-boringssl-android.git

Optional: Update git submodules to compile newer versions of the libraries:

cd submodule_directory
git checkout LATEST_STABLE_TAG
cd ..

or

git submodule update --init --recursive

Edit build.sh script:

NDK=android_ndk_version_you_want_to_use
export HOST_TAG=see_this_table_for_info # https://developer.android.com/ndk/guides/other_build_systems#overview
export MIN_SDK_VERSION=21 # or any version you want (dependent on the ndk version - keep 21 if in doubt)
export STATIC=false #Change to true for static binary - note that there will be less features then with dynamic
export ARCH="arm arm64 x86 x64" # Remove ones you don't want to compile

Run build script

chmod +x ./build.sh
./build.sh

All compiled libs are located in build directory.

Options

Change scripts' configure arguments to meet your requirements.

Note that https has been fixed now in Android so the peer verification failed message no longer occurs. The solution was to set --with-ca-path=/system/etc/security/cacerts configure flag and to use boringssl instead of openssl

Issues

Curl has weird DNS error in Android Q when not run as superuser

Working Example

Checkout this repo to see how to integrate compiled static libraries into an existing Android project, including Android.mk setup and JNI configurations.

Credits of Originality:

This is a fork of the original here: https://github.com/robertying/openssl-curl-android

curl-boringssl-android's People

Contributors

lihua-official avatar liwenjie119 avatar robertying avatar zackptg5 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.