summaryrefslogtreecommitdiffstats
path: root/updater_sample/tests/src/com/example/android/systemupdatersample (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add PrepareUpdateService.Zhomart Mukhamejanov2018-12-171-33/+42
| | | | | | | | | | | | | | | | | | It's moved from PrepareStreamingService intent service. Now PrepareUpdateService takes an UpdateConfig and builds PayloadSpec for UpdateEngine for both streaming and non-streaming update. It allows us to do all preparations in intent service's thread, without blocking UI. We will also add checksum verification to PrepareUpdateService. Test: device, junit Bug: 77150191 Change-Id: I15c0bc58e3238bea6ea1c4f13063575e2def89c1 Merged-In: Iea69acd9aa41e17538c26aff60f7598093ca7744
* Move ab_streaming_metadata under ab_config.Zhomart Mukhamejanov2018-08-221-11/+16
| | | | | | | | | Add new config: ab_config.verify_payload_metadata. Change-Id: I521dff92166c33dd9c2efa498dc599fe4bc83fde Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com> Test: mmm, junit Bug: 77150191
* updater_sample: fix payload spec testsZhomart Mukhamejanov2018-06-071-1/+1
| | | | | | Test: junit4 Change-Id: Ia2f7475cfba01a65486bb0e5d0f3976304ca0969 Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
* updater_sample: improve updater state handlingZhomart Mukhamejanov2018-06-042-21/+75
| | | | | | | | | | | | | | | - Enable more UpdaterState transitions. - MainActivity: Improve UI states. - UpdateManager: fix status handling errors, add suspend/resume methods. Add "synchronize this" to public control (suspend, cancel, ..) methods. - Add several UpdateManager tests. Test: on device Test: JUnit4 Change-Id: Id7f85dfaa466fa0d6136eee39e9fd7658278c616 Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
* updater_sample: create UpdateManagerZhomart Mukhamejanov2018-05-242-48/+92
| | | | | | | | | | | | | | - Add UpdateManager - responsible for the update logic. Now ui.MainActivity is responsible for only UI. - Create sample test for UpdateManager - Remove MainActivityTest - now MainActivity is really simple. - Add separate callback for progress update. - MainActivity: UpdateEngine#bind/unbind on pause/resume. Test: manually on the device Test: using JUnit4 Change-Id: I1dba7c4ec74b1afb520be762413cfc261ccfbc08 Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
* updater_config: make utils/PayloadSpecs non-staticZhomart Mukhamejanov2018-05-181-3/+6
| | | | | | | | | | | | PayloadSpecs has complicated methods, which makes hard to test other dependent classes. Making it non-static allows mocking it, which makes testing other classes easier. Test: manually Test: using JUnit4 Change-Id: I818dc59c6bb0e7d131439d0d41f88d5cd9a451b4 Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
* updater_sample: add switch slot demoZhomart Mukhamejanov2018-05-171-2/+6
| | | | | | | | | | | | | - Add util/UpdateEngineProperties.java - Set SWITCH_SLOT_ON_REBOOT=0 when update is applied - Allow user to switch slot to the updated partition manually - Add config "ab_config.force_switch_slot" - Add ab_force_switch_slot to tools/gen_update_config.py Test: manually on the marlin device Bug: 79492522 Change-Id: I52f818b576d52a052b5427ba3f732cb2371ddb06 Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
* updater_sample: fix UpdateConfigZhomart Mukhamejanov2018-05-101-1/+1
| | | | | | | | | | - fix UpdateConfig - fix smaple.json - fix FileDownloaderTest Test: manually Change-Id: I09d272f77c89a02f54a24cf753fdfda4ce243927 Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
* updater_sample: update toolsZhomart Mukhamejanov2018-05-082-42/+18
| | | | | | | | | | | | - Allow gen_update_config.py to use ota_from_target_files from $ANDROID_BUILD_TOP/build/make/tools/releasetools/ - tests/res/raw/ota_002_package.zip re-generated using functions from $ANDROID_BUILD_TOP/build/make/tools/releasetools/test_ota_from_target_files.py - sample app tests updated Test: ./tools/gen_update_config_test.py Change-Id: I5c492ec22782ba54fe481f592a44e797c695684e Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
* updater_sample: update testsZhomart Mukhamejanov2018-05-032-14/+28
| | | | | | | | | - fix tools/gen_update_config.py - add tests for PayloadSpecs#forStreaming Test: junit4 Change-Id: Ife1980c5f72944ed35500aa820b30031fc99e820 Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
* updater_sample: update ui and README, clean-upZhomart Mukhamejanov2018-05-031-2/+2
| | | | | | | | | | | - 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 <zhomart@google.com>
* updater_sample: Add streaming to PayloadSpecZhomart Mukhamejanov2018-05-022-3/+3
| | | | | | | | | | | | | | 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 <zhomart@google.com>
* updater_sample: add FileDownloaderZhomart Mukhamejanov2018-05-011-0/+80
| | | | | | | Test: unit tests Change-Id: I10933e7172d7ebc34c7cf5e4274625d7b8399246 Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
* updater_sample: Improve UpdateConfigZhomart Mukhamejanov2018-05-012-12/+46
| | | | | | | | | | | | | | | | | 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>
* Rename the dir for SystemUpdaterSample.Tao Bao2018-04-264-0/+307
Also replace the occurrence in README.md and PREUPLOAD.cfg. Test: mmma -j bootable/recovery Change-Id: I04c0ef00dd64f49e008ad2a4a2c1e8eaed76bf8d