2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
エンタープライズ OTA アップデート
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android Compatibility Definition Document(CDD)Updatable Software は、デバイスに SystemUpdatePolicy
クラスを実装する必要があります。SystemUpdatePolicy
を使用すると、デバイス所有者(DO)アプリ(存在する場合)でシステム アップデートのインストールを制御できます。
デバイス所有者に通知する
無線(OTA)クライアントは、システム API を使用して、受信した OTA アップデートについてデバイス所有者アプリに通知する必要があります。また、OTA クライアントには、OTA アップデートが最初に利用可能になったときのタイムスタンプの記録も含める必要があります。OTA クライアントは DevicePolicyManager.notifyPendingSystemUpdate(long updateReceivedTime, boolean isSecurityPatch)
を呼び出してデバイス所有者のアプリに通知できます。アップデートがセキュリティ パッチかどうかわからない場合、OTA クライアントは代わりに DevicePolicyManager.notifyPendingSystemUpdate(long updateReceivedTime)
を使用します。
アップデートが利用できない場合、OTA クライアントは updateReceivedTime
引数を -1
に設定することでて、それを報告します。
OTA クライアントが OTA サーバーをポーリングするときや、OTA がクライアントにプッシュされたときに、必ず通知を送信することをおすすめします。より高い頻度で通知を送信することもできます。
システム アップデート ポリシー
Android 9 では、デバイス所有者がアップデートを制御できる機能が強化され、OTA アップデートを最大 90 日間延期できます。特に、専用デバイス(以前の名称: COSU)では、重要度の高い期間(休日など)に、デバイスで実行されている OS バージョンを凍結できます。
CDD に準拠するには、OTA クライアントに動作ポリシーを実装する必要があります。デバイス所有者は次のポリシーを設定できます。デバイス システム アップデートのサブシステムはこのポリシーに準拠する必要があります。
デバイス所有者は、休日やその他の忙しい時間などの重要な期間に OS バージョンを凍結する凍結期間を設定できます(Android 9 以降)。システムは、凍結期間中に OTA アップデートをインストールしません。SystemUpdatePolicy.InstallationOption
を使用することおすすめしますが(次のセクションを参照)、OTA クライアントは SystemUpdatePolicy.getFreezePeriods()
を呼び出して、デバイスが凍結期間中かどうか確認することもできます。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-03-26 UTC。
[null,null,["最終更新日 2025-03-26 UTC。"],[],[],null,["# Enterprise OTA updates\n\nThe\n[Android\nCompatibility Definition Document (CDD) Updatable Software](/compatibility/android-cdd#11_updatable_software)\nrequires devices to implement the\n[`SystemUpdatePolicy`](https://developer.android.com/reference/android/app/admin/SystemUpdatePolicy.html)\nclass. `SystemUpdatePolicy` lets the device owner (DO) app, if\npresent, control the installation of system updates.\n\nNotify device owners\n--------------------\n\n\nThe over-the-air (OTA) client must notify device owner apps about\nincoming OTA updates using a system API. The OTA client must also\ninclude a timestamp recording when the OTA update first became\navailable. OTA clients can call\n`DevicePolicyManager.notifyPendingSystemUpdate(long updateReceivedTime, boolean isSecurityPatch)`\nto notify device owner apps. If the OTA client doesn't know if an update\nis a security patch, the OTA client can fall back to using\n`DevicePolicyManager.notifyPendingSystemUpdate(long updateReceivedTime)`.\n\n\nIf an update isn't currently available, the OTA client reports this by\nsetting the `updateReceivedTime` argument to `-1`.\nWe recommend sending notifications whenever the OTA client polls the\nOTA server, or when an OTA is pushed to the client. You can also send\nout notifications more frequently.\n\nSystem update policy\n--------------------\n\n\nAndroid 9 enhances the ability for device\nowners to\n[control\nupdates](https://developer.android.com/work/dpc/system-updates) by allowing device owners to postpone OTA updates for up to\n90 days. Focusing on dedicated device (previously called COSU)\nsolutions, this feature lets owners pause the OS version running on\ndevices over critical periods, such as holidays.\n\n\nTo comply with the CDD, the OTA client must implement behavioral\npolicies. The DO can set the following policies, which must be\nrespected by the device system update subsystems:\n\n- [`TYPE_INSTALL_AUTOMATIC`](https://developer.android.com/reference/android/app/admin/SystemUpdatePolicy.html#TYPE_INSTALL_AUTOMATIC)\n- [`TYPE_INSTALL_WINDOWED`](https://developer.android.com/reference/android/app/admin/SystemUpdatePolicy.html#TYPE_INSTALL_WINDOWED)\n- [`TYPE_POSTPONE`](https://developer.android.com/reference/android/app/admin/SystemUpdatePolicy.html#TYPE_POSTPONE)\n\n\nDevice owners can also\n[set\nfreeze periods](https://developer.android.com/work/dpc/system-updates#freeze-periods) (in Android 9 or later) that freeze the OS version\nover critical periods, such as holidays or other busy times. The system\ndoesn't install OTA updates during a freeze period. We recommend using\n`SystemUpdatePolicy.InstallationOption` (see\nfollowing section), however the OTA client can also call\n[`SystemUpdatePolicy.getFreezePeriods()`](https://developer.android.com/reference/android/app/admin/SystemUpdatePolicy#getFreezePeriods())\nto check if the device is in a freeze period."]]