diff options
author | Isaac Chen | 2017-12-13 03:27:12 -0600 |
---|---|---|
committer | Isaac Chen | 2017-12-13 20:20:07 -0600 |
commit | 26fd78c024a4f6eadf012ea83ed5d2cc0f2dcfdf (patch) | |
tree | f323f68f37976352b1d3f6f6f6def3384c2fddaa /update_verifier | |
parent | 9203e77e7d449e55e8eb4a112f6896beb408f5ac (diff) | |
download | platform-bootable-recovery-26fd78c024a4f6eadf012ea83ed5d2cc0f2dcfdf.tar.gz platform-bootable-recovery-26fd78c024a4f6eadf012ea83ed5d2cc0f2dcfdf.tar.xz platform-bootable-recovery-26fd78c024a4f6eadf012ea83ed5d2cc0f2dcfdf.zip |
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
Diffstat (limited to 'update_verifier')
-rw-r--r-- | update_verifier/update_verifier_main.cpp | 9 |
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 | ||
23 | int main(int argc, char** argv) { | 26 | int 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); |