summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.bp3
-rw-r--r--fsck_unshare_blocks.cpp1
-rw-r--r--install/Android.bp1
-rw-r--r--otautil/Android.bp4
-rw-r--r--update_verifier/update_verifier.cpp9
5 files changed, 13 insertions, 5 deletions
diff --git a/Android.bp b/Android.bp
index a44a2c625..fc8b139a2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -75,7 +75,6 @@ cc_defaults {
// external dependencies
"libhealthhalutils",
- "libfstab",
],
}
@@ -153,7 +152,6 @@ cc_binary {
static_libs: [
"libotautil",
- "libfstab",
],
init_rc: [
@@ -181,7 +179,6 @@ cc_binary {
static_libs: [
"libotautil",
- "libfstab",
],
init_rc: [
diff --git a/fsck_unshare_blocks.cpp b/fsck_unshare_blocks.cpp
index e74f8ba6f..0f8ffface 100644
--- a/fsck_unshare_blocks.cpp
+++ b/fsck_unshare_blocks.cpp
@@ -34,7 +34,6 @@
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android-base/unique_fd.h>
-#include <fstab/fstab.h>
#include "otautil/roots.h"
diff --git a/install/Android.bp b/install/Android.bp
index aa47990ae..095a6d027 100644
--- a/install/Android.bp
+++ b/install/Android.bp
@@ -43,7 +43,6 @@ cc_defaults {
// external dependencies
"libvintf_recovery",
"libvintf",
- "libfstab",
],
}
diff --git a/otautil/Android.bp b/otautil/Android.bp
index b4936c08b..c9ecba788 100644
--- a/otautil/Android.bp
+++ b/otautil/Android.bp
@@ -61,6 +61,10 @@ cc_library_static {
"libfs_mgr",
"libselinux",
],
+
+ export_static_lib_headers: [
+ "libfstab",
+ ],
},
},
}
diff --git a/update_verifier/update_verifier.cpp b/update_verifier/update_verifier.cpp
index 0cf536ce6..d04c455d8 100644
--- a/update_verifier/update_verifier.cpp
+++ b/update_verifier/update_verifier.cpp
@@ -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));