Update Pack Format

The Update Daemon accepts "update pack" files, which contain software/firmware update instructions and associated data, such as libraries, executables, and resource files.

The update pack is a collection of tasks concatenated together.

Each task starts with a JSON description. Optionally, a payload may follow.

If the task has payload, it is expected to start immediately after the last byte of JSON data (there are no padding or alignment bytes between). If there is no payload, but there is another task, the next byte after the task's description will be the next task's description.

JSON Data

http://www.json.org/

The JSON data for a task is contained within a single UTF-8 encoded JSON "object", beginning with a '{' character and ending with a '}' character.

Each type of task has a different task description structure, but they all have a "command" field that indicates which type of task it is:

System Update

Updates the collection of apps and application framework on the system.

The payload contains the framework and application files.

Note
Delta updates are not yet supported. More description fields will be added later to support that (such as "deltaFromMd5").

Task-specific description fields are:

Field   = Description
----------------------------------------------------------------------------------------------------
md5     = string = MD5 hash of system's build staging area (excluding <c>info.properties</c> file).
size    = integer = Number of bytes of payload associated with this task.

For example,

{
    "command":"updateSystem",
    "md5":"098843325eef6af82cdc15a294c39824",
    "size":335534
}

Install App

Installs an app into the target system. If an app with the same name already exists, it will be removed from the system first.

The payload is the new app.

Description fields are:

Field   = Description
----------------------------------------------------------------------------------------------------
name    = string = The app's name.
version = string = The app's human-readable version string.
md5     = string = MD5 hash of the app's build staging area (excluding info.properties file).
size    = integer = Number of bytes of payload associated with this task.

For example,

{
    "command":"installApp",
    "name":"helloWorld",
    "version":"0.8c",
    "md5":"098843325eef6af82cdc15a294c39824",
    "size":5534
}

Update App

Updates an app in the target system. If an app with the same name does not already exist in the system, install the app.

The payload is the new app.

Note
Delta updates are not yet supported. New description fields will be added later to support that (such as "deltaFromMd5").

Description fields are:

Field   = Description
----------------------------------------------------------------------------------------------------
name    = string = The app's name.
version = string = The app's human-readable version string.
md5     = string = MD5 hash of the app's build staging area (excluding info.properties file).
size    = integer = Number of bytes of payload associated with this task.

For example,

{
    "command":"updateApp",
    "name":"helloWorld",
    "version":"0.8c",
    "md5":"098843325eef6af82cdc15a294c39824",
    "size":5534
}

Remove App

Removes an app from the system.

Carries no payload.

The only description field is the app's name.

Field   = Description
----------------------------------------------------------------------------------------------------
name    = string = The app's name.

For example,

{
    "command":"removeApp",
    "name":"helloWorld"
}

Update Firmware

Updates firmware in the module. The task payload is a firmware update file that is to be passed to fwupdate.

Additional fields in the task description are for documentation purposes only:

Field   = Description
----------------------------------------------------------------------------------------------------
version = string = The firmware's version string.
size    = unsigned integer = Number of bytes of payload associated with this task.

For example,

{
    "command":"updateFirmware",
    "version":"06.04.40.00",
    "size":42043458
}

Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.