commit | 49db2b7ca09735cdaed315b800446add71a80029 | [log] [tgz] |
---|---|---|
author | Maarten Derks <maarten@fairphone.com> | Thu Jun 03 09:13:26 2021 +0200 |
committer | Maarten Derks <maarten@fairphone.com> | Thu Jun 03 09:44:49 2021 +0200 |
tree | 122f50e49a0b37019db81e8529e21b1bd2a74026 | |
parent | 5418b8e47fd2a1c1462c4b1466ede4dcdd3efc4e [diff] |
Bump version to 1.50.3 (15003) Change-Id: I3e5c879e51eb6ab4f0c5f487f21776ea2eb82906
###Fairphone Updater overview
The Fairphone updater is a built in updater service that provides functionality for OTA - Over The Air updates of the Fairphone OS.
Updater can be built using Android Studio or directly with Gradle.
In order to build in Android Studio, import the root of the Git repository as a new project and use the features of the IDE to edit, build, run, and debug Updater.
To build from commandline you will need the Android SDK and Gradle. Follow the instructions in Android documentation.
By default both debug and release build variants are signed using default keys included in the Android SDK. To sign the app for release, you need
The release key can be put in a keystore using a script in vendor/fairphone/tools/
.
Point the build system to the keystore using a configuration file which includes the path to the keystore, the alias of the key, and passwords for keystore and key. The file keystore.properties
needs to be at the root of the Git repository and contain information like:
storePassword=<pwd-of-keystore> keyPassword=<pwd-of-key-in-keystore> keyAlias=UpdaterReleaseKey storeFile=../relative/path/to/updater.keystore
You can verify that Gradle can find and open the key by checking the output of gradlew signingReport
. The sections for release
and releaseUnitTest
variants should look similar to:
Variant: release Config: release Store: /absolute/path/to/updater.keystore Alias: UpdaterReleaseKey MD5: 7D:F2:FC:AA:FD:75:F3:83:5C:ED:AE:63:B7:F2:AD:AB SHA1: 30:63:51:FB:98:33:47:1A:26:00:2D:58:C7:F1:1D:76:DE:F0:34:8E Valid until: Monday, November 24, 2042
If configuration is correct, gradlew assembleRelease
can be used to create the signed app at ./app/build/outputs/apk/release/app-release.apk
.
Query parameters available:
Ex: http://www.server.com/updater.zip?model=FP1U&os=4.2.2&b_n=1.8&ota_v_n=6&d=1416798101&beta=1&dev=0
Updater config file elements:
#!xml <?xml version="1.0" encoding="utf-8"?> <updater> <releases> ---------> This element will have all the versions available. <fairphone latest="2"> ---------> This element will have all the fairphone versions available. The "latest" attribute will have the version number of the latest version. The version corresponding to the latest id must appear in the versions list below. <version number="1"> ---------> This element will have all the information about a version. The "number" attribute will have the version number. <name>Version Name</name> ---------> This element will have the version name. <build_number>Version Build Number</build_number> ---------> This element will have the version build number. <android_version>Version Android </android_version> ---------> This element will have the version android version. <release_notes>Release notes default</release_notes> ---------> This element will have the version release notes. <release_notes_fr>Release notes FR</release_notes_fr> ---------> This element will have the version release notes in a given language. Add _country_code (Ex: _fr for France) to the release_notes tag (Ex: release_notes_fr). These tags are optional. <md5sum>ff7a312ae9fbc52d591fcd4b213b9321</md5sum> ---------> This element will have the update file MD5 checksum. <update_link>Update Url</update_link> ---------> This element will have the version OTA image download link. <erase_data_warning/> ---------> This element indicates that if this update is performed all the user data will be erased. This tag is optional. </version> <version number="2"> <name>Jelly Bean</name> (...) </version> </fairphone> </releases> </updater>
Updater server path structure:
Root -> Server URL | |--> latest.zip -> Old updater config file | |--> FP1/ -> FP1 original and FP1 Fuse fit here since they have the same Model | |--> originalPartition/ -> FP1 with 1GB data partition | | |--> updater.zip | |--> unifiedPartition/ -> FP1 with unified data partition | |--> updater.zip |--> FP1U | |--> updater.zip |--> FP2 | |--> updater.zip (...)