From 4fd4f89591fe826cf26167bccaeb2802f14fbdc8 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 6 Aug 2018 16:16:14 -0700 Subject: Build and use minadbd as a shared library. The former `minadbd` module is now built as a shared library (`libminadbd_services.so`) that serves sideloading under recovery, with a dynamic dependency on `libadbd.so`. This allows sharing and reusing libadbd code on device (both of `adbd` and `recovery` now uses `libadbd.so`). As a result, it reduces the size of `recovery` binary from 1407360-byte to (1272880 + 33032)-byte (aosp_marlin-userdebug). Bug: 78793464 Test: `m -j bootimage` with aosp_marlin-userdebug Test: Run minadbd_test on marlin. Test: Boot into recovery and verify that sideloading still works. Change-Id: I6c2bc3d351d5af71220a9b9f956c8c039e52c781 --- Android.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 9542080ca..9d6a00fca 100644 --- a/Android.mk +++ b/Android.mk @@ -114,7 +114,6 @@ include $(BUILD_STATIC_LIBRARY) librecovery_static_libraries := \ libbootloader_message \ libfusesideload \ - libminadbd \ libminui \ libverifier \ libotautil \ @@ -157,6 +156,9 @@ LOCAL_CFLAGS := $(recovery_common_cflags) LOCAL_MODULE := librecovery +LOCAL_SHARED_LIBRARIES := \ + libminadbd_services \ + LOCAL_STATIC_LIBRARIES := \ $(librecovery_static_libraries) @@ -186,6 +188,7 @@ LOCAL_STATIC_LIBRARIES := \ $(librecovery_static_libraries) LOCAL_SHARED_LIBRARIES := \ + libminadbd_services \ librecovery_ui \ LOCAL_HAL_STATIC_LIBRARIES := libhealthd @@ -223,7 +226,9 @@ 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 \ -- cgit v1.2.3