platform_bootable_recovery/updater
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
..
include updater: Add TransferList class. 2018-08-17 09:37:26 -07:00
Android.bp Remove otafault 2018-08-27 17:16:19 -07:00
Android.mk Remove otafault 2018-08-27 17:16:19 -07:00
blockimg.cpp Enable c++17 in recovery_defaults. 2018-08-28 10:49:07 -07:00
commands.cpp updater: Add TransferList class. 2018-08-17 09:37:26 -07:00
install.cpp applypatch: Refactor applypatch(). 2018-08-31 09:21:15 -07:00
updater.cpp Remove otafault 2018-08-27 17:16:19 -07:00