aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsaac Chen2017-12-13 22:18:41 -0600
committerGerrit Code Review2017-12-13 22:18:41 -0600
commit3fe230a1e47863e43fec629a2cfe1f51915e9f32 (patch)
treef323f68f37976352b1d3f6f6f6def3384c2fddaa
parent9203e77e7d449e55e8eb4a112f6896beb408f5ac (diff)
parent26fd78c024a4f6eadf012ea83ed5d2cc0f2dcfdf (diff)
downloadplatform-bootable-recovery-3fe230a1e47863e43fec629a2cfe1f51915e9f32.tar.gz
platform-bootable-recovery-3fe230a1e47863e43fec629a2cfe1f51915e9f32.tar.xz
platform-bootable-recovery-3fe230a1e47863e43fec629a2cfe1f51915e9f32.zip
Merge "Let update_verifier work on non-AB update devices"
-rw-r--r--update_verifier/update_verifier_main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/update_verifier/update_verifier_main.cpp b/update_verifier/update_verifier_main.cpp
index 9dd5a0cc..a86203bf 100644
--- a/update_verifier/update_verifier_main.cpp
+++ b/update_verifier/update_verifier_main.cpp
@@ -16,11 +16,20 @@
16 16
17// See the comments in update_verifier.cpp. 17// See the comments in update_verifier.cpp.
18 18
19#include <string>
20
19#include <android-base/logging.h> 21#include <android-base/logging.h>
22#include <android-base/properties.h>
20 23
21#include "update_verifier/update_verifier.h" 24#include "update_verifier/update_verifier.h"
22 25
23int main(int argc, char** argv) { 26int main(int argc, char** argv) {
27 std::string s = android::base::GetProperty("ro.boot.slot_suffix", "");
28
29 if (s.empty()) {
30 return 0; // non-A/B update device, so we quit
31 }
32
24 // Set up update_verifier logging to be written to kmsg; because we may not have Logd during 33 // Set up update_verifier logging to be written to kmsg; because we may not have Logd during
25 // boot time. 34 // boot time.
26 android::base::InitLogging(argv, &android::base::KernelLogger); 35 android::base::InitLogging(argv, &android::base::KernelLogger);