Implement FilePackage class
This is another implementation of the Package class. And we will later
need it when reading the package from FUSE.
Bug: 127071893
Test: unit tests pass, sideload a file package on sailfish
Change-Id: I3de5d5ef60b29c8b73517d6de3498459d7d95975
diff --git a/Android.bp b/Android.bp
index 10f6c79..4c7ce52 100644
--- a/Android.bp
+++ b/Android.bp
@@ -151,6 +151,7 @@
static_libs: [
"librecovery_fastboot",
"libminui",
+ "libpackage",
"libverifier",
"libotautil",
@@ -175,7 +176,6 @@
"fsck_unshare_blocks.cpp",
"fuse_sdcard_provider.cpp",
"install.cpp",
- "package.cpp",
"recovery.cpp",
"roots.cpp",
],
@@ -210,6 +210,29 @@
],
}
+cc_library_static {
+ name: "libpackage",
+ recovery_available: true,
+
+ defaults: [
+ "recovery_defaults",
+ ],
+
+ srcs: [
+ "package.cpp",
+ ],
+
+ shared_libs: [
+ "libbase",
+ "libcrypto",
+ "libziparchive",
+ ],
+
+ static_libs: [
+ "libotautil",
+ ],
+}
+
cc_binary {
name: "recovery",
recovery: true,