summaryrefslogtreecommitdiffstats
path: root/update_verifier
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-07-16 02:16:37 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-07-16 02:16:37 +0200
commit831c3e2ac143551fd92557c7c71ca801bfdcf58e (patch)
treec70d2c51bb6360bf3cb6a3862b14506e86e9c42c /update_verifier
parentFix a typo when comparing the verity mode (diff)
parentSkip update verification if care_map is not found (diff)
downloadandroid_bootable_recovery-831c3e2ac143551fd92557c7c71ca801bfdcf58e.tar
android_bootable_recovery-831c3e2ac143551fd92557c7c71ca801bfdcf58e.tar.gz
android_bootable_recovery-831c3e2ac143551fd92557c7c71ca801bfdcf58e.tar.bz2
android_bootable_recovery-831c3e2ac143551fd92557c7c71ca801bfdcf58e.tar.lz
android_bootable_recovery-831c3e2ac143551fd92557c7c71ca801bfdcf58e.tar.xz
android_bootable_recovery-831c3e2ac143551fd92557c7c71ca801bfdcf58e.tar.zst
android_bootable_recovery-831c3e2ac143551fd92557c7c71ca801bfdcf58e.zip
Diffstat (limited to 'update_verifier')
-rw-r--r--update_verifier/update_verifier.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/update_verifier/update_verifier.cpp b/update_verifier/update_verifier.cpp
index 53e5efe54..5cff8be93 100644
--- a/update_verifier/update_verifier.cpp
+++ b/update_verifier/update_verifier.cpp
@@ -105,9 +105,12 @@ static bool read_blocks(const std::string& blk_device_prefix, const std::string&
static bool verify_image(const std::string& care_map_name) {
android::base::unique_fd care_map_fd(TEMP_FAILURE_RETRY(open(care_map_name.c_str(), O_RDONLY)));
+ // If the device is flashed before the current boot, it may not have care_map.txt
+ // in /data/ota_package. To allow the device to continue booting in this situation,
+ // we should print a warning and skip the block verification.
if (care_map_fd.get() == -1) {
- SLOGE("Care map %s not found.\n", care_map_name.c_str());
- return false;
+ SLOGI("Warning: care map %s not found.\n", care_map_name.c_str());
+ return true;
}
// Care map file has four lines (two lines if vendor partition is not present):
// First line has the block device name, e.g./dev/block/.../by-name/system.