From da7e23759660ebf76a184e4c4d981f11ef9e2653 Mon Sep 17 00:00:00 2001 From: Zhomart Mukhamejanov Date: Tue, 1 May 2018 12:50:55 -0700 Subject: updater_sample: Add streaming to PayloadSpec PayloadSpec - add streaming generator and tests - fix sample.json - fix tests - rename PackagePropertyFiles to PackageFiles, it has info not only about property files, and new name is shorter Bug: 77148467 Test: `mmma -j bootable/recovery/updater_sample` Change-Id: I9c1206c07c37183f13d3c25940f12981ca85b1b4 Signed-off-by: Zhomart Mukhamejanov --- updater_sample/res/raw/sample.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'updater_sample/res') diff --git a/updater_sample/res/raw/sample.json b/updater_sample/res/raw/sample.json index 03335cc97..b6f4cdce6 100644 --- a/updater_sample/res/raw/sample.json +++ b/updater_sample/res/raw/sample.json @@ -1,18 +1,18 @@ { "__name": "name will be visible on UI", - "__url": "https:// or file:// uri to update file (zip, xz, ...)", - "__type": "NON_STREAMING (from local file) OR STREAMING (on the fly)", + "__url": "https:// or file:// uri to update package (zip, xz, ...)", + "__type": "NON_STREAMING (from a local file) OR STREAMING (on the fly)", "name": "SAMPLE-cake-release BUILD-12345", - "url": "file:///data/builds/android-update.zip", - "type": "NON_STREAMING", - "streaming_metadata": { + "url": "http://foo.bar/builds/ota-001.zip", + "ab_install_type": "NON_STREAMING", + "ab_streaming_metadata": { "__": "streaming_metadata is required only for streaming update", "__property_files": "name, offset and size of files", "property_files": [ { - "__filename": "payload.bin and payload_properties.txt are required", - "__offset": "defines beginning of update data in archive", - "__size": "size of the update data in archive", + "__filename": "name of the file in package", + "__offset": "defines beginning of the file in package", + "__size": "size of the file in package", "filename": "payload.bin", "offset": 531, "size": 5012323 -- cgit v1.2.3 From f7a70388ee22e5971ea19caef5208c1da2282ee4 Mon Sep 17 00:00:00 2001 From: Zhomart Mukhamejanov Date: Wed, 2 May 2018 20:37:12 -0700 Subject: updater_sample: update ui and README, clean-up - ui: add text view for latest completion (error) code - update README.md - update MainActivity.java - remove AbNonStreamingUpdate Test: mmma bootable/recovery/updater_sample Change-Id: Ie9bb64211c57d536036b04f13896e4937c392b6e Signed-off-by: Zhomart Mukhamejanov --- updater_sample/res/layout/activity_main.xml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'updater_sample/res') diff --git a/updater_sample/res/layout/activity_main.xml b/updater_sample/res/layout/activity_main.xml index 3cd772107..7a12d3474 100644 --- a/updater_sample/res/layout/activity_main.xml +++ b/updater_sample/res/layout/activity_main.xml @@ -114,7 +114,7 @@ android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Running update status:" /> + android:text="Update status:" /> + + + + + + + + +