Testing Android APK with QtCreator fails with an error.
-
I could but I think this is a build issue, I think I need to find out more about this "app_process" file that is missing.
I ran strace on qtcreator and re-built the app and the only reference to "app_process" is a test for its existance which failed:access("/work/Qt-Android/QtTest-V1.1.5c/application/build/Android_QtAndroid_Clang_arm64_v8a-Debug/android-app-process/app_process", F_OK) = -1 ENOENT (No such file or directory)
According to Googles AI:
-
What is app_process?
app_process is a binary found in the /system/bin directory on Android devices. According to Stack Overflow, it's a device binary created by the full device build.
It's the entry point for starting a Java process within the Android runtime environment.
It's used to run applications, often those that need to interact with system-level services or bypass normal Android application lifecycle restrictions.
It can be used to execute JAR files or DEX files within a Dalvik/ART environment.
Essentially, it's how you can run custom Java code as a separate process on an Android device, outside the typical app sandbox. -
-
According to Googles AI:
-
What is app_process?
app_process is a binary found in the /system/bin directory on Android devices. According to Stack Overflow, it's a device binary created by the full device build.
It's the entry point for starting a Java process within the Android runtime environment.
It's used to run applications, often those that need to interact with system-level services or bypass normal Android application lifecycle restrictions.
It can be used to execute JAR files or DEX files within a Dalvik/ART environment.
Essentially, it's how you can run custom Java code as a separate process on an Android device, outside the typical app sandbox. -
-
So if I understand what adb and google are telling me the issue is that the operating system on my test phone is blocking adb's access to /system/bin/.
I wonder if this is a Samsung thing the test phone is a Samsung A06 ?
Using adb shell I have found the adbd server on my test phone:
shell 26668 1 0 40:23 ? 00:04:49 adbd --root_seclabel=u:r:su:s0 --tim_seclabel=u:r:adbd_tradeinmode:s0
It is running as user shell which I think does not have read access to /system/bin.
So I think my next step is to root the Test Phone and see if that helps.
-
The
adb: error: failed to copy '/system/bin/app_process64'
is something new with Android 15.I have started seeing this issue with my Samsung Galaxy S23 with Android 15.
See this other report at https://forum.qt.io/topic/162537/qt-creator-android-15-adb.exe-pull-system-bin-app_process64-error
In my case native debugging with Android Studio doesn't work with the Galaxy S23. It does work with the Arm64 Emulator with Android 15.
I tested with a Samsung Galaxy S10e with Android 12, and everything worked fine with Qt Creator 17...
-
The
adb: error: failed to copy '/system/bin/app_process64'
is something new with Android 15.I have started seeing this issue with my Samsung Galaxy S23 with Android 15.
See this other report at https://forum.qt.io/topic/162537/qt-creator-android-15-adb.exe-pull-system-bin-app_process64-error
In my case native debugging with Android Studio doesn't work with the Galaxy S23. It does work with the Arm64 Emulator with Android 15.
I tested with a Samsung Galaxy S10e with Android 12, and everything worked fine with Qt Creator 17...
Thanks for the info, the Samsung A06 I am currently using has Android 14 currently installed.
-
Thanks for the info, the Samsung A06 I am currently using has Android 14 currently installed.
I did not make any progress rooting my Test Phone (Samsung A06), however I tried an old HTC M9 running Android 7.0 and that did proceed past the adb pull request for "app_process" but failed because the APK package is too new for Android 7.0 (expected failure).
-
I did not make any progress rooting my Test Phone (Samsung A06), however I tried an old HTC M9 running Android 7.0 and that did proceed past the adb pull request for "app_process" but failed because the APK package is too new for Android 7.0 (expected failure).
@SMF-Qt said in Testing Android APK with QtCreator fails with an error.:
I did not make any progress rooting my Test Phone (Samsung A06), however I tried an old HTC M9 running Android 7.0 and that did proceed past the adb pull request for "app_process" but failed because the APK package is too new for Android 7.0 (expected failure).
Android 9 is the minimum required for Qt for Android 6.9.
According to Wikipedia you can get Android 11 for HTC One M9. The steps to do this unofficial upgrade are listed here. I have no idea how this would work.
-
I think for now I am going to put arm64-v8a activities on hold as both hardware and emulated deployments have issues and try jsulm's suggestion of an X86_64 setup. I have already tested the X86_64 phone simulator outside of both qtcreator and Android Studio and it appears to function ok.
-
I think for now I am going to put arm64-v8a activities on hold as both hardware and emulated deployments have issues and try jsulm's suggestion of an X86_64 setup. I have already tested the X86_64 phone simulator outside of both qtcreator and Android Studio and it appears to function ok.
Ok thanks for the suggestions I now have a working X86_64 emulator and an X86_64 apk build that deploys to the emulated phone.
My next problem is that the deployed app crashes on startup, but to investigate that I think I will start a new thread and come back to the arm64-v8a problems when my test application is more usable.
...
Installing Android package to device.
Running command "/opt/android/sdk/platform-tools/adb -s emulator-5554 install -r /work/Qt-Android/QtTest/application/build/Android_Qt_6_9_1_qt_androidX86_Clang_x86_64-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk"
Performing Streamed Install
Success
Android package built successfully in 0.572 ms.
-- It can now be run from the selected device/emulator.
-- File: /work/Qt-Android/QtTest/application/build/Android_Qt_6_9_1_qt_androidX86_Clang_x86_64-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk
14:18:06: The process "/opt/qt6/bin/androiddeployqt" exited normally.
14:18:06: Package deploy: Running command "/opt/android/sdk/platform-tools/adb -s emulator-5554 pull /system/bin/app_process64 /work/Qt-Android/QtTest/application/build/Android_Qt_6_9_1_qt_androidX86_Clang_x86_64-Debug/android-app-process/app_process".
14:18:06: Package deploy: Running command "/opt/android/sdk/platform-tools/adb -s emulator-5554 pull /system/bin/linker64 /work/Qt-Android/QtTest/application/build/Android_Qt_6_9_1_qt_androidX86_Clang_x86_64-Debug/android-app-process/linker64".
14:18:06: Package deploy: Running command "/opt/android/sdk/platform-tools/adb -s emulator-5554 pull /system/lib64/libc.so /work/Qt-Android/QtTest/application/build/Android_Qt_6_9_1_qt_androidX86_Clang_x86_64-Debug/android-app-process/libc.so".
14:18:06: Elapsed time: 00:05. -
S SMF-Qt referenced this topic
-
Thanks for sharing the detailed steps — it looks like you're almost there. The error about the missing ABI usually means QtCreator isn’t detecting the correct architecture for deployment. Adding ```
ANDROID_ABIS = arm64-v8aDouble-check that the Kit you're using is actually set up with the correct Qt for Android version and the appropriate architecture. Also, make sure the NDK path is correctly configured in the SDK settings — mismatches there can silently cause issues like this. Running on an emulator first is definitely a smart move. Hopefully with those tweaks, you'll be able to deploy without issues. Let us know how it goes!