Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Update OTA Enterprise
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Software
Updatable Compatibility Definition Document (CDD) Android
mengharuskan perangkat menerapkan
class
SystemUpdatePolicy
. SystemUpdatePolicy
memungkinkan aplikasi pemilik perangkat (DO), jika
ada, mengontrol penginstalan update sistem.
Memberi tahu pemilik perangkat
Klien over-the-air (OTA) harus memberi tahu aplikasi pemilik perangkat tentang
update OTA yang masuk menggunakan API sistem. Klien OTA juga harus
menyertakan rekaman stempel waktu saat update OTA pertama kali
tersedia. Klien OTA dapat memanggil
DevicePolicyManager.notifyPendingSystemUpdate(long updateReceivedTime, boolean isSecurityPatch)
untuk memberi tahu aplikasi pemilik perangkat. Jika klien OTA tidak tahu apakah update
adalah patch keamanan, klien OTA dapat kembali menggunakan
DevicePolicyManager.notifyPendingSystemUpdate(long updateReceivedTime)
.
Jika update saat ini tidak tersedia, klien OTA akan melaporkannya dengan
menetapkan argumen updateReceivedTime
ke -1
.
Sebaiknya kirim notifikasi setiap kali klien OTA melakukan polling terhadap
server OTA, atau saat OTA dikirim ke klien. Anda juga dapat mengirim
notifikasi lebih sering.
Kebijakan update sistem
Android 9 meningkatkan kemampuan pemilik
perangkat untuk
mengontrol
update dengan mengizinkan pemilik perangkat menunda update OTA hingga
90 hari. Dengan berfokus pada solusi perangkat khusus (sebelumnya disebut COSU),
fitur ini memungkinkan pemilik menjeda versi OS yang berjalan di
perangkat selama periode penting, seperti hari libur.
Untuk mematuhi CDD, klien OTA harus menerapkan kebijakan
perilaku. DO dapat menetapkan kebijakan berikut, yang harus
dipatuhi oleh subsistem update sistem perangkat:
Pemilik perangkat juga dapat
menetapkan
periode pembekuan (di Android 9 atau yang lebih baru) yang membekukan versi OS
selama periode penting, seperti hari libur atau waktu sibuk lainnya. Sistem
tidak menginstal update OTA selama periode pembekuan. Sebaiknya gunakan
SystemUpdatePolicy.InstallationOption
(lihat
bagian berikut), tetapi klien OTA juga dapat memanggil
SystemUpdatePolicy.getFreezePeriods()
untuk memeriksa apakah perangkat berada dalam periode pembekuan.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 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."]]