This Magisk Module contains curl for Android .

ASUS_I006D:/ # /system/usr/bin/curl --version
curl 8.13.0-DEV (aarch64-unknown-linux-android) libcurl/8.13.0-DEV OpenSSL/3.3.1 zlib/1.3.1.1-motley brotli/1.0.9 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.63.0-DEV nghttp3/1.7.0-DEV
Build-Date: 2025-04-13
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets zstd
ASUS_I006D:/ # 



curl has been dynamically linked for the OS libraries only, so that the name resolution via DNS works, but no additional libraries are required to use the binary:

ASUS_I006D:/ # ldd /system/usr/bin/curl
	linux-vdso.so.1 => [vdso] (0x723d6ef000)
	libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x723b4e0000)
	libm.so => /apex/com.android.runtime/lib64/bionic/libm.so (0x723b480000)
	libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7237c1c000)
ASUS_I006D:/ # 

The customize script for the Magisk Module creates the file 

/system/etc/security/ca-certificates.crt

with all certificates currently installed on the phone in the directory

/system/etc/security/cacerts/

If no certificates are found, curl will use the certificates embedded in the binary. Use the command

 /system/usr/bin/curl --dump-ca-embed

to output the certificates embedded in the binary.

Use the curl parameter --cacert to select another bundle file with certificates

The module also contains the files necessary to use curl in other programs (libcurl.so and libcurl.a)


The configure options used to compile the binary are:

configure: Configured to build curl/libcurl:

  Host setup:       aarch64-unknown-linux-android
  Install prefix:   /system/usr
  Compiler:         /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang
   CFLAGS:          --sysroot /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIE -fPIC -isystem /data/develop/android/sysroot/usr/include -Wno-implicit-function-declaration -Wno-int-conversion -Qunused-arguments -Werror-implicit-function-declaration -O2
   CFLAGS extras:   
   CPPFLAGS:        --sysroot /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIE -fPIC -isystem /data/develop/android/sysroot/usr/include -Wno-implicit-function-declaration -Wno-int-conversion -DANDROID -D_GNU_SOURCE -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include
   LDFLAGS:         --sysroot /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -s -pie -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib
     curl-config:   -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib
   LIBS:            -lnghttp3 -lnghttp2 -lidn2 -lssh2 -lssh2 -lpsl -lssl -lcrypto -lssl -lcrypto -lzstd -lzstd -lbrotlidec -lbrotlidec -lz -lidn2 -lunistring -ldl -lm

  curl version:     8.13.0-DEV
  SSL:              enabled (OpenSSL v3+)
  SSH:              enabled (libssh2)
  zlib:             enabled
  brotli:           enabled (libbrotlidec)
  zstd:             enabled (libzstd)
  GSS-API:          no      (--with-gssapi)
  GSASL:            no      (libgsasl not found)
  TLS-SRP:          enabled
  resolver:         POSIX threaded
  IPv6:             enabled
  Unix sockets:     enabled
  IDN:              enabled (libidn2)
  Build docs:       enabled (--disable-docs)
  Build libcurl:    Shared=yes, Static=yes
  Built-in manual:  no      (--enable-manual)
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  Code coverage:    disabled
  SSPI:             no      (--enable-sspi)
  ca cert bundle:   /system/etc/security/ca-certificates.crt
  ca cert path:     /system/etc/security/cacerts
  ca cert embed:    /data/develop/android/source/curl-curl-8_13_0/ca-certificates.crt
  ca fallback:      yes
  LDAP:             no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS:            no      (--enable-ldaps)
  IPFS/IPNS:        enabled
  RTSP:             enabled
  RTMP:             no      (--with-librtmp)
  PSL:              enabled
  Alt-svc:          enabled (--disable-alt-svc)
  Headers API:      enabled (--disable-headers-api)
  HSTS:             enabled (--disable-hsts)
  HTTP1:            enabled (internal)
  HTTP2:            enabled (nghttp2)
  HTTP3:            enabled (openssl + nghttp3)
  ECH:              no      (--enable-ech)
  HTTPS RR:         no      (--enable-httpsrr)
  SSLS-EXPORT:      no      (--enable-ssls-export)
  Protocols:        dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
  Features:         alt-svc AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets zstd




History
  13.04.2025 /bs
    initial release of the Magisk Module
 
 

