From 6aa5fb0bbe8d074208648593d177553e732e6d9d Mon Sep 17 00:00:00 2001 From: Zhomart Mukhamejanov Date: Wed, 9 May 2018 14:28:49 -0700 Subject: updater_sample: add http header demo Added demo passing http headers to UpdateEngine#applyPayload. Bug: 79483768 Test: manually Change-Id: I3e9c812dba2066acadbcea8d07c933368806e20c Signed-off-by: Zhomart Mukhamejanov --- updater_sample/README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'updater_sample/README.md') diff --git a/updater_sample/README.md b/updater_sample/README.md index 2c1f0ced5..7e25b070c 100644 --- a/updater_sample/README.md +++ b/updater_sample/README.md @@ -61,6 +61,17 @@ purpose only. 6. Push OTA packages to the device. +## Sending HTTP headers from UpdateEngine + +Sometimes OTA package server might require some HTTP headers to be present, +e.g. `Authorization` header to contain valid auth token. While performing +streaming update, `UpdateEngine` allows passing on certain HTTP headers; +as of writing this sample app, these headers are `Authorization` and `User-Agent`. + +`android.os.UpdateEngine#applyPayload` contains information on +which HTTP headers are supported. + + ## Development - [x] Create a UI with list of configs, current version, @@ -72,12 +83,12 @@ purpose only. - [x] Prepare streaming update (partially downloading package) - [x] Add applying streaming update - [x] Add stop/reset the update +- [x] Add demo for passing HTTP headers to `UpdateEngine#applyPayload` - [ ] Add tests for `MainActivity` -- [ ] Verify system partition checksum for package - [ ] HAL compatibility check - [ ] Change partition demo +- [ ] Verify system partition checksum for package - [ ] Add non-A/B updates demo -- [ ] Add docs for passing HTTP headers to `UpdateEngine#applyPayload` ## Running tests -- cgit v1.2.3