platform_bootable_recovery/tests/component
Tao Bao 5609bc8b34 applypatch: Refactor applypatch().
applypatch() was initially designed for file-based OTA, operating on
individual files. It was later extended to allow patching eMMC targets
as a whole, in favor of block-based updates.

As we have deprecated file-based OTA since Oreo, part of the code in
applypatch() has become obsolete. This CL refactors the related
functions, by removing the obsolete logic and focusing on eMMC targets.

Since this CL substantially changes applypatch APIs, it adds new
functions to avoid unintentionally mixing them together. In particular,
it removes `applypatch()`, `applypatch_check()`, `applypatch_flash()`,
and adds `PatchPartition()`, `PatchPartitionCheck()`, `FlashPartition()`
and `CheckPartition()`. It also replaces the old Edify functions
`apply_patch()` and `apply_patch_check()` with `patch_partition()` and
`patch_partition_check()` respectively.

This CL requires matching changes to OTA generation script (in the same
topic).

Bug: 110106408
Test: Run recovery_unit_test and recovery_component_test on marlin.
Test: `m dist` with non-A/B target. Verify
      /system/bin/install-recovery.sh on device.
Test: `m dist` with non-A/B target using BOARD_USES_FULL_RECOVERY_IMAGE.
      Verify /system/bin/install-recovery.sh on device.
Test: Install an incremental OTA with the new updater and scripts.
Change-Id: Ia34a90114bb227f4216eb478c22dc98c8194cb7f
2018-08-31 09:21:15 -07:00
..
applypatch_modes_test.cpp applypatch: Change applypatch command-line arguments. 2018-07-20 11:26:17 -07:00
bootloader_message_test.cpp Switch to bionic gtest in bootable/recovery 2017-11-03 14:09:11 -07:00
edify_test.cpp edify: Rename parse_string to ParseString and let it take std::string. 2018-07-10 06:27:50 +00:00
imgdiff_test.cpp Convert deflate image chunks to raw if the raw data is smaller 2018-05-24 10:49:54 -07:00
install_test.cpp Track the change to update_engine_sideload path. 2018-08-14 12:34:46 -07:00
resources_test.cpp tests: Move to Android.bp. 2018-08-14 21:46:45 -07:00
sideload_test.cpp Clean up fuse_sideload and add a testcase. 2017-11-03 18:30:41 -07:00
uncrypt_test.cpp Switch to bionic gtest in bootable/recovery 2017-11-03 14:09:11 -07:00
update_verifier_test.cpp Add proto3 support for care_map 2018-07-25 14:15:22 -07:00
updater_test.cpp applypatch: Refactor applypatch(). 2018-08-31 09:21:15 -07:00
verifier_test.cpp otautil: Rename dir/sys/thermal utils. 2018-05-03 23:17:29 -07:00