Update Factory Client for Embedded Android¶
Update Factory Android Client is an open-source project by Kynetics. The project provides:
- UF Android Client Service: an
apkthat, when installed on an embedded Android device, implements a background service that:
- UF third-party integration APIs: an
aarlibrary that allows third party applications to configure, manage and monitor the UF Android Client Service
- UF Android Client UI example: an
apkthat allows to configure, manage and monitor the UF Android Client Service from a simple Android User Interface. The app provides a third-party integration reference code for customer to integrate Update Factory in their own application. The app can be used also for debugging purposes.
Supported update types¶
The Android Client is able to apply two kind of updates: Application and System updates.
The client installs (or updates) Android applications.
An Application Software module must:
- have the Application type
- include one or more Android application(s) (
An application update will fail under the following conditions:
- the installation of one or more applications has failed;
- some files in the update are not apk files.
Application updates are performed without a system reboot.
The client installs an Android OS update. The UF Android Client is able to automatically detect the type of system updates supported by the device.
A System Software module must:
- have the OS type
- include a single OTA file
The two types of system updates are:
- single-copy updates: older Android devices tend to use this update mechanism where system partitions are not duplicated
- double-copy updates (also known as "AB updates"): recent Android devices tend to use this update mechanism where system partitions are fully duplicated
System updates require a system reboot.
Artifacts Download retry policy¶
The UF Android Clients implement the following artifacts download retry policies in case of download issues (e.g. poor network connection).
Clients ≤ 1.1.2¶
Three subsequent artifact download attempts are performed, with a 30 seconds interval in between. If all the three attempts fail, a download failure is reported to the Update Factory server.
Clients ≥ 1.2.0¶
A "truncated exponential backoff" algorithm is implemented in recent Clients. A maximum of 36 artifact download attempts are performed at increasing intervals, ranging from 10 seconds for the first few attempts, to 1 hour for the last ones. If all the attempts fail, a download failure is reported to the Update Factory server.
When using new Clients the Artifact Download Lifetime should be set to at least 2 days, to make sure the artifact URL doesn't expire before the last download attempt.
Download retry intervals table
This table shows the wait interval that follows each failed artifact download attempt.
|Attempt #||Wait Interval (s)|
Client polling time¶
The UF Android Client Service respects the Polling Time specified by the server in the System Configuration.
There are two exceptions to the rule:
- whenever a poll fails, the Service tries to poll with a "truncated exponential backoff" algorithm with a maximum of 60 seconds interval between a poll attempt and the following. See "Poll retry intervals table" for details
- while the client is downloading the update artifacts, the Service polls every 30 seconds to increase the likelihood of intercepting potential cancel actions from the server
Poll retry intervals table
This table shows the wait interval that follows each failed poll attempt.
|Attempt #||Wait Interval (s)|