Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt/Android on Debian?



  • Hi,
    I tryed the below page on Debian 9.9 64 bit:

    https://doc.qt.io/qt-5/android-getting-started.html

    But I could not install abd find below packages?...

    sudo apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
    sudo apt-get install libsdl1.2debian:i386

    Why? I really want to programing on Android with Qt but installing and running program is really difficult!

    Regards,
    Mucip:)


  • Lifetime Qt Champion

    @Mucip said in Qt/Android on Debian?:

    Why?

    Probably because package names changed in the meantime. Try to search for them like:

    apt search libstdc++
    

    And which packages are actually not found?



  • @jsulm ,
    I searched but not result?!
    Qt document is new in fact. Why did they change the document with the newer names?!... :(

    Regards,
    Mucip:)


  • Lifetime Qt Champion

    Hi,

    apt-cache search libstdc++ will give you all the versions available. And 6 is part of it.

    In any case, you have to setup your system for multiarch.

    Which would boil down to:

    sudo dpkg --add-architecture i386
    sudo apt-get update
    

    Followed by the installation instructions.



  • @SGaist said in Qt/Android on Debian?:

    sudo dpkg --add-architecture i386
    sudo apt-get update

    Yes I followed below page and now it's OK.
    https://stackoverflow.com/questions/49705309/cant-run-32-bit-binary-on-64-bit-debian

    But in any case I can still see my device on device list?!... I opened developer mod on my phone.

    What you guess aboy this problem?

    On my android phone error message come up:
    Connected device (computer) can not this phone. Vheck the usb cable and try egain.

    Regards,
    Mucip:)


  • Lifetime Qt Champion

    Well... I would do as suggested and check with a different cable.



  • @SGaist
    Unfortunatelly I already change second... :(

    Regards,
    Mucip:)


  • Lifetime Qt Champion

    Did you also tried with a different USB port ?

    What device is that by the way ?



  • @SGaist ,
    Unfortunatelly yes.
    Samsung Galaxy J7 Pro
    Model code: SM-J730F

    Regards,
    Mucip:)


  • Lifetime Qt Champion

    One thing you can try is to follow the phone part of the procedure described in this article. The rest is for a Windows computer but it's at least a start.



  • @SGaist ,
    The error message:

    adb: failed to install /home/milbuga/Qt/Examples/Qt-5.12.3/gui/build-analogclock-Android_for_armeabi_v7a_Clang_Qt_5_12_3_for_Android_ARMv7-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk: Installing to device failed!
    00:47:21: The process "/home/milbuga/Qt/5.12.3/android_armv7/bin/androiddeployqt" exited with code 16.
    00:47:21: Pulling files necessary for debugging.
    00:47:21: Package deploy: Running command "/home/milbuga/Android/Sdk/platform-tools/adb -s 52000026e217250d pull /system/bin/app_process /home/milbuga/Qt/Examples/Qt-5.12.3/gui/build-analogclock-Android_for_armeabi_v7a_Clang_Qt_5_12_3_for_Android_ARMv7-Debug/app_process".
    00:47:21: The command "/home/milbuga/Android/Sdk/platform-tools/adb" terminated with exit code 1.
    00:47:21: Package deploy: Failed to pull "/system/bin/app_process" to "/home/milbuga/Qt/Examples/Qt-5.12.3/gui/build-analogclock-Android_for_armeabi_v7a_Clang_Qt_5_12_3_for_Android_ARMv7-Debug/app_process".
    00:47:21: Package deploy: Running command "/home/milbuga/Android/Sdk/platform-tools/adb -s 52000026e217250d pull /system/bin/app_process32 /home/milbuga/Qt/Examples/Qt-5.12.3/gui/build-analogclock-Android_for_armeabi_v7a_Clang_Qt_5_12_3_for_Android_ARMv7-Debug/app_process".
    00:47:21: The command "/home/milbuga/Android/Sdk/platform-tools/adb" terminated with exit code 1.
    00:47:21: Package deploy: Failed to pull "/system/bin/app_process32" to "/home/milbuga/Qt/Examples/Qt-5.12.3/gui/build-analogclock-Android_for_armeabi_v7a_Clang_Qt_5_12_3_for_Android_ARMv7-Debug/app_process".
    00:47:21: Package deploy: Running command "/home/milbuga/Android/Sdk/platform-tools/adb -s 52000026e217250d pull /system/bin/linker /home/milbuga/Qt/Examples/Qt-5.12.3/gui/build-analogclock-Android_for_armeabi_v7a_Clang_Qt_5_12_3_for_Android_ARMv7-Debug/linker".
    00:47:21: The command "/home/milbuga/Android/Sdk/platform-tools/adb" terminated with exit code 1.
    00:47:21: Package deploy: Failed to pull "/system/bin/linker" to "/home/milbuga/Qt/Examples/Qt-5.12.3/gui/build-analogclock-Android_for_armeabi_v7a_Clang_Qt_5_12_3_for_Android_ARMv7-Debug/linker".
    00:47:21: Package deploy: Running command "/home/milbuga/Android/Sdk/platform-tools/adb -s 52000026e217250d pull /system/lib/libc.so /home/milbuga/Qt/Examples/Qt-5.12.3/gui/build-analogclock-Android_for_armeabi_v7a_Clang_Qt_5_12_3_for_Android_ARMv7-Debug/libc.so".
    00:47:21: The command "/home/milbuga/Android/Sdk/platform-tools/adb" terminated with exit code 1.
    00:47:21: Package deploy: Failed to pull "/system/lib/libc.so" to "/home/milbuga/Qt/Examples/Qt-5.12.3/gui/build-analogclock-Android_for_armeabi_v7a_Clang_Qt_5_12_3_for_Android_ARMv7-Debug/libc.so".
    Error while building/deploying project analogclock (kit: Android for armeabi-v7a (Clang Qt 5.12.3 for Android ARMv7))
    When executing step "Deploy to Android device"
    00:47:21: Elapsed time: 01:17.
    

  • Lifetime Qt Champion

    What happens if you used adb directly ? Can you communicate with your phone ?



  • @SGaist said in Qt/Android on Debian?:

    What happens if you used adb directly ?

    How will I do this?...

    Regards,
    Mucip:)


  • Lifetime Qt Champion

    Well... Use the adb command to e.g. list the devices, etc.



  • @SGaist ,
    I guess I've got problem with the Debian which is installed in VirtualBox as a guest and the Samsung phone?!... :(

    I can see the Samsung Android device in VirtulaBox usb device list but can not reach the Telephone content!...

    Regards,
    Mucip:)


  • Lifetime Qt Champion

    @Mucip I don't use VirtualBox, but in VMWare you have to pass the USB device to the virtual machine, so it can access it. Maybe you need to do the same in VirtualBox?



  • @jsulm
    I already did it... :(

    Infact I can see my phone in "Compatible device". But when I run the code Qt can not reach the telephone memory or disk?!...

    Regards,
    Mucip:)


  • Lifetime Qt Champion

    I know I insists but adb is the command line tool used to interact with android devices, hence my suggestion to use it and try to manually pull and push stuff on your phone.



  • Hi @Mucip
    in linux I have never worrie about the drivers, but yes for the tools, especially for his architecture and permission, but all of it depend on the distribution
    I always use this to setup my environment in linux
    Tipos Debian, Ubuntu, LinuxMint
    $ sudo dpkg --add-architecture i386
    $ sudo apt-get update
    $ sudo apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 libc6:i386 lib32z1 libbz2-1.0:i386

    Tipos Fedora, OpenSuse
    yum install glibc.i686 glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686

    After that, download Android SDK, check permission for adb and the other tools in SDK, if need it

    And finally configure QtCreator with SDK, NDK, Java

    Regards


Log in to reply