xref: /aosp_15_r20/hardware/interfaces/biometrics/fingerprint/aidl/default/Android.bp (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
1package {
2    default_team: "trendy_team_biometrics_framework",
3    // See: http://go/android-license-faq
4    // A large-scale-change added 'default_applicable_licenses' to import
5    // all of the 'license_kinds' from "hardware_interfaces_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    default_applicable_licenses: ["hardware_interfaces_license"],
9}
10
11cc_library_static {
12    name: "android.hardware.biometrics.fingerprint-service.lib",
13    vendor_available: true,
14    local_include_dirs: ["include"],
15    srcs: [
16        "FakeLockoutTracker.cpp",
17        "FakeFingerprintEngine.cpp",
18        "FakeFingerprintEngineRear.cpp",
19        "FakeFingerprintEngineUdfps.cpp",
20        "FakeFingerprintEngineSide.cpp",
21        "Fingerprint.cpp",
22        "Session.cpp",
23        "FingerprintConfig.cpp",
24        "VirtualHal.cpp",
25        "main.cpp",
26    ],
27    stl: "c++_static",
28    shared_libs: [
29        "libbinder_ndk",
30        "liblog",
31    ],
32    whole_static_libs: [
33        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
34        "libbase",
35        "android.hardware.biometrics.fingerprint.virtualhal-ndk",
36        "android.hardware.biometrics.fingerprint-V4-ndk",
37        "android.hardware.biometrics.common-V4-ndk",
38        "android.hardware.biometrics.common.thread",
39        "android.hardware.biometrics.common.util",
40        "android.hardware.biometrics.common.config",
41        "android.hardware.keymaster-V4-ndk",
42    ],
43    product_variables: {
44        debuggable: {
45            cflags: ["-DFPS_DEBUGGABLE"],
46        },
47    },
48    apex_available: [
49        "com.android.hardware.biometrics.fingerprint.virtual",
50        "//apex_available:platform",
51    ],
52}
53
54cc_binary {
55    name: "android.hardware.biometrics.fingerprint-service.example",
56    system_ext_specific: true,
57    relative_install_path: "hw",
58    local_include_dirs: ["include"],
59    srcs: [
60    ],
61    stl: "c++_static",
62    shared_libs: [
63        "libbinder_ndk",
64        "liblog",
65    ],
66    whole_static_libs: [
67        "android.hardware.biometrics.fingerprint-service.lib",
68    ],
69    installable: false, // install APEX instead
70    product_variables: {
71        debuggable: {
72            cflags: ["-DFPS_DEBUGGABLE"],
73        },
74    },
75    apex_available: [
76        "com.android.hardware.biometrics.fingerprint.virtual",
77    ],
78}
79
80cc_binary {
81    name: "android.hardware.biometrics.fingerprint-service.default",
82    //system_ext_specific: true,
83    vendor: true,
84    relative_install_path: "hw",
85    init_rc: ["fingerprint-default.rc"],
86    vintf_fragments: ["fingerprint-default.xml"],
87    local_include_dirs: ["include"],
88    srcs: [
89    ],
90    stl: "c++_static",
91    shared_libs: [
92        "libbinder_ndk",
93        "liblog",
94    ],
95    whole_static_libs: [
96        "android.hardware.biometrics.fingerprint-service.lib",
97    ],
98    product_variables: {
99        debuggable: {
100            cflags: ["-DFPS_DEBUGGABLE"],
101        },
102    },
103    apex_available: [
104        "//apex_available:platform",
105    ],
106}
107
108cc_test {
109    name: "android.hardware.biometrics.fingerprint.FakeFingerprintEngineTest",
110    local_include_dirs: ["include"],
111    srcs: [
112        "tests/FakeFingerprintEngineTest.cpp",
113        "FakeFingerprintEngine.cpp",
114        "FakeLockoutTracker.cpp",
115        "FingerprintConfig.cpp",
116    ],
117    shared_libs: [
118        "libbase",
119        "libbinder_ndk",
120    ],
121    static_libs: [
122        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
123        "android.hardware.biometrics.fingerprint-V4-ndk",
124        "android.hardware.biometrics.common-V4-ndk",
125        "android.hardware.keymaster-V4-ndk",
126        "android.hardware.biometrics.common.util",
127        "android.hardware.biometrics.common.config",
128        "android.hardware.biometrics.common.thread",
129    ],
130    test_suites: ["general-tests"],
131    require_root: true,
132}
133
134cc_test {
135    name: "android.hardware.biometrics.fingerprint.FakeFingerprintEngineUdfpsTest",
136    local_include_dirs: ["include"],
137    srcs: [
138        "tests/FakeFingerprintEngineUdfpsTest.cpp",
139        "FakeFingerprintEngineUdfps.cpp",
140        "FakeFingerprintEngine.cpp",
141        "FakeLockoutTracker.cpp",
142        "FingerprintConfig.cpp",
143    ],
144    shared_libs: [
145        "libbase",
146        "libbinder_ndk",
147    ],
148    static_libs: [
149        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
150        "android.hardware.biometrics.fingerprint-V4-ndk",
151        "android.hardware.biometrics.common-V4-ndk",
152        "android.hardware.keymaster-V4-ndk",
153        "android.hardware.biometrics.common.util",
154        "android.hardware.biometrics.common.config",
155        "android.hardware.biometrics.common.thread",
156    ],
157    test_suites: ["general-tests"],
158    require_root: true,
159}
160
161cc_test {
162    name: "android.hardware.biometrics.fingerprint.FakeLockoutTrackerTest",
163    local_include_dirs: ["include"],
164    srcs: [
165        "tests/FakeLockoutTrackerTest.cpp",
166        "FakeLockoutTracker.cpp",
167        "FingerprintConfig.cpp",
168    ],
169    shared_libs: [
170        "libbase",
171        "libbinder_ndk",
172    ],
173    static_libs: [
174        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
175        "android.hardware.biometrics.fingerprint-V4-ndk",
176        "android.hardware.biometrics.common-V4-ndk",
177        "android.hardware.keymaster-V4-ndk",
178        "android.hardware.biometrics.common.util",
179        "android.hardware.biometrics.common.thread",
180        "android.hardware.biometrics.common.config",
181    ],
182    test_suites: ["general-tests"],
183    require_root: true,
184}
185
186cc_test {
187    name: "android.hardware.biometrics.fingerprint.SessionTest",
188    local_include_dirs: ["include"],
189    srcs: [
190        "tests/SessionTest.cpp",
191        "Session.cpp",
192        "FakeFingerprintEngine.cpp",
193        "FakeLockoutTracker.cpp",
194        "FingerprintConfig.cpp",
195    ],
196    shared_libs: [
197        "libbase",
198        "libbinder_ndk",
199    ],
200    static_libs: [
201        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
202        "android.hardware.biometrics.fingerprint-V4-ndk",
203        "android.hardware.biometrics.common-V4-ndk",
204        "android.hardware.keymaster-V4-ndk",
205        "android.hardware.biometrics.common.util",
206        "android.hardware.biometrics.common.thread",
207        "android.hardware.biometrics.common.config",
208    ],
209    test_suites: ["general-tests"],
210    require_root: true,
211}
212
213cc_test {
214    name: "android.hardware.biometrics.fingerprint.VirtualHalTest",
215    local_include_dirs: ["include"],
216    srcs: [
217        "tests/VirtualHalTest.cpp",
218        "Session.cpp",
219        "VirtualHal.cpp",
220        "FakeFingerprintEngineRear.cpp",
221        "FakeFingerprintEngineUdfps.cpp",
222        "FakeFingerprintEngineSide.cpp",
223        "FakeFingerprintEngine.cpp",
224        "FakeLockoutTracker.cpp",
225        "Fingerprint.cpp",
226        "FingerprintConfig.cpp",
227    ],
228    shared_libs: [
229        "libbase",
230        "libbinder_ndk",
231    ],
232    static_libs: [
233        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
234        "android.hardware.biometrics.fingerprint-V4-ndk",
235        "android.hardware.biometrics.fingerprint.virtualhal-ndk",
236        "android.hardware.biometrics.common-V4-ndk",
237        "android.hardware.keymaster-V4-ndk",
238        "android.hardware.biometrics.common.util",
239        "android.hardware.biometrics.common.thread",
240        "android.hardware.biometrics.common.config",
241    ],
242    product_variables: {
243        debuggable: {
244            cflags: ["-DFPS_DEBUGGABLE"],
245        },
246    },
247    test_suites: ["general-tests"],
248    require_root: true,
249}
250
251sysprop_library {
252    name: "android.hardware.biometrics.fingerprint.VirtualProps",
253    srcs: ["fingerprint.sysprop"],
254    property_owner: "Platform",
255    vendor_available: true,
256    apex_available: [
257        "com.android.hardware.biometrics.fingerprint.virtual",
258        "//apex_available:platform",
259    ],
260}
261
262prebuilt_etc {
263    name: "fingerprint-virtual.rc",
264    src: "fingerprint-virtual.rc",
265    installable: false,
266}
267
268apex {
269    name: "com.android.hardware.biometrics.fingerprint.virtual",
270    manifest: "apex_manifest.json",
271    file_contexts: ":com.android.biometrics.virtual.fingerprint-file_contexts",
272    key: "com.android.hardware.key",
273    certificate: ":com.android.hardware.certificate",
274    updatable: false,
275    system_ext_specific: true,
276
277    binaries: [
278        "android.hardware.biometrics.fingerprint-service.example",
279    ],
280    prebuilts: [
281        // init_rc
282        "fingerprint-virtual.rc",
283    ],
284}
285