Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. open ssl for anroid - libcripto.so and libssl.so
Qt 6.11 is out! See what's new in the release blog

open ssl for anroid - libcripto.so and libssl.so

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 45 Views 1 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.
  • L Offline
    L Offline
    liner
    wrote last edited by liner
    #1

    Qt Creator 19.0.2, Qt 6.11.1
    There is error while deploying:

    E/linker  ( 3025): library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/org.qtproject.example.MyApp-b285bi3dg0ygDJiKbup0CA==/lib/arm/libQt6Core_armeabi-v7a.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/org.qtproject.example.MyApp-b285bi3dg0ygDJiKbup0CA==/lib/arm:/data/app/org.qtproject.example.MyApp-b285bi3dg0ygDJiKbup0CA==/base.apk!/lib/armeabi-v7a", permitted_paths="/data:/mnt/expand:/data/data/org.qtproject.example.MyApp"]
    

    As its written in https://doc.qt.io/qt-6.11/android-openssl-support.html, I put in CMakeList.txt

    if (ANDROID)
        include(FetchContent)
        FetchContent_Declare(
            android_openssl
            DOWNLOAD_EXTRACT_TIMESTAMP true
            URL https://github.com/KDAB/android_openssl/archive/refs/heads/master.zip
        )
        FetchContent_MakeAvailable(android_openssl)
        include(${android_openssl_SOURCE_DIR}/android_openssl.cmake)
    endif()
    

    and

    if (ANDROID)
        add_android_openssl_libraries(MyApp)
    endif()
    

    command created folder

    ~/cpp/MyApp/MyApp/build/Qt_6_11_1_for_Android_armeabi_v7a-Debug/_deps
    

    with android_openssl-build, android_openssl-src and android_openssl-subbuild.
    However, the error still remains, despite the fact that in the apk file

    ~/cpp/MyApp/MyApp/build/Qt_6_11_1_for_Android_armeabi_v7a-Debug/android-build-MyApp/build/outputs/apk/debug/android-build-MyApp-debug.apk
    

    contains files

    /lib/armeabi-v7a/libcripto.so
    

    and

    /lib/armeabi-v7a/libssl.so
    

    I searched the net, GPT-5 @ duck.ai says that command

    for f in $(unzip -Z1 android-build-MyApp-debug.apk | grep "lib/armeabi-v7a/"); do unzip -p android-build-MyApp-debug.apk $f > /tmp/$$.so; echo "== $f =="; readelf -d /tmp/$$.so | grep NEEDED || true; done
    

    must show libcripto.so in section

    == lib/armeabi-v7a/libplugins_tls_qopensslbackend_armeabi-v7a.so ==
     0x00000001 (NEEDED)                     Совм. исп. библиотека: [libQt6Network_armeabi-v7a.so]
     0x00000001 (NEEDED)                     Совм. исп. библиотека: [libQt6Core_armeabi-v7a.so]
     0x00000001 (NEEDED)                     Совм. исп. библиотека: [liblog.so]
     0x00000001 (NEEDED)                     Совм. исп. библиотека: [libm.so]
     0x00000001 (NEEDED)                     Совм. исп. библиотека: [libc++_shared.so]
     0x00000001 (NEEDED)                     Совм. исп. библиотека: [libdl.so]
     0x00000001 (NEEDED)                     Совм. исп. библиотека: [libc.so]
    

    same as it does in

    == lib/armeabi-v7a/libssl.so ==
     0x00000001 (NEEDED)                     Совм. исп. библиотека: [libcrypto.so]
     0x00000001 (NEEDED)                     Совм. исп. библиотека: [libdl.so]
     0x00000001 (NEEDED)                     Совм. исп. библиотека: [libc.so]
    

    Any suggestions?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi,

      Something seems off. The error message suggests that the library are looked for in the system folders rather than your apk.
      Am I correct ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

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