Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. compiling and adding openssl for QT android apk
Qt 6.12 LTS is out! See what's new in the release blog

compiling and adding openssl for QT android apk

Scheduled Pinned Locked Moved Solved Mobile and Embedded
12 Posts 3 Posters 4.0k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • sierdzioS sierdzio

    Is SSL linked and deployed? Do you get any warnings? Which Android version you test this on?

    A Offline
    A Offline
    AMOL
    wrote on last edited by
    #3

    @sierdzio ssl link means add extra libraries in build android apk right?

    I get this error:
    library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/org.qtproject.example.Airtls-aXxH4nLGzc1Ll3UqvzQlWg==/lib/arm/libQt5Core.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/org.qtproject.example.Airtls-aXxH4nLGzc1Ll3UqvzQlWg==/lib/arm:/data/app/org.qtproject.example.Airtls-aXxH4nLGzc1Ll3UqvzQlWg==/base.apk!/lib/armeabi-v7a", permitted_paths="/data:/mnt/expand:/data/data

    I am using Android version 10

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #4

      Yes, SSL libraries have to be bundled together with your APK (also, remember about exports restrictions).

      You have this done if you followed the second link you have shared:

      contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
          ANDROID_EXTRA_LIBS = \
              $$PWD/3rdparty/openssl-armv7/libcrypto.so \
              $$PWD/3rdparty/openssl-armv7/libssl.so
      }
      

      But it looks like Android is trying to load a different implementation from /system. Perhaps Google changed something again in Android 10 :( Or the paths are wrong and APK does not really contain these .so files.

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AMOL
        wrote on last edited by AMOL
        #5

        when I tried to check suport for openssl QT android
        using
        qDebug() << "sslsslssl==="<<QSslSocket::supportsSsl() << QSslSocket::sslLibraryBuildVersionString();

        It gives me
        sslsslssl=== false "OpenSSL 1.1.1b 26 Feb 2019"

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #6

          Huh, that's bizarre. Looks like it does see the SSL libs but cannot use them? Weird. Sorry, I don't think I know how to solve it. The only thing that comes to my mind is that perhaps you are using old Qt which expects OpenSSL 1.0 instead of 1.1.

          (Z(:^

          A 1 Reply Last reply
          0
          • sierdzioS sierdzio

            Huh, that's bizarre. Looks like it does see the SSL libs but cannot use them? Weird. Sorry, I don't think I know how to solve it. The only thing that comes to my mind is that perhaps you are using old Qt which expects OpenSSL 1.0 instead of 1.1.

            A Offline
            A Offline
            AMOL
            wrote on last edited by
            #7

            @sierdzio Ohhh

            I am using
            QT creator 4.9.1
            Qt based on QT 5.13.0

            android NDK version 20.0.5594570
            android sdk version 26.1.1

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #8

              Qt 5.13 is recent enough, I think, but you can check with 5.14.1 just to be sure.

              (Z(:^

              A 1 Reply Last reply
              0
              • sierdzioS sierdzio

                Qt 5.13 is recent enough, I think, but you can check with 5.14.1 just to be sure.

                A Offline
                A Offline
                AMOL
                wrote on last edited by
                #9

                @sierdzio I cheked that too but same issue

                1 Reply Last reply
                0
                • A AMOL

                  Hey QTmasters anyone can help me with QT android openssl issue?

                  ISSUE:
                  QSslSocket::supportsSsl() return me false while running on android but on windows it is working fine

                  I tried to use prebuilt openssl but still it is not working

                  also I tried to build openssl for QT android form this link
                  https://www.tal.org/tutorials/openssl_qt_android

                  still issue has not resolved

                  CAn you help me with this?
                  Thanks in advance:)

                  ekkescornerE Offline
                  ekkescornerE Offline
                  ekkescorner
                  Qt Champions 2016
                  wrote on last edited by
                  #10

                  @AMOL have you tried libs from https://github.com/KDAB/android_openssl

                  ekke ... Qt Champion 2016 | 2024 ... mobile business apps

                  A 1 Reply Last reply
                  0
                  • ekkescornerE ekkescorner

                    @AMOL have you tried libs from https://github.com/KDAB/android_openssl

                    A Offline
                    A Offline
                    AMOL
                    wrote on last edited by
                    #11

                    @ekkescorner yes I have tried this also

                    A 1 Reply Last reply
                    0
                    • A AMOL

                      @ekkescorner yes I have tried this also

                      A Offline
                      A Offline
                      AMOL
                      wrote on last edited by
                      #12

                      Good news!!! I am able to resolve issue, Reason is I have to use QT 5.13.1 instead of 5.13.0.
                      Thank you all for helping me out and suggesting different solution.
                      Good day and Happy coding!!! :) :) :)

                      1 Reply Last reply
                      3

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt
                      • Unsolved