Details
-
Bug
-
Status: Closed
-
Not Evaluated
-
Resolution: Done
-
Qt Creator 4.2.1
-
None
-
None
-
Qt 5.8
QtC 4.2.1
Android Devices managed by Google Work | Android (aka Android for Work)
Description
Running a APP on Android Device from Qt Creator always runs the APP for User 0 - the first private User.
Deploying the APP to a managed Android Device the APP should run using the work User (typically User 10)
It seems that Qt always starts the APP without --user argument which means the default User (Id 0) is used.
List of users:
adb shell pm list users
starting the APP with --user would look like
adb shell am start --user 10 -n my.app.package/org.qtproject.qt5.android.bindings.QtActivity
My workaround at the moment:
Added External Tool with .sh Script killing running APP for user 0, then start APP user 10
Now I can use the unmodified Build + Run, then execute External Tool to kill the running app and to start with correct User.
Would be much better to add a variable USER_ID to be placed inside .pro and - if exists - start the APP with the given user ID.
This would also help if an APP should run for another private user (id 1...9)
Some more details: https://appbus.wordpress.com/2017/03/15/debug-and-run-managed-qt-android-app-qtcreator/