System update policy: install OS updates automatically or in a maintenance window (systemUpdatePolicy)

Aperta
#160 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
android, java, kotlin
Ambito
mobile

Direzione di ricerca

The issue identifies the Android device agent, proto/registry.md, config.apply, and the device page as starting points. Read the existing connectivity configuration flow and check the Android DevicePolicyManager APIs named in the proposal. Done means the agent can apply the four policy options and report pending updates in telemetry, with the policy and update status visible in the console; the author says a pull request is being prepared.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Area

Device agent (Android)

The problem

Phones that don't install OS updates fall behind on security patches. MDMesh already shows the patch level and its age (device page, Telemetry: Security patch, patch age in days), but it can't do anything about it. proto/registry.md lists systemUpdatePolicy as "Planned: not advertised yet", and in #2 you mentioned the update window as one of the next steps. The console also can't tell whether an update is already waiting on a device.

Proposed solution
  1. A System updates setting per configuration, sent in config.apply as a systemUpdate section (protocol 1.6). The agent applies it with DevicePolicyManager.setSystemUpdatePolicy (Device Owner, API 23+). The options:

    • Install automatically as soon as an update is available.
    • Install in a daily window: start and end in the device's local time, which may cross midnight, for example 22:00 to 04:00.
    • Postpone for up to 30 days. Android doesn't let this block security updates.
    • Device default, which clears the policy.

    Not managed is the default and leaves the device as it is. The section is then left out, so existing configurations keep their revision, as with connectivity.

  2. Report a waiting update in telemetry and show it on the device page. The agent reads it with DevicePolicyManager.getPendingSystemUpdate (API 26+), which gives the time the device learned about the update and whether it's a security patch. This works where the OEM's updater reports it to the system: Pixel does, other OEMs vary.

  3. Later, perhaps: a Needs attention reason on the Overview for a device whose security patch is older than N days.

This doesn't force a download right now. Android has no API for that, apart from installSystemUpdate with an OTA file the DPC provides. Pinning OS versions is left to OEM tools such as Samsung E-FOTA.

I'm preparing a pull request for 1 and 2, along the lines of the connectivity mode (#130). Happy to adjust the shape.

Alternatives considered
  • Asking users to install updates by hand. That can't be enforced, and a restart during working hours is disruptive.
  • Checking each device's patch age by hand.
Before submitting
  • I searched existing issues and discussions for the same idea.
Lingua principale
Java
Stelle
44
Fork
25
Merge medio
1g 13h
PR unite (30g)
80

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MDMesh-app/MDMesh

Tutte le issue di MDMesh-app/MDMesh

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.