From c70446ce7b4db79f296833b16ce38eb8a01d83df Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 7 Aug 2018 20:11:44 -0700 Subject: [PATCH] Revert "Build and use minadbd as a shared library." This reverts commit 4fd4f89591fe826cf26167bccaeb2802f14fbdc8. The reverted CL has a side effect that unintentionally installs a copy of libminadbd_services.so to the system image. This breaks the check with `build/soong/build_test.bash --dist` which detects and prevents vendor modules from installing files to the system image. Prior to fully converting `recovery` to be built with Soong, we have to statically link recovery-specific modules into `recovery`. Bug: 110380063 Test: `m -j bootimage` with aosp_marlin-userdebug Test: Run minadbd_test on marlin. Test: Boot into recovery and verify that sideloading still works. Test: `build/soong/build_test.bash --dist` Change-Id: I290d55c82e17aa60a5afdf2ff7f896afc4dae8b3 --- Android.mk | 7 +------ fuse_sideload/Android.bp | 3 +-- minadbd/Android.bp | 16 +++++++--------- tests/Android.mk | 2 +- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/Android.mk b/Android.mk index aa959c90..b25c1f07 100644 --- a/Android.mk +++ b/Android.mk @@ -127,6 +127,7 @@ health_hal_static_libraries := \ librecovery_static_libraries := \ libbootloader_message \ libfusesideload \ + libminadbd \ libminui \ libverifier \ libotautil \ @@ -169,9 +170,6 @@ LOCAL_CFLAGS := $(recovery_common_cflags) LOCAL_MODULE := librecovery -LOCAL_SHARED_LIBRARIES := \ - libminadbd_services \ - LOCAL_STATIC_LIBRARIES := \ $(librecovery_static_libraries) @@ -201,7 +199,6 @@ LOCAL_STATIC_LIBRARIES := \ $(librecovery_static_libraries) LOCAL_SHARED_LIBRARIES := \ - libminadbd_services \ librecovery_ui \ LOCAL_HAL_STATIC_LIBRARIES := libhealthd @@ -239,9 +236,7 @@ LOCAL_REQUIRED_MODULES += \ # module is built with Soong (with `recovery: true` flag). LOCAL_REQUIRED_MODULES += \ libbase.recovery \ - libcrypto.recovery \ liblog.recovery \ - libminadbd_services.recovery \ libpng.recovery \ libz.recovery \ diff --git a/fuse_sideload/Android.bp b/fuse_sideload/Android.bp index 29404cea..76bc16df 100644 --- a/fuse_sideload/Android.bp +++ b/fuse_sideload/Android.bp @@ -14,7 +14,6 @@ cc_library_static { name: "libfusesideload", - recovery_available: true, cflags: [ "-D_XOPEN_SOURCE", @@ -31,7 +30,7 @@ cc_library_static { "include", ], - shared_libs: [ + static_libs: [ "libbase", "libcrypto", ], diff --git a/minadbd/Android.bp b/minadbd/Android.bp index 8ccce4f4..432b2f0f 100644 --- a/minadbd/Android.bp +++ b/minadbd/Android.bp @@ -26,9 +26,8 @@ cc_defaults { ], } -cc_library { - name: "libminadbd_services", - recovery_available: true, +cc_library_static { + name: "libminadbd", defaults: [ "minadbd_defaults", @@ -40,14 +39,14 @@ cc_library { "minadbd_services.cpp", ], - shared_libs: [ - "libadbd", + static_libs: [ + "libfusesideload", "libbase", "libcrypto", ], - static_libs: [ - "libfusesideload", + whole_static_libs: [ + "libadbd", ], } @@ -63,9 +62,8 @@ cc_test { ], static_libs: [ - "libminadbd_services", - "libadbd", "libBionicGtestMain", + "libminadbd", ], shared_libs: [ diff --git a/tests/Android.mk b/tests/Android.mk index 5ef17776..3d3e63e7 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -170,7 +170,7 @@ librecovery_static_libraries := \ librecovery \ libbootloader_message \ libfusesideload \ - libminadbd_services \ + libminadbd \ librecovery_ui_default \ librecovery_ui \ libminui \