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

Abierto
#160 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
android, java, kotlin
Área
mobile

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Java
Estrellas
44
Forks
25
Merge medio
1 d 13 h
PR fusionados (30 d)
80

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MDMesh-app/MDMesh

Todos los issues de MDMesh-app/MDMesh

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.