Skip to content

Commit

Permalink
Merge "Append -verity when looking for verity device-mapper names."
Browse files Browse the repository at this point in the history
am: bc2eab4

Change-Id: I39b5e0f2f0baf8d459a535de470c99f8a5d4adf9
  • Loading branch information
dvandercorp authored and android-build-merger committed Apr 2, 2019
2 parents effd4ca + bc2eab4 commit 9a53189
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions update_verifier/update_verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ std::map<std::string, std::string> UpdateVerifier::FindDmPartitions() {
// AVB is using 'vroot' for the root block device but we're expecting 'system'.
if (dm_block_name == "vroot") {
dm_block_name = "system";
} else if (android::base::EndsWith(dm_block_name, "-verity")) {
auto npos = dm_block_name.rfind("-verity");
dm_block_name = dm_block_name.substr(0, npos);
} else if (!android::base::GetProperty("ro.boot.avb_version", "").empty()) {
// Verified Boot 1.0 doesn't add a -verity suffix. On AVB 2 devices,
// if DAP is enabled, then a -verity suffix must be used to
// differentiate between dm-linear and dm-verity devices. If we get
// here, we're AVB 2 and looking at a non-verity partition.
continue;
}

dm_block_devices.emplace(dm_block_name, DEV_PATH + std::string(namelist[n]->d_name));
Expand Down

0 comments on commit 9a53189

Please sign in to comment.