Android managed devices stuck in KIOSK mode, policy not automatically applying, unable to unpin

692 views Asked by At

Currently we're using android-management-api on 100+ devices that are all under the same policy with a KIOSK mode app pushed to them. Most of the time the devices remain in the KIOSK mode, but from time to time we switch the pinning off, or apply and update, by changing to FORCE_INSTALLED and increasing minVersionCode.

ISSUE- Last week the app UNPINNING just stopped working all of a sudden(Was working fine for some months). No policy updates that we are pushing are being applied, tried deleting a policy (can't because the devices are using it), disabling the app(nothing happens). From the looks of it, we're stuck with devices that are pinned in one app and cannot be unpinned anymore.

I've read that applying policy update manually could help - but can't do it because of the pinned kiosk. Restarting device doesn't help.

Only solution i can come up with right now is using adb to factory re-install all of them, but manually re-installing 100+ devices isn't a solution.

1

There are 1 answers

3
Kevin On

It is recommended that you set the SystemUpdateType to WINDOWED when using a KIOSK mode policy. Setting an update window will ensure updates to be installed within specific time frames, even if an app is running in KIOSK mode.

The following policy sets an update window between 3:00AM to 10:00AM. When setting the systemUpdate policy, ensure that startMinutes and endMinutes are not the same value and that neither value is set to 0.

"systemUpdate": {
    {
      "type": "WINDOWED",
      "startMinutes": 180, 
      "endMinutes": 600 
      ]
    }
  }

To check when the policy was last updated on the device, you can use the devices.get API and check the lastPolicySyncTime or check appliedPolicyVersion field to check the version of the policy on the device.

As an alternative to the systemUpdate policy, you can also set the autoUpdateMode policy to AUTO_UPDATE_HIGH_PRIORITY. Setting this policy will update the application as soon as an update is available.

{
  "packageName": string,
  ...
  "autoUpdateMode": “AUTO_UPDATE_HIGH_PRIORITY”
}