1

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

4 Answers4

1

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
}
'''
Dave Paurillo
  • 231
  • 1
  • 12
0

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.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Anup
  • 1
  • 1
0

Set the application's InstallType to BLOCKED

https://developers.google.com/android/management/reference/rest/v1/enterprises.policies?hl=en#installtype

0

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

srivishnu
  • 103
  • 1
  • 5
  • You may want to provide more details. – Itération 122442 Jan 18 '21 at 11:00
  • When adding device you will set a default policy with set of applications, You need to use API patch policy to update the policy by removing the application entry from policy json, and then update the device policy again – srivishnu Jan 18 '21 at 12:39