I've just started developing with Android Enterprise and need to deploy an app in work profile.
My policy (see below) allows installation of apk with debug build variant. Starting a debug session via Android Studio now install the app both in private and work profile which means the policy is active on the work profile. However,the debug session always connects to the app in private profile.
Is it possible to start the debug session directly to the app instance on the work profile?
I've additionally tried with user flag:
adb shell am start -n "com.siemens.fileshare/com.siemens.fileshare.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D -W --user 10
The connection, however, times out.
Here is my policy:
{
"name": "enterprises/some123/policies/policy1",
"version": "11",
"applications": [
{
"packageName": "com.google.samples.apps.iosched",
"installType": "FORCE_INSTALLED"
},
{
"packageName": "com.mycompany.myapp",
"installType": "AVAILABLE"
}
],
"debuggingFeaturesAllowed": true
}