Commit 2fa86c42 authored by BogDan Vatra's avatar BogDan Vatra
Browse files

Android: Update OpenSSL page


Fixes: QTBUG-76202
Change-Id: I0ea577fcc573ae181cda25d4860c8527dccae415
Reviewed-by: default avatarEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
 
Showing with 10 additions and 67 deletions
......@@ -317,83 +317,23 @@ support on the target.
The following instructions guide you to build and add the OpenSSL libraries to
the APK:
\list 1
\li Download the \l{OpenSSL: Build Setup Script}{setup script} to configure
the build environment.
\note Ensure that you save the script with Unix line-endings if your
build host is Unix or Linux.
\li Make the following changes in the setup script:
\list
\li Set appropriate values to the \c _ANDROID_EABI and
\c _ANDROID_ARCH variables. For example, to build for 64-bit ARM
architecture using toolchain version v4.9, set
\c aarch64-linux-android-4.9 and \c arch-arm64 values to
\c _ANDROID_EABI and \c _ANDROID_ARCH respectively.
\li Add the \c windows-x86 or \c windows-x86_64 to the \c hosts list on
line \c 107, if your build host is Windows.
\li Add the following after line \c 128 to build for 64-bit ARM
architecture:
\badcode
arch-arm64)
ANDROID_TOOLS="aarch64-linux-android-gcc aarch64-linux-android-ranlib aarch64-linux-android-ld"
;;
\endcode
\li Add the following after line \c 213 if \c _ANDROID_ARCH is set
to \c arch-arm64:
\badcode
if [ "$_ANDROID_ARCH" == "arch-arm64" ]; then
export MACHINE=armv8
export RELEASE=2.6.37
export SYSTEM=android64
export ARCH=arm
export CROSS_COMPILE="aarch64-linux-android-"
fi
\endcode
\li Comment out the \c FIPS section if it is not used or define the
\c FIPS_SIG environment variable with the FIPS signature
location.
\endlist
\li Define \c ANDROID_NDK_ROOT environment variable with the NDK
location.
\li Provide executable rights for the setup script and run it:
\badcode
chmod a+x Setenv-android.sh
. ./Setenv-android.sh
\endcode
The script prints the following configuration details to the prompt when it
completes:
\badcode
ANDROID_NDK_ROOT: /home/user1/android-ndk-r10d
ANDROID_ARCH: arch-arm64
ANDROID_EABI: aarch64-linux-android-4.9
ANDROID_API: android-21
ANDROID_SYSROOT: /home/user1/android-ndk-r10d/platforms/android-21/arch-arm64
ANDROID_TOOLCHAIN: /home/user1/android-ndk-r10d/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin
FIPS_SIG:
CROSS_COMPILE: aarch64-linux-androideabi-
ANDROID_DEV: /home/user1/android-ndk-r10d/platforms/android-21/arch-arm64/usr
\endcode
\li Download the latest OpenSSL sources from \l{http://www.openssl.org/source}.
\li Download the latest OpenSSL 1.1.x sources from \l{http://www.openssl.org/source}.
\li Extract the sources to a folder and navigate to that folder using
the CLI.
\note If your development platform is Windows, you need \c msys with
\c perl v5.14 or later to build OpenSSL.
\li Add android llvm toolchain to your path:
\badcode
export PATH="<android_ndk_path>/toolchains/llvm/prebuilt/<host>/bin":$PATH
\endcode
\li Configure the OpenSSL sources to build for Android using
the following command:
\badcode
./Configure shared android
./Configure shared android-<arch> -D__ANDROID_API__=21
\endcode
\note You must consider enabling/disabling the SSL features based on the
......@@ -413,6 +353,9 @@ the APK:
\li Run your application to see it running on the device.
\endlist
\note here \l{https://github.com/KDAB/android_openssl} you can find a script which
can be used to compile openssl for all android abis and also latest prebuilt libs.
Qt Creator builds your application and creates an application package (APK)
with the OpenSSL libraries bundled in it. Once the APK is ready, it uses \c adb
to deploy the APK on the target you chose and launch the application.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment