Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update Managed Google Play app that is in KIOSK mode

For a client a I have created an simple app that is used by the clients employees and the clients customers. All phones are Samsung A70 phones running Android 9.

The app has been setup to run in KIOSK mode so that only the app can be run (dedicated device). It is a managed app so that only the devices that the client owns can install the app via the clients enterprise. The app is installed via the Google Management API using a policy.

I just use the https://developers.google.com/android/management/quickstart to create a policy and use the QR code to install the phones from scratch.

So far all good. The problem is that I cannot get the phones to update to newer verions of the kiosk app.

I understand that when apps are in Kiosk mode, they cannot simply be updated and that you have to set a time interval where the app is allowed to exit KIOSK mode and update itself. But even though I set the time interval in the policy, it does not update. Even tried to allow the time interval to be the whole day.

I also tried forcing updates using the minimumVersionCode policy, but updates are still ignored.

I have checked that the managed app has been uploaded and approved (it has been actually over a month since the last version was uploaded), so I'm pretty sure it doesn't have anything to do with cache. It says that the app is version 11.

Production

Release:
0.0.11
Full roll-out.
1 app bundle, version code:
11

The policy the phones are using is following. (As per my clients request I have removed the full package url)

import json

#policy_name = enterprise_name + '/policies/internalUsers'

policy_name = enterprise_name + '/policies/developer'



policy_json = '''
{
  "applications": [
    {
      "packageName": "[package_url].itemrepair",
      "installType": "KIOSK",
      "defaultPermissionPolicy": "GRANT",
      "minimumVersionCode": 11
    }
  ],
  "safeBootDisabled": true,
  "factoryResetDisabled": false,
  "debuggingFeaturesAllowed": true,
  "appAutoUpdatePolicy": "ALWAYS",
  "systemUpdate":
    {
      "type": "WINDOWED",
      "startMinutes": 0,
      "endMinutes": 1439
    }

}
'''

androidmanagement.enterprises().policies().patch(
    name=policy_name,
    body=json.loads(policy_json)
).execute()

I'm sure that the phones are using the correct policy as I can see the devices have synced the policies when I list all the devices in the enterprise. Also they are all online so I can also reboot a device using the reboot command.

full = 'enterprises/[enterprise_id]/devices/[device_id]'
androidmanagement.enterprises().devices().issueCommand(name=full,body={'type':'REBOOT'}).execute()

But the app is still not updated. So I'm hoping that someone has some ideas as to what I am missing.

like image 227
William Lee Avatar asked Feb 04 '20 10:02

William Lee


People also ask

How do I update apps in kiosk mode?

If you're using the Android for Work COSU kiosk, you can push updates via MaaS360 and it'll update automatically on the device. For iOS, the single app launch mode will prevent any updates on the backend. You'll have to take the device out of kiosk mode for app updates to take place.

How do I bypass Android kiosk mode?

Select the device in the Device & Users > Devices page. Click Actions > Android Only > Disable Kiosk.


1 Answers

1. I may be wrong but I had the same problem and it got fixed after I manually updated the app. So in my case I added "appAutoUpdatePolicy": "ALWAYS", AFTER I made the update, which ended up in my dedicated device not updating my Kiosk App. If you reinstall or manually update your app and then publish any new update AFTER you made the change to your policy, it should work.

2.

I understand that when apps are in Kiosk mode, they cannot simply be updated and that you have to set a time interval where the app is allowed to exit KIOSK mode and update itself. But even though I set the time interval in the policy, it does not update. Even tried to allow the time interval to be the whole day.

If you are refering to:

  "systemUpdate":
    {
      "type": "WINDOWED",
      "startMinutes": 0,
      "endMinutes": 1439
    }

Afaik this is about android system updates and not your Kiosk App.

like image 140
Hugo Avatar answered Oct 22 '22 02:10

Hugo