Android Management API uninstall app from work profile of managed device

1.1k views Asked by At

I have force_installed an app into my enrolled device by policy. How can I uninstall remotely that app from my enrolled device.

4

There are 4 answers

0
Anup On

Try to remove the the application section from policy, on some devices it work some didn't .

There is disabled property under ApplicationPolicy try to use this instead of uninstall this will certainly work.

0
Dave Paurillo On

To remotely uninstall an application, you can just simply remove the app from your policy.

For example you have a policy with dropbox force installed:

policy_json = '''
{
  "applications": [
    {
      "packageName": "com.google.samples.apps.iosched",
      "installType": "FORCE_INSTALLED"
    },
    {
      "packageName": "com.dropbox.android",
      "installType": "FORCE_INSTALLED"
    },
  ],
  "debuggingFeaturesAllowed": true
}
'''

And you decided that you want to remove dropbox, just remove it from the application policy and it should be uninstalled from the device.

policy_json = '''
{
  "applications": [
    {
      "packageName": "com.google.samples.apps.iosched",
      "installType": "FORCE_INSTALLED"
    }
  ],
  "debuggingFeaturesAllowed": true
}
'''
0
AudioBubble On
2
srivishnu On

patch the application policy removing the application you want to uninstall and push the policy to that device, This will uninstall the application based on the policy