[Android Software/Hacking General [Developers Only]] Rom:
Regarding your instructions to follow your steps, i can't find in which file to find the commands you use: https://xdaforums.com/showthread.php?t=2073775

After having gone through a lot of tutorials and forums (not to mention 1 ton and wheelbarrows), I think i understood the way to follow to achieve a cross-compiled curl and the external libraries required to ultimately obtain a clean binary file for an architecture (i would take here as an example the arm64 architecture).

First of all:

- download the file containing the sources via wget

- extract the downloaded archive

- Have the Android studio folder as well as the folder containing the sources for the targeted Android versions as well as CMake and LDDB

- via export command, export the path to the variable NDK_ROOT (I took a name that speaks for itself), example:

-- export NDK_ROOT=/folder/to/ndk

- generate the autonomous tool chains with the desired type architecture to the desired output folder:

-- $NDK_ROOT/build/tools/make-standalone-toolchain.sh --arch=arm64 --platform=android-28 --install-dir=/folder/to/ndk-standalone-toolchain

- Export in a variable named TOOLCHAIN the path to the previously created autonomous tool chains:

-- TOOLCHAIN=/folder/to/to/ndk-standalone-toolchain

- Export several variables containing the required cross compiler and the necessary dependencies:

-- export PATH=$PATH:$TOOLCHAIN/bin

-- export SYSROOT=$TOOLCHAIN/sysroot

-- export ARCH=arm64

-- export CC=gcc-aarch64-linux-gnu

I don't know if these exports are sufficient or if they are missing.

- Download and extract the desired zlib version

- Configure its cross-compile in a static way:

-- ./configure --static

- Create sources ready to be compiled via the make command

- Export the path to the zlib sources in a new variable:

-- ZLIB_DIR=/path/to/zlib-versionnumber

- Do the same with openssl

- Export the variable:

-- CPPFLAGS="-mthumb -mfloat-abi=softfp -mfpu=vfp -march=${ARCH}"

- Configure the openssl compilation:

-- Configuration android no-asm no-shared --static --with-zlib-include=${ZLIB_DIR}/include --with-zlib-lib=${ZLIB_DIR}/lib

- Launch the openssl cross-compile:

-- make

- Export the path to the openssl source to a new variable:

-- OPENSSL_DIR=/path/to/openssl-versionnumber

- Download and extract the desired curl sources (via wget then tar or other depending on the archive format)

- Go to the directory of uncompressed curl sources via cd command

- Export some variables for the cross-compiled curl:

-- export CFLAGS="-v --sysroot=/path/to/root/dir/of/work -mandroid -march=$ARCH -mfloat-abi=softfp -mfpu=vfp -mthumb"

-- export CPPFLAGS="$CFLAGS -DANDROID -DCURL_STATICLIB -mthumb -mfloat-abi=softfp -mfpu=vfp -march=$ARCH -I${OPENSSL_DIR}/include/ -I${TOOLCHAIN}/include"

-- export LDFLAGS="-march=$ARCH -Wl,--fix-cortex-a8 -L${OPENSSL_DIR}"

- Configure curl cross-compile:

-- ./configure --host=arm-linux-androideabi --disable-shared --enable-static --disable-dependency-tracking --with-zlib=${ZLIB_DIR} --with-ssl=${OPENSSL_DIR} --without-ca-bundle --without-ca-bundle --without-ca-path --enable-ipv6 --enable-http --enable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher --disable-sspi --disable-manual --target=arm-linux-androideabi --prefix=/opt/curlssl

- Launch the cross compilation of curl:

-- make

- Get the final curl binary ready to be used for final users with an arm64 device in the:

-- /opt/curlssl folder

I'm sure there are some things missing, but overall is my approach correct?