platform_bootable_recovery/applypatch
Tao Bao d34e6bc44b applypatch: Change applypatch command-line arguments.
This applies to the standalone applypatch executable
(/system/bin/applypatch on device). This executable is only used when
installing (via patching or flashing) a recovery image on non-A/B
device.

This CL removes the support for patching non-eMMC targets from
applypatch that has been deprecated as part of file-based OTA. For
patching eMMC targets, it also drops the support for accepting multiple
patches (not useful, since the source file must be fixed).

This CL needs the matching change in the same topic, which writes the
script of "/system/bin/install-recovery.sh". Note that this CL doesn't
chanage the applypatch API signatures, in order to minimize the CL size.

*BEFORE*

usage: /system/bin/applypatch [-b <bonus-file>] <src-file> <tgt-file> <tgt-sha1> <tgt-size> [<src-sha1>:<patch> ...]
   or  /system/bin/applypatch -c <file> [<sha1> ...]
   or  /system/bin/applypatch -l

Filenames may be of the form
  EMMC:<partition>:<len_1>:<sha1_1>:<len_2>:<sha1_2>:...
to specify reading from or writing to an EMMC partition.

*AFTER*

Usage:
check mode
  applypatch --check EMMC:<target-file>:<target-size>:<target-sha1>

flash mode
  applypatch --flash <source-file>
             --target EMMC:<target-file>:<target-size>:<target-sha1>

patch mode
  applypatch [--bonus <bonus-file>]
             --patch <patch-file>
             --target EMMC:<target-file>:<target-size>:<target-sha1>
             --source EMMC:<source-file>:<source-size>:<source-sha1>

show license
  applypatch --license

Bug: 110106408
Test: Run recovery_component_test and recovery_unit_test on marlin.
Test: Build a non-A/B target that has /system/bin/install-recovery.sh.
      Verify that it installs recovery image successfully.
Test: Build a non-A/B target that has /system/bin/install-recovery.sh in
      flashing mode. Verify that it installs recovery image successfully.
Change-Id: I71f9a71fb457e6f663e0b5511946949e65b4b78c
2018-07-20 11:26:17 -07:00
..
include/applypatch applypatch: Change applypatch command-line arguments. 2018-07-20 11:26:17 -07:00
Android.bp Disable building libapplypatch on mac 2018-02-17 22:06:31 -08:00
applypatch.cpp applypatch: Change applypatch command-line arguments. 2018-07-20 11:26:17 -07:00
applypatch_main.cpp applypatch: Change applypatch command-line arguments. 2018-07-20 11:26:17 -07:00
applypatch_modes.cpp applypatch: Change applypatch command-line arguments. 2018-07-20 11:26:17 -07:00
applypatch_modes.h applypatch: Change applypatch command-line arguments. 2018-07-20 11:26:17 -07:00
bspatch.cpp applypatch: Drop the SHA_CTX parameter in Apply{BSDiff,Image}Patch. 2018-04-20 09:27:50 -07:00
freecache.cpp applypatch: Consolidate CacheSizeCheck() and MakeFreeSpaceOnCache(). 2018-07-13 09:42:19 -07:00
imgdiff.cpp Convert deflate image chunks to raw if the raw data is smaller 2018-05-24 10:49:54 -07:00
imgdiff_main.cpp Add tests for imgdiff. 2016-12-19 16:53:03 -08:00
imgpatch.cpp Remove the debug code for bspatch flakiness 2018-07-11 11:51:43 -07:00
NOTICE Add NOTICE file 2012-04-06 13:51:00 -07:00