QT Creator does not connect to Android app being debugged
-
When I press
Start Debugging
button in QT Creator it displays the list of my emulators: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":
, but then nothing happens after that, and within 20 seconds I get this:
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?:
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.2Android 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'