Install and Configure Update Factory Client packages for Embedded Android¶
Kynetics provides as an open-source project: UfAndroidClient on GitHub. The project contains two clients: a uf client service and also an optional uf ui app which can be implemented on your embedded Android device to access our over-the-air (OTA) update platform: Update Factory.
The uf client service handles all communication to and from the Update Factory platform and must be installed on your embedded Android device.
The uf ui app can be used to define your configuration to Update Factory as an app using the native Android keyboard. If you have the ufConf.conf file defined, the uf ui app will read that configuration file and not require user input for configuration in the app. Additionally, the uf ui app can also be used to monitor statuses between the device and Update Factory. It can be useful for debugging purposes.
In addition, Kynetics provides these clients as Android Package (APK) files for side-load installation. The uf client service must be installed as a SYSTEM application to work correctly. To be a system app, it is necessary to sign the application with the platform key. This can be the test version of the platform key provided by the Android build system or a custom one created for production purposes. Please refer to this technical note for more information regarding how to sign system applications. Also, there is a quick example on signing the uf client service APK, below.
Note: For a successful installation, this guide assumes that you've powered on your equipment, have debug/developer mode enabled in Android, and have connected your device to your computer so that the adb utility can be used to side-load (install) APKs and copy the ufConf.conf file to your device.
Download the APKs¶
The last version of the client applications are available on the Github releases page
We've pre-signed the the uf client service APK with the NXP platform keys.
Signing the uf client service APK¶
In the case that you need to sign the uf client service APK with different platform keys, you will need the following standard keys that were also used to signed your OS image:
You also will need the signapk.jar utility, which you can find under the Android OS buildsystem folder:
Once you have all of your files in order, you can run the following command to sign the uf client service (of course fix the paths/file names as needed for your case):
java -jar signapk.jar platform.x509.pem platform.pk8 uf-client-service-v0.2.1.apk uf-client-service-signed-v0.2.1.apk
Preparing the ufConf.conf configuration files¶
Learn more about the parameters in the ufConf.conf configuration file and also where to copy it onto your device, here.
Proceed to side-load the signed uf client service APK. In this example, it is called: uf-client-service-signed-v0.2.1.apk.
adb install uf-client-service-signed-v0.2.1.apk
After installation of the uf client service, you will need to run the following, once:
adb shell am startservice -a com.kynetics.action.BIND_UF_SERVICE
Optionally, you can also install the uf ui app:
adb install uf-client-ui-v0.2.1.apk
Once installed successfully, you can find the uf ui app in the Android launcher.
The android client is able to apply two kinds of updates: - Application: the client installs (or updates) applications; all files contained in the Distribution must be Android applications (.apk). 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. The update is performed without a system reboot;
- System: an update of the OS. The Software module must contain a
single OTAfile. The update requires a system reboot;
Application and System aren't related to Software module type of Update Factory server.