Build libinstall as a static library.
It was once considered to be shared between recovery and minadbd, so
that the latter can start an install on its own. The plan has been
changed, since package install -- including device wipe operations --
could be device-specific, which should be done by recovery only.
This CL moves libinstall back to a static library, which also saves the
overall size (reducing from 140256 + 660576 to 555880 bytes on
aosp_taimen-userdebug).
Bug: 130166585
Test: Run recovery_component_test.
Test: `adb sideload` on taimen.
Change-Id: Ib1f5f79f235df4682c0bd104425c9c122f6091ba
diff --git a/Android.bp b/Android.bp
index fc8b139..137004c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -69,6 +69,7 @@
],
static_libs: [
+ "libinstall",
"librecovery_fastboot",
"libminui",
"libotautil",
@@ -92,7 +93,6 @@
],
shared_libs: [
- "libinstall",
"librecovery_ui",
],
}
@@ -112,7 +112,6 @@
],
shared_libs: [
- "libinstall",
"libminadbd_services",
"librecovery_ui",
],
diff --git a/CleanSpec.mk b/CleanSpec.mk
index fec823e..a7ab0d9 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -44,9 +44,13 @@
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
-# ************************************************
-# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
-# ************************************************
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/recovery_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libminui_intermediates/import_includes)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/sbin)
+
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libinstall.recovery_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/system/lib64/libinstall.so)
+
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
diff --git a/install/Android.bp b/install/Android.bp
index 095a6d0..85cf9ac 100644
--- a/install/Android.bp
+++ b/install/Android.bp
@@ -46,7 +46,7 @@
],
}
-cc_library {
+cc_library_static {
name: "libinstall",
recovery_available: true,