From e458294ba12f45d41e00fb2a865e4c013cdc9b29 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Thu, 26 Oct 2023 11:07:08 +0900 Subject: [PATCH] Use static linking for virtual fingerprint hal To make the binary smaller in APEX, use static linking. For aosp_cf_x86_64_phone target, the APEX is reduced from 1576960 to 643072 (by 933888). Bug: 306314086 Test: m Change-Id: I1d745f64fb98a97e7adb417870034044a03ce88c --- biometrics/fingerprint/aidl/default/Android.bp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/biometrics/fingerprint/aidl/default/Android.bp b/biometrics/fingerprint/aidl/default/Android.bp index 8a408bcd3a..a173a00d12 100644 --- a/biometrics/fingerprint/aidl/default/Android.bp +++ b/biometrics/fingerprint/aidl/default/Android.bp @@ -22,15 +22,20 @@ cc_binary { "Session.cpp", "main.cpp", ], + stl: "c++_static", shared_libs: [ - "libbase", "libbinder_ndk", + "liblog", + ], + static_libs: [ + "libandroid.hardware.biometrics.fingerprint.VirtualProps", + "libbase", "android.hardware.biometrics.fingerprint-V3-ndk", "android.hardware.biometrics.common-V3-ndk", "android.hardware.biometrics.common.thread", "android.hardware.biometrics.common.util", + "android.hardware.keymaster-V4-ndk", ], - static_libs: ["libandroid.hardware.biometrics.fingerprint.VirtualProps"], installable: false, // install APEX instead }