Enterprise OTA updates

The Android Compatibility Definition Document (CDD) Updatable Software requires devices to implement the SystemUpdatePolicy class. SystemUpdatePolicy lets the device owner (DO) app, if present, control the installation of system updates.

Notify device owners

The over-the-air (OTA) client must notify device owner apps about incoming OTA updates using a system API. The OTA client must also include a timestamp recording when the OTA update first became available. OTA clients can call DevicePolicyManager.notifyPendingSystemUpdate(long updateReceivedTime, boolean isSecurityPatch) to notify device owner apps. If the OTA client doesn’t know if an update is a security patch, the OTA client can fall back to using DevicePolicyManager.notifyPendingSystemUpdate(long updateReceivedTime).

If an update isn’t currently available, the OTA client reports this by setting the updateReceivedTime argument to -1. We recommend sending notifications whenever the OTA client polls the OTA server, or when an OTA is pushed to the client. You can also send out notifications more frequently.

System update policy

Android 9 enhances the ability for device owners to control updates by allowing device owners to postpone OTA updates for up to 90 days. Focusing on dedicated device (previously called COSU) solutions, this feature lets owners pause the OS version running on devices over critical periods, such as holidays.

To comply with the CDD, the OTA client must implement behavioral policies. The DO can set the following policies, which must be respected by the device system update subsystems:

Device owners can also set freeze periods (in Android 9 or later) that freeze the OS version over critical periods, such as holidays or other busy times. The system doesn't install OTA updates during a freeze period. We recommend using SystemUpdatePolicy.InstallationOption (see following section), however the OTA client can also call SystemUpdatePolicy.getFreezePeriods() to check if the device is in a freeze period.