fuchsia.update

PROTOCOLS

Manager

Defined in fuchsia.update/update.fidl

CheckNow

Immediately check for an update. options: Did a user initiate this request? (USER_INITIATED) This changes some parameters about aggressiveness of retries and throttling. monitor: An interface on which to receive the status events for this update check. It's only valid for a single update check, after that it won't receive any more events.

-> Was the update check successfully started (state machine in a proper state to do so).

Request

NameType
options Options
monitor request<Monitor>?

Response

NameType
result CheckStartedResult

GetState

Get the current state of the Manager (is an update available, is it currently checking for an update, etc).

Request

NameType

Response

NameType
state State

AddMonitor

Get all status events, for all update checks (interactive and background).

Request

NameType
monitor request<Monitor>

Monitor

Defined in fuchsia.update/update.fidl

Receiver of updates for either an individual update check, or to continuously receive updates for all checks.

OnState

Receive the current state as it changes.

Response

NameType
state State

ENUMS

Initiator

Type: uint32

Defined in fuchsia.update/update.fidl

Who or what initiated the update check.

NameValueDescription
USER 0

The update check was initiated by an interactive user, or the user is otherwise blocked and waiting for the result of this update check.

SERVICE 1

The update check was initiated by a service, in the background.

ManagerState

Type: uint32

Defined in fuchsia.update/update.fidl

The various states that the manager can be in.

    +----------------------+
--->|         IDLE         |<--------------------------------+
|   +----------------------+                                 |
|              |               +----------------------+      |
|              |<--------------|   UPDATE_AVAILABLE   |      |
|              |               +----------------------+      |
|              v                       ^                     |
|   +----------------------+           |                     |
|<--| CHECKING_FOR_UPDATES |-----------------+               |
|   +----------------------+                 |               |
|              v                             |               |
|   +----------------------+                 |               |
|   |  PERFORMING_UPDATE   |---------------->|               |
|   +----------------------+                 |               |
|              v                             |               |
|   +----------------------+                 |               |
|   |  WAITING_FOR_REBOOT  |---------------->|               |
|   +----------------------+                 |               |
|              v                             v               |
|   +----------------------+     +----------------------+    |
+---|  FINALIZING_UPDATE   |---->|  ENCOUNTERED_ERROR   |----+
    +----------------------+     +----------------------+

NameValueDescription
IDLE 0

The Manager is currently idle (in between updates).

Next states:

  • CHECKING_FOR_UPDATES
CHECKING_FOR_UPDATES 1

The Manager is currently checking for an update.

Next states:

  • IDLE update is not available
  • UPDATE_AVAILABLE update is available but not allowed by policy
  • PERFORMING_UPDATE update is available and allowed by policy
  • ENCOUNTERED_ERROR on error
UPDATE_AVAILABLE 2

The Manager has found an available update but is not allowed to update due to policy.

Next states:

  • CHECKING_FOR_UPDATES when CheckNow() is called or a background update starts
PERFORMING_UPDATE 3

The Manager has started the available update.

Next states:

  • WAITING_FOR_REBOOT on success
  • ENCOUNTERED_ERROR on error
WAITING_FOR_REBOOT 4

The update has been performed, and the device is waiting to be rebooted.

Next states:

  • FINALIZING_UPDATE after device reboot
  • ENCOUNTERED_ERROR on error
FINALIZING_UPDATE 5

The update is being finalized after reboot.

Next states:

  • IDLE on success
  • ENCOUNTERED_ERROR on error
ENCOUNTERED_ERROR 6

The Manager is reporting to Omaha that an error has occurred during the update.

Next states:

  • IDLE

CheckStartedResult

Type: uint32

Defined in fuchsia.update/update.fidl

NameValueDescription
STARTED 0

The update check has been started.

IN_PROGRESS 1

The update check was not started, as an update is already in progress, monitor is attached to that update and will immediately get a OnState() call on current state.

THROTTLED 2

The update check was not started, because too many requests to check have been made in a short period of time.

TABLES

Options

Defined in fuchsia.update/update.fidl

Configuration options for an update attempt (this is common with the Fuchsia OTA Interface v2)

OrdinalNameTypeDescription
1 initiator Initiator

What initiated this update attempt.

State

Defined in fuchsia.update/update.fidl

OrdinalNameTypeDescription
1 state ManagerState

The current state of the Manager. Always present.

2 version_available string

The version available from Omaha. Will be present in UPDATE_AVAILABLE or starting from PERFORMING_UPDATE.