Add an faster OTA extractor

delta_generator is already capable of extracting images from an OTA.
However, it was created for testing purposes. Code in delta_generator
tries to mimic device environment as much as possible, and therefore
does not have optimal performance. Now go/bts-image-sharing project
needs an ota extractor in the cloud, re-write a faster alternative.

Test: ota_extractor ota.zip /tmp/extracted, 364s -> 272s, 25% faster.

Bug: 203712723
Bug: 221875271
Change-Id: Ie30375f2cd1df1890fc58a71f96b3aa430f0fd75
diff --git a/Android.bp b/Android.bp
index cc3cd09..b123c7d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1082,3 +1082,25 @@
         export_proto_headers: true,
     },
 }
+
+cc_binary_host {
+    name: "ota_extractor",
+    defaults: [
+        "ue_defaults",
+        "libpayload_consumer_exports",
+    ],
+    srcs: [
+        "aosp/ota_extractor.cc",
+    ],
+    static_libs: [
+        "liblog",
+        "libbrotli",
+        "libbase",
+        "libpayload_consumer",
+        "libpayload_extent_ranges",
+        "libpayload_extent_utils",
+        "libz",
+        "libgflags",
+        "update_metadata-protos",
+    ],
+}