Add zip2zip tool to copy zip entries from one file to another
This doesn't do any decompression / recompression, but just copies over
the already compressed contents. So it's similar to zip -U, but allows
rewriting of the paths.
The first expected usecase is to replace img_from_target_files during
the build, since it does the equivalent of this:
zip2zip -i <target-files.zip> -o <img.zip> OTA/android-info.txt:android-info.txt IMAGES/*:.
Except it decompresses and recompresses the images, which takes over a
minute instead of a few seconds.
Change-Id: I88d0df188635088783223873f78e193272dbdf1c
diff --git a/Android.bp b/Android.bp
index e1a6621..523bec1 100644
--- a/Android.bp
+++ b/Android.bp
@@ -10,6 +10,8 @@
// 2) Build again
//
+subdirs = ["third_party/zip"]
+
bootstrap_go_binary {
name: "soong_build",
deps: [
@@ -195,6 +197,14 @@
}
blueprint_go_binary {
+ name: "zip2zip",
+ deps: ["android-archive-zip"],
+ srcs: [
+ "cmd/zip2zip/zip2zip.go",
+ ],
+}
+
+blueprint_go_binary {
name: "soong_jar",
srcs: [
"cmd/soong_jar/soong_jar.go",