Bump version to 1.50.4 (15004)

Change-Id: Iee8a0288a17a67cb3d84c885afb105ac0880c025
1 file changed
tree: c8f7100a412ed4e8ff527ee7b57e84c451b974f3
  1. app/
  2. gradle/
  3. .gitignore
  4. build.gradle
  5. gradle.properties
  6. gradlew
  7. gradlew.bat
  8. LICENSE.txt
  9. project.properties
  10. README.md
  11. settings.gradle
README.md

###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.

Building

Updater can be built using Android Studio or directly with Gradle.

Android Studio

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.

Commandline

To build from commandline you will need the Android SDK and Gradle. Follow the instructions in Android documentation.

Signing for Release

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

  • a keystore containing the release key and
  • a configuration file describing how to access the key.

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.

Implementation Details

Query parameters available:

  • model --- Fairphone model.
  • os --- Android version.
  • b_n --- Current image build number.
  • ota_v_n --- Current image version number.
  • d --- Current image build date in UTC unix time.
  • beta --- Beta program status. 0 is beta disabled; 1 is beta enabled.
  • dev --- Developer mode status. 0 is dev mode disabled; 1 is dev mode enabled.

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
      (...)