Commit graph

58 commits

Author SHA1 Message Date
Zhomart Mukhamejanov
93535dd033 updater_sample: add FileDownloader
Test: unit tests

Change-Id: I10933e7172d7ebc34c7cf5e4274625d7b8399246
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
2018-05-01 12:08:18 -07:00
Zhomart Mukhamejanov
963e3eeb00 updater_sample: Improve UpdateConfig
UpdateConfig:
- constant names changed
- added parsing streaming metadata
- added InnerFile to describe a file in zip

Android.mk
- added guava

tests fixed

Test: using junit4

Change-Id: Ibe3c8a3bde20259b0eea9a79aca4b22ed7b048f4
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
2018-05-01 10:24:57 -07:00
Zhomart Mukhamejanov
72a4d465bf updater_sample: fix gen_update_config.py
Fix gen_update_config.py.
And add tests for gen_update_config.py.

Test: python3 updater_sample/tools/gen_update_config_test.py

Change-Id: I0d270f1d5d7635855ee9acb0dd094e083cd33e3a
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
2018-04-26 19:40:48 -07:00
Zhomart Mukhamejanov
6bd1d9b8d9 Merge "sample_updater: create tools/gen_update_config.py" 2018-04-26 19:21:08 +00:00
Zhomart Mukhamejanov
02e912c235 sample_updater: add tests resources
This resource files are used in tests. ota package zip file
contains only text files.
Config files are generated using tools/gen_update_config.py

Test: N/A

Change-Id: I9d3d0f81472dc20db18b32f4a9445a998b68b0e3
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
2018-04-25 18:18:46 -07:00
Zhomart Mukhamejanov
d5a41822c2 sample_updater: create tools/gen_update_config.py
gen_update_config.py generates JSON config files
from given OTA image zip files.

README.md is updated.

Test: manually

Change-Id: Ifd09b49a73983a42752ee3842a566cecedb9cae0
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
2018-04-25 17:43:26 -07:00
Tao Bao
daa65aed99 updater_sample: Use stubs libs for android.test.base / runner.
To address the warning below (which will be disallowed):
bootable/recovery/updater_sample/tests/Android.mk: warning:
SystemUpdaterSampleTests (java:system) should not link to
android.test.runner (java:platform)

(See b/69899800 or the commit message in [1] for detailed discussions.)

[1]: https://android-review.googlesource.com/c/platform/frameworks/ml/+/666428

Test: `mmma -j bootable/recovery` gives no warning.
Test: Install and run SystemUpdaterSampleTests on device.
Change-Id: I12a1556d572d9f332fcf43dc84cbe8fd1b6df89b
2018-04-25 15:59:53 -07:00
Tao Bao
32118f6690 Rename the dir for SystemUpdaterSample.
Also replace the occurrence in README.md and PREUPLOAD.cfg.

Test: mmma -j bootable/recovery
Change-Id: I04c0ef00dd64f49e008ad2a4a2c1e8eaed76bf8d
2018-04-25 15:34:37 -07:00