Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
design and implement a much better / simpler over-the-air update system for A/B devices #577
Comments
thestinger
added
the
Type: enhancement
label
Feb 4, 2017
thestinger
added this to the Release milestone
Feb 4, 2017
thestinger
added
Component: Updater
Language: Java
labels
Feb 4, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
jjardon
commented
Feb 4, 2017
|
Maybe this could be based on ostrer? https://ostree.readthedocs.io/en/latest/ |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
thestinger
Feb 5, 2017
Contributor
Android already provides the best available update infrastructure via update_engine. The only part that needs to be implemented is some high-level code wiring it up to an update server. Anything not providing block-based updates including block-based delta (incremental) updates wouldn't be able to support verified boot and new devices also have the A/B partitions so it wouldn't make sense not to use them. The major advantages of the new mechanism on the Pixel phones are reliability (rolling back to the other set of partitions automatically if the new version fails to boot) and automation / user experience (fully automatic updates in the background, only requiring a normal reboot without an install step before or after boot to become active). It's the update system from ChromeOS which was adopted by Brillo (Android Things) and now Android itself.
|
Android already provides the best available update infrastructure via update_engine. The only part that needs to be implemented is some high-level code wiring it up to an update server. Anything not providing block-based updates including block-based delta (incremental) updates wouldn't be able to support verified boot and new devices also have the A/B partitions so it wouldn't make sense not to use them. The major advantages of the new mechanism on the Pixel phones are reliability (rolling back to the other set of partitions automatically if the new version fails to boot) and automation / user experience (fully automatic updates in the background, only requiring a normal reboot without an install step before or after boot to become active). It's the update system from ChromeOS which was adopted by Brillo (Android Things) and now Android itself. |
thestinger
added
the
project
label
Feb 15, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
thestinger
Feb 15, 2017
Contributor
The foundation is in place: https://github.com/CopperheadOS/platform_packages_apps_Updater.
|
The foundation is in place: https://github.com/CopperheadOS/platform_packages_apps_Updater. |
thestinger commentedFeb 4, 2017
•
edited
Edited 1 time
-
thestinger
edited Feb 4, 2017
The server will only serve static files, rather than having any dynamic content. The server can provide the necessary metadata to pass the updates directly to update_engine, rather than needing to handle downloads. Each per-device channel will have a separate release index file with metadata. It will use an extremely simple line-based format with space-separated fields. It could use JSON, but there's not much point in adding that as a dependency since it will end up requiring more complexity in Java.
The update client will perform frequent automatic checks for updates with automated downloads/installation as a single step via update_engine. The only necessary user interface is a persistent notification informing the user that they need to reboot once an update is complete. It can time out after a given interval like 24 hours and force the reboot itself as soon as the device becomes idle.
The client will support changing the update channel via a system property writable by the shell user. This will be initially be used to test the future upgrade path before doing releases, just as we do it for the current updater.
As with the current updater, it will use incremental updates if one is available from the current version to the target version, falling back to a full update. There will continue to be incrementals generated for the past three versions, which generally covers 2-4 weeks.