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. QT Creator does not connect to Android app being debugged

QT Creator does not connect to Android app being debugged

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qtcreator 5.0debugandroid
1 Posts 1 Posters 1.3k Views
  • 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.
  • D Offline
    D Offline
    Dmitriano
    wrote on last edited by Dmitriano
    #1

    When I press Start Debugging button in QT Creator it displays the list of my emulators:

    e2e01823-2696-4d3d-96de-273d2181b47f-image.png

    when I select the first one it starts the app and the emulator displays "Waiting for debugger, MyApp is waiting for the debugger to attach":

    2678c0f3-7762-48eb-a7bd-af97ee885944-image.png

    , but then nothing happens after that, and within 20 seconds I get this:

    c4678ba8-1d26-4eb9-98e7-14a12766c4a1-image.png

    As I can see from QT Creator output, some pull command failed:

    Running command "C:/Users/D-Ef/AppData/Local/Android/Sdk/platform-tools/adb.exe -s emulator-5554  install -r E:/temp/build-clocks-Android_Qt_6_2_2_android_x86_64_Clang_x86_64-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk"
    Performing Streamed Install
    Success
    Android package built successfully in 1.452 ms.
      -- It can now be run from the selected device/emulator.
      -- File: E:/temp/build-clocks-Android_Qt_6_2_2_android_x86_64_Clang_x86_64-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk
    20:21:16: The process "E:\Qt\Qt6.2.2\windows\bin\androiddeployqt.exe" exited normally.
    20:21:16: Pulling files necessary for debugging.
    20:21:16: Package deploy: Running command "C:\Users\D-Ef\AppData\Local\Android\Sdk\platform-tools\adb.exe -s emulator-5554 pull /system/bin/app_process E:/temp/build-clocks-Android_Qt_6_2_2_android_x86_64_Clang_x86_64-Debug/app_process".
    20:21:16: Package deploy: Running command "C:\Users\D-Ef\AppData\Local\Android\Sdk\platform-tools\adb.exe -s emulator-5554 pull /system/bin/app_process32 E:/temp/build-clocks-Android_Qt_6_2_2_android_x86_64_Clang_x86_64-Debug/app_process".
    20:21:16: The command "C:\Users\D-Ef\AppData\Local\Android\Sdk\platform-tools\adb.exe -s emulator-5554 pull /system/bin/app_process32 E:/temp/build-clocks-Android_Qt_6_2_2_android_x86_64_Clang_x86_64-Debug/app_process" terminated with exit code 1.
    20:21:16: Package deploy: Running command "C:\Users\D-Ef\AppData\Local\Android\Sdk\platform-tools\adb.exe -s emulator-5554 pull /system/bin/linker E:/temp/build-clocks-Android_Qt_6_2_2_android_x86_64_Clang_x86_64-Debug/linker".
    20:21:16: The command "C:\Users\D-Ef\AppData\Local\Android\Sdk\platform-tools\adb.exe -s emulator-5554 pull /system/bin/linker E:/temp/build-clocks-Android_Qt_6_2_2_android_x86_64_Clang_x86_64-Debug/linker" terminated with exit code 1.
    20:21:16: Package deploy: Failed to pull "/system/bin/linker" to "E:/temp/build-clocks-Android_Qt_6_2_2_android_x86_64_Clang_x86_64-Debug/linker".
    20:21:16: Package deploy: Running command "C:\Users\D-Ef\AppData\Local\Android\Sdk\platform-tools\adb.exe -s emulator-5554 pull /system/lib/libc.so E:/temp/build-clocks-Android_Qt_6_2_2_android_x86_64_Clang_x86_64-Debug/libc.so".
    20:21:16: The command "C:\Users\D-Ef\AppData\Local\Android\Sdk\platform-tools\adb.exe -s emulator-5554 pull /system/lib/libc.so E:/temp/build-clocks-Android_Qt_6_2_2_android_x86_64_Clang_x86_64-Debug/libc.so" terminated with exit code 1.
    20:21:16: Package deploy: Failed to pull "/system/lib/libc.so" to "E:/temp/build-clocks-Android_Qt_6_2_2_android_x86_64_Clang_x86_64-Debug/libc.so".
    20:21:16: Elapsed time: 00:24.
    

    what does this mean?

    The emulator is running as root.

    If I do

    adb.exe -s emulator-5554 pull /system/bin/app_process32 a.out
    

    from command line, I get:

    adb: error: failed to stat remote object '/system/bin/app_process32': No such file or directory
    

    so it means that QT Creator tries to pull some file that does not exist, there are

    
    /system/bin/app_process
    /system/bin/app_process64
    

    , but not /system/bin/app_process32.

    I did

    adb shell
    pwd
    cd system
    find . -name "*process*"
    

    to find them.

    Tried to create a symblink, but fs is readonly:

    ln -s /system/bin/app_process /system/bin/app_process32
    ln: cannot create symbolic link from '/system/bin/app_process' to '/system/bin/app_process32': Read-only file system
    

    Should I add a device like this?:

    24ea6c15-79bf-46e3-a489-d6df0a7086dd-image.png

    Tried x86 emulator:

    05:22:51: Debugging  ...
    Could not load shared library symbols for 221 libraries, e.g. /system/lib/libandroid_runtime.so.
    Use the "info sharedlibrary" command to see the complete listing.
    Do you need "set solib-search-path" or "set sysroot"?05:24:55: Debugging of  has finished with exit code 0.
    05:24:55: 
    

    it also hangs up and does nothing.

    My OS: Windows 10
    QT Creator: 5x
    QT: 6.2.2

    Android Studio debugs an app on the emulator successfully:

    $ adb shell am start -n "com.example.myapplication1/com.example.myapplication1.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
    Waiting for application to come online: com.example.myapplication1 | com.example.myapplication1.test
    Waiting for application to come online: com.example.myapplication1 | com.example.myapplication1.test
    Connected to process 4668 on device 'Pixel_3_XL_API_29 [emulator-5554]'.
    Connecting to com.example.myapplication1
    Connected to the target VM, address: 'localhost:63188', transport: 'socket'
    
    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