From 26fd78c024a4f6eadf012ea83ed5d2cc0f2dcfdf Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Wed, 13 Dec 2017 17:27:12 +0800 Subject: Let update_verifier work on non-AB update devices Make update_verifier check if it runs on A/B update devices at the beginning, and quit immediately if it doesn't, instead of re-boot. Bug: 70541023 Test: On aosp/master: $ lunch aosp_x86_64-userdebug; m -j # boot to home screen # On goog/master: $ lunch aosp_walleye-userdebug; m -j # boot to home screen Change-Id: Ib71a3a3b272cfa5dd0b479eaa067eedaec8fde7d --- update_verifier/update_verifier_main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/update_verifier/update_verifier_main.cpp b/update_verifier/update_verifier_main.cpp index 9dd5a0cc4..a86203bfb 100644 --- a/update_verifier/update_verifier_main.cpp +++ b/update_verifier/update_verifier_main.cpp @@ -16,11 +16,20 @@ // See the comments in update_verifier.cpp. +#include + #include +#include #include "update_verifier/update_verifier.h" int main(int argc, char** argv) { + std::string s = android::base::GetProperty("ro.boot.slot_suffix", ""); + + if (s.empty()) { + return 0; // non-A/B update device, so we quit + } + // Set up update_verifier logging to be written to kmsg; because we may not have Logd during // boot time. android::base::InitLogging(argv, &android::base::KernelLogger); -- cgit v1.2.3