| Commit message (Collapse) | Author | Files | Lines |
|
UpdateEngine has a feature that verifies
payload without downloading the whole update package.
If UpdateEngine detects invalid payload,
the sample app aborts the update.
No JUnit tests, because it accesses files on the
device and migrating tests to robolectric
is not worth for this sample app.
Bug: 77150191
Test: device
Change-Id: Ib8ce73508a02cf5fdcb326d8ba46c1d05ed5efe5
|
|
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
|
|
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: Iea69acd9aa41e17538c26aff60f7598093ca7744
|
|
Add new config: ab_config.verify_payload_metadata.
Change-Id: I521dff92166c33dd9c2efa498dc599fe4bc83fde
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
Test: mmm, junit
Bug: 77150191
|
|
Update util/UpdateEngineErrorCodes.java
Test: n/a
Change-Id: I7250b1198b1d5ff0e38b7d4effe61eebd114a44f
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
|
|
- Add suspend/resume buttons.
- UpdateManager: add suspend/resume control methods.
- UpdaterState: fix transitions.
Test: on the device
Bug: 77150010
Change-Id: I174edd32401f8232b5071eb1a2758a4704779801
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
|
|
- 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>
|
|
Test: on device
Change-Id: I0a8a87d7b69f0efdcbd17facbf42cb94fb96fe51
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
|
|
Test: on the device
Change-Id: I15762dafec1814980e1c2529f5fc2048853c8ff2
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
|
|
Currently sample app relies on onPayloadApplicationComplete
callback. It might not get invoked when app is unbound and
update is complete.
On the other hand, onStatusUpdate gets invoked always
(except when update_engine fails to init).
It's good to rely on onStatusUpdate callback to
reapply the update if it's IDLE but sample app state
is RUNNING.
- Add methods to ensure correct updater state.
- Update README.md.
BUG: 80205922
Test: on the device
Change-Id: Ic2f390e85af43556e227362321ab69f0ff146188
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
|
|
- Add UpdaterState - atomic class, handles proper
state changes.
- Remove util.UpdaterStates.
Test: compiled and ran on the device
Change-Id: I7fa87bbf09f8289632e8de1f26654365f4891700
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
|
|
This class allows easily passing update data to
apply payload, re-applying the updata data,
and in the future persisting.
Test: on the device
Change-Id: Ie01c5f3384c421bf1180122f27811c644179e3f5
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
|
|
- Add util.UpdaterStates - the state of SystemUpdaterSample.
It's different from status of UpdateEngine;
when UpdateEngine#cancel is used to suspend the update,
UpdateEngine sets status to IDLE, which cannot be used
to track the suspended state.
- UI: Change 'Update status' to 'Engine status'.
- UI: Change 'Update completion' to 'Engine error code'.
- UI: Add 'Updater state'.
Test: manually on the device
Test: using JUnit4
Change-Id: I9c58b5ed0eae3be7ab8b217fc01a621e8fb2f4bf
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
|
|
- 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>
|
|
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>
|
|
- 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>
|
|
- Refactor PrepareStreamingService#onHandleIntent
- Add PrepareStreamingService#verifyPackageCompatibility
Test: on the device
Bug: 79471299
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
Change-Id: I1b18502f0638d66810a3f7ada582e4c7cea20cdb
|
|
- fix UpdateConfig
- fix smaple.json
- fix FileDownloaderTest
Test: manually
Change-Id: I09d272f77c89a02f54a24cf753fdfda4ce243927
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
|
|
Added demo passing http headers to UpdateEngine#applyPayload.
Bug: 79483768
Test: manually
Change-Id: I3e9c812dba2066acadbcea8d07c933368806e20c
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
|
|
- UpdateConfigs: add helper methods for streaming
- add PrepareStreamingService intent service
Test: manually and junit4
Bug: 77148143
Change-Id: I61711eb9abe051987e725fbd94f8cd029ff21dd3
|
|
- 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>
|
|
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>
|
|
Test: unit tests
Change-Id: I10933e7172d7ebc34c7cf5e4274625d7b8399246
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
|
|
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>
|
|
Also replace the occurrence in README.md and PREUPLOAD.cfg.
Test: mmma -j bootable/recovery
Change-Id: I04c0ef00dd64f49e008ad2a4a2c1e8eaed76bf8d
|