summaryrefslogtreecommitdiffstats
path: root/updater_sample/README.md
diff options
context:
space:
mode:
authorZhomart Mukhamejanov <zhomart@google.com>2018-04-25 03:17:57 +0200
committerZhomart Mukhamejanov <zhomart@google.com>2018-04-26 02:43:26 +0200
commitd5a41822c2a76fdb946649fca9c59d4aff3a0bfc (patch)
tree2679759cf52d73c59fc4f1a5ca88d514917ae3ee /updater_sample/README.md
parentMerge "updater_sample: Use stubs libs for android.test.base / runner." (diff)
downloadandroid_bootable_recovery-d5a41822c2a76fdb946649fca9c59d4aff3a0bfc.tar
android_bootable_recovery-d5a41822c2a76fdb946649fca9c59d4aff3a0bfc.tar.gz
android_bootable_recovery-d5a41822c2a76fdb946649fca9c59d4aff3a0bfc.tar.bz2
android_bootable_recovery-d5a41822c2a76fdb946649fca9c59d4aff3a0bfc.tar.lz
android_bootable_recovery-d5a41822c2a76fdb946649fca9c59d4aff3a0bfc.tar.xz
android_bootable_recovery-d5a41822c2a76fdb946649fca9c59d4aff3a0bfc.tar.zst
android_bootable_recovery-d5a41822c2a76fdb946649fca9c59d4aff3a0bfc.zip
Diffstat (limited to 'updater_sample/README.md')
-rw-r--r--updater_sample/README.md42
1 files changed, 34 insertions, 8 deletions
diff --git a/updater_sample/README.md b/updater_sample/README.md
index d9864b472..ee1faaf85 100644
--- a/updater_sample/README.md
+++ b/updater_sample/README.md
@@ -9,6 +9,39 @@ A/B (seamless) update is available since Android Nougat (API 24), but this sampl
targets the latest android.
+## Workflow
+
+SystemUpdaterSample app shows list of available updates on the UI. User is allowed
+to select an update and apply it to the device. App shows installation progress,
+logs can be found in `adb logcat`. User can stop or reset an update. Resetting
+the update requests update engine to cancel any ongoing update, and revert
+if the update has been applied. Stopping does not revert the applied update.
+
+
+## Update Config file
+
+In this sample updates are defined in JSON update config files.
+The structure of a config file is defined in
+`com.example.android.systemupdatersample.UpdateConfig`, example file is located
+at `res/raw/sample.json`.
+
+In real-life update system the config files expected to be served from a server
+to the app, but in this sample, the config files are stored on the device.
+The directory can be found in logs or on the UI. In most cases it should be located at
+`/data/user/0/com.example.android.systemupdatersample/files/configs/`.
+
+SystemUpdaterSample app downloads OTA package from `url`. If `ab_install_type`
+is `NON_STREAMING` then app downloads the whole package and
+passes it to the `update_engine`. If `ab_install_type` is `STREAMING`
+then app downloads only some files to prepare the streaming update and
+`update_engine` will stream only `payload.bin`.
+To support streaming A/B (seamless) update, OTA package file must be
+an uncompressed (ZIP_STORED) zip file.
+
+Config files can be generated using `tools/gen_update_config.py`.
+Running `./tools/gen_update_config.py --help` shows usage of the script.
+
+
## Running on a device
The commands expected to be run from `$ANDROID_BUILD_TOP`.
@@ -18,13 +51,6 @@ The commands expected to be run from `$ANDROID_BUILD_TOP`.
3. Add update config files.
-## Update Config file
-
-Directory can be found in logs or on UI. Usually json config files are located in
-`/data/user/0/com.example.android.systemupdatersample/files/configs/`. Example file
-is located at `res/raw/sample.json`.
-
-
## Development
- [x] Create a UI with list of configs, current version,
@@ -33,8 +59,8 @@ is located at `res/raw/sample.json`.
update zip file
- [x] Add `UpdateConfig` for working with json config files
- [x] Add applying non-streaming update
-- [ ] Add applying streaming update
- [ ] Prepare streaming update (partially downloading package)
+- [ ] Add applying streaming update
- [ ] Add tests for `MainActivity`
- [ ] Add stop/reset the update
- [ ] Verify system partition checksum for package