applypatch: Support flash mode.

We may carry a full copy of recovery image in the /system, and use
/system/bin/install-recovery.sh to install the recovery. This CL adds
support to flash the recovery partition with the given image.

Bug: 22641135
Change-Id: I7a275b62fdd1bf41f97f6aab62d0200f7dae5aa1
(cherry picked from commit 68c5a67967)
This commit is contained in:
Tao Bao
2015-07-17 18:11:12 -07:00
parent cc3c34145e
commit abba55b4c5
3 changed files with 97 additions and 16 deletions
+2
View File
@@ -48,6 +48,8 @@ size_t FreeSpaceForFile(const char* filename);
int CacheSizeCheck(size_t bytes);
int ParseSha1(const char* str, uint8_t* digest);
int applypatch_flash(const char* source_filename, const char* target_filename,
const char* target_sha1_str, size_t target_size);
int applypatch(const char* source_filename,
const char* target_filename,
const char* target_sha1_str,