[Qt-creator] Android adb start --user

ekke ekke at ekkes-corner.org
Wed Feb 15 22:34:12 CET 2017


I already asked in the Android List but perhaps this one is better ;-)

Just doing my first AndroidForWork project for a customer

will blog about all the details later

QtC can build and run a work app on the device

As expected sideloaded apps are deployed as private and as work apps -
this works well with QtC

Of course I want to start the work app and see the application output in QtC

Unfortunately QtC does the adb start for the default user which is the
private one

I can list the users from the device:

adb shell pm list users

there are 2 users listed: ID 0 the default private user, ID 10 the work user

from OSX Terminal I can run the app installed by QtC for the work user:

adb shell am start --user 10 -n
my.package.name/org.qtproject.qt5.android.bindings.QtActivity

I'm a mobile business app developer but not an expert of QtC build
process or Cmd etc ;-)

My question: is there a way to tell QtC to add '--user 10' to adb start
command ?


If not then I could still use the QtC build process: build and run the
app, close the app, start app for user 10 from adb start cmd

But then I'm still missing the application output inside QtC

I can do this:

adb -d logcat lib<myApp>.so:D *:S

but it's outside of QtC.

Is there a way to execute such a cmd and to 'connect' the output with
QtC ApplicationOutput ?

perhaps something running as ExternalTool ?


Best way of course would be to add --user to the adb start from QtC
build process

thx for any help

ekke




More information about the Qt-creator mailing list