Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c524fc8f authored by SzuWei Lin's avatar SzuWei Lin
Browse files

Disable checking AVB in runtime vintf

GSI disables AVB by overriding vbmeta partition.
When a device can run runtime vintf checking, it should already
pass AVB, so we don't need to check AVB in runtime vintf.

Bug: 68016134
Test: Boot with GSI and there is no Android System dialog
Change-Id: I598acffc8423f36c17e459398640bf4b2ef3bd04
parent 0efcd28a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -102,8 +102,11 @@ static jint android_os_VintfObject_verify(JNIEnv* env, jclass, jobjectArray pack
        cPackageInfo[i] = cString;
        env->ReleaseStringUTFChars(element, cString);
    }
    // If we can run this code, the device should already pass AVB.
    // So, we don't need to check AVB here.
    std::string error;
    int32_t status = VintfObject::CheckCompatibility(cPackageInfo, &error);
    int32_t status = VintfObject::CheckCompatibility(
        cPackageInfo, &error, ::android::vintf::DISABLE_AVB_CHECK);
    if (status)
        LOG(WARNING) << "VintfObject.verify() returns " << status << ": " << error;
    return status;