summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBowgo Tsai <bowgotsai@google.com>2020-06-01 04:25:02 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-06-01 04:25:02 +0000
commit40eb1a490b1b0dd0bb03a8fa90490c16fca40d01 (patch)
treef699973a4fa8cebc7464d260e2b077252d440888
parent484bbd07550026dd8bd80ffb8de5d4978e4f0d5f (diff)
parent767b4b3c2ab4b33a8d9abb762e2dd5a5f7ac9b3f (diff)
Allow unlocked in VTS am: 43dd6e34bd am: 767b4b3c2a
Change-Id: Ia559b9083b1ac7960b93f710fc5cb2d5390dfac7
-rw-r--r--keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
index 6cbe4dafae..aa2de2a682 100644
--- a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
+++ b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
@@ -438,10 +438,10 @@ bool verify_attestation_record(const string& challenge, const string& app_id,
EXPECT_TRUE(device_locked);
}
- // Check that the expected result from VBMeta matches the build type. Only a user build
- // should have AVB reporting the device is locked.
- EXPECT_NE(property_get("ro.build.type", property_value, ""), 0);
- if (!strcmp(property_value, "user")) {
+ // Check that the device is locked if not debuggable, e.g., user build
+ // images in CTS. For VTS, debuggable images are used to allow adb root
+ // and the device is unlocked.
+ if (!property_get_bool("ro.debuggable", false)) {
EXPECT_TRUE(device_locked);
} else {
EXPECT_FALSE(device_locked);