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
This commit is contained in:
parent
9203e77e7d
commit
26fd78c024
1 changed files with 9 additions and 0 deletions
|
@ -16,11 +16,20 @@
|
||||||
|
|
||||||
// See the comments in update_verifier.cpp.
|
// See the comments in update_verifier.cpp.
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include <android-base/logging.h>
|
#include <android-base/logging.h>
|
||||||
|
#include <android-base/properties.h>
|
||||||
|
|
||||||
#include "update_verifier/update_verifier.h"
|
#include "update_verifier/update_verifier.h"
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
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
|
// Set up update_verifier logging to be written to kmsg; because we may not have Logd during
|
||||||
// boot time.
|
// boot time.
|
||||||
android::base::InitLogging(argv, &android::base::KernelLogger);
|
android::base::InitLogging(argv, &android::base::KernelLogger);
|
||||||
|
|
Loading…
Reference in a new issue