summaryrefslogtreecommitdiffstats
path: root/update_verifier/update_verifier.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-03-10 23:21:25 +0100
committerTao Bao <tbao@google.com>2017-03-11 00:16:27 +0100
commitdb57f0d7f427538b177ef82dde385e4207e35067 (patch)
tree48cef153e56085e8d73e9c097d379d6d696d498d /update_verifier/update_verifier.cpp
parentMerge "recovery: replacing fs_mgr_read_fstab() with new fs_mgr APIs" (diff)
downloadandroid_bootable_recovery-db57f0d7f427538b177ef82dde385e4207e35067.tar
android_bootable_recovery-db57f0d7f427538b177ef82dde385e4207e35067.tar.gz
android_bootable_recovery-db57f0d7f427538b177ef82dde385e4207e35067.tar.bz2
android_bootable_recovery-db57f0d7f427538b177ef82dde385e4207e35067.tar.lz
android_bootable_recovery-db57f0d7f427538b177ef82dde385e4207e35067.tar.xz
android_bootable_recovery-db57f0d7f427538b177ef82dde385e4207e35067.tar.zst
android_bootable_recovery-db57f0d7f427538b177ef82dde385e4207e35067.zip
Diffstat (limited to 'update_verifier/update_verifier.cpp')
-rw-r--r--update_verifier/update_verifier.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/update_verifier/update_verifier.cpp b/update_verifier/update_verifier.cpp
index a4799cc31..83b1c46c4 100644
--- a/update_verifier/update_verifier.cpp
+++ b/update_verifier/update_verifier.cpp
@@ -216,6 +216,8 @@ int main(int argc, char** argv) {
if (is_successful == BoolResult::FALSE) {
// The current slot has not booted successfully.
+
+#ifdef PRODUCT_SUPPORTS_VERITY
std::string verity_mode = android::base::GetProperty("ro.boot.veritymode", "");
if (verity_mode.empty()) {
LOG(ERROR) << "Failed to get dm-verity mode.";
@@ -232,6 +234,9 @@ int main(int argc, char** argv) {
LOG(ERROR) << "Failed to verify all blocks in care map file.";
return -1;
}
+#else
+ LOG(WARNING) << "dm-verity not enabled; marking without verification.";
+#endif
CommandResult cr;
module->markBootSuccessful([&cr](CommandResult result) { cr = result; });