verity: Implement verity tool
This allows for toggling block device verification at runtime.
Both A/B and non-A/B devices as well as VB1.0 and VB2.0 (AVB)
are supported.
Change-Id: If6bec67a000074804f71fa098ad46ba395cac635
diff --git a/verity_tool/Android.bp b/verity_tool/Android.bp
new file mode 100644
index 0000000..0a2ecd8
--- /dev/null
+++ b/verity_tool/Android.bp
@@ -0,0 +1,28 @@
+// Copyright 2018 The LineageOS Project
+
+cc_library {
+ name: "libveritytool",
+ srcs: ["verity_tool.cpp"],
+ local_include_dirs: ["include"],
+ export_include_dirs: ["include"],
+ cflags: ["-Werror"],
+ shared_libs: [
+ "libbase",
+ "libcrypto",
+ "libcrypto_utils",
+ "libfec",
+ ],
+ static_libs: [
+ "libfs_mgr",
+ ],
+ whole_static_libs: [
+ "libavb_user",
+ ],
+}
+
+cc_binary {
+ name: "veritytool",
+ srcs: ["main.cpp"],
+ shared_libs: ["libveritytool"],
+ cflags: ["-Werror"],
+}