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

Đang mở
#160 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, java, kotlin
Lĩnh vực
mobile

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Java
Star
44
Fork
25
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
80

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MDMesh-app/MDMesh

Tất cả issue của MDMesh-app/MDMesh

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.