blob: 91407f988d6b94f836f0e8900aed7fcf2f418c49 [file] [log] [blame]
Tao Bao8c7761e2017-11-15 11:45:23 -08001// Copyright (C) 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badour29be3f62021-02-12 18:00:57 -080015package {
Aditya Choudharyeb84a172024-02-02 13:56:16 +000016 default_team: "trendy_team_native_tools_libraries",
Bob Badour29be3f62021-02-12 18:00:57 -080017 // See: http://go/android-license-faq
18 // A large-scale-change added 'default_applicable_licenses' to import
19 // all of the 'license_kinds' from "bootable_recovery_license"
20 // to get the below license kinds:
21 // SPDX-license-identifier-Apache-2.0
22 default_applicable_licenses: ["bootable_recovery_license"],
23}
24
Tao Bao8c7761e2017-11-15 11:45:23 -080025cc_defaults {
26 name: "minadbd_defaults",
27
28 cflags: [
29 "-DADB_HOST=0",
30 "-Wall",
31 "-Werror",
32 ],
33
Tao Bao5de19e22019-01-02 09:35:59 -080034 cpp_std: "experimental",
35
Tao Bao8c7761e2017-11-15 11:45:23 -080036 include_dirs: [
Baligh Uddin0e313c12020-10-18 15:07:17 +000037 "packages/modules/adb",
Tao Bao8c7761e2017-11-15 11:45:23 -080038 ],
Tao Bao3305d482019-09-26 00:02:29 -070039
40 header_libs: [
41 "libminadbd_headers",
42 ],
Tao Bao8c7761e2017-11-15 11:45:23 -080043}
44
Tao Bao7d2a63a2018-08-13 11:15:29 -070045// `libminadbd_services` is analogous to the `libadbd_services` for regular `adbd`, but providing
46// the sideload service only.
Josh Gao5ee3eba2020-03-27 20:37:07 -070047cc_library_static {
Tao Bao7d2a63a2018-08-13 11:15:29 -070048 name: "libminadbd_services",
Tao Bao5fc72a12018-08-07 14:38:51 -070049 recovery_available: true,
Tao Bao8c7761e2017-11-15 11:45:23 -080050
51 defaults: [
52 "minadbd_defaults",
Tao Baob548bea2019-09-30 16:16:07 -070053 "librecovery_utils_defaults",
Tao Bao8c7761e2017-11-15 11:45:23 -080054 ],
55
56 srcs: [
57 "fuse_adb_provider.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -080058 "minadbd_services.cpp",
59 ],
60
xunchang311e6ca2019-03-22 08:54:35 -070061 static_libs: [
Tao Baob548bea2019-09-30 16:16:07 -070062 "librecovery_utils",
xunchang311e6ca2019-03-22 08:54:35 -070063 "libotautil",
64 ],
65
Tao Bao7d2a63a2018-08-13 11:15:29 -070066 shared_libs: [
67 "libadbd",
Tao Bao8c7761e2017-11-15 11:45:23 -080068 "libbase",
69 "libcrypto",
Tao Bao7d2a63a2018-08-13 11:15:29 -070070 "libfusesideload",
Tao Bao8c7761e2017-11-15 11:45:23 -080071 ],
72}
73
xunchang34690ce2019-04-05 16:16:07 -070074cc_library_headers {
75 name: "libminadbd_headers",
76 recovery_available: true,
xunchang34690ce2019-04-05 16:16:07 -070077 export_include_dirs: [
Tao Bao3305d482019-09-26 00:02:29 -070078 "include",
79 ],
80 // adb_install.cpp
81 visibility: [
82 "//bootable/recovery/install",
xunchang34690ce2019-04-05 16:16:07 -070083 ],
84}
85
86cc_binary {
87 name: "minadbd",
88 recovery: true,
89
90 defaults: [
91 "minadbd_defaults",
Josh Gao5ee3eba2020-03-27 20:37:07 -070092 "libadbd_binary_dependencies",
93 "librecovery_utils_defaults",
xunchang34690ce2019-04-05 16:16:07 -070094 ],
95
96 srcs: [
97 "minadbd.cpp",
98 ],
99
100 shared_libs: [
David Anderson8ee048d2023-11-17 20:30:02 -0800101 "android.hardware.health-V3-ndk", // from librecovery_utils
xunchang34690ce2019-04-05 16:16:07 -0700102 "libbase",
103 "libcrypto",
Josh Gao5ee3eba2020-03-27 20:37:07 -0700104 ],
105
106 static_libs: [
xunchang34690ce2019-04-05 16:16:07 -0700107 "libminadbd_services",
Josh Gao5ee3eba2020-03-27 20:37:07 -0700108 "libfusesideload",
109 "librecovery_utils",
xunchang34690ce2019-04-05 16:16:07 -0700110 ],
Josh Gaoa91e4562019-10-22 16:10:48 -0700111
112 required: [
Josh Gaod4a964f2020-06-01 18:58:57 -0700113 "adbd_system_api_recovery",
Aditya Choudharyeb84a172024-02-02 13:56:16 +0000114 ],
xunchang34690ce2019-04-05 16:16:07 -0700115}
116
Tao Bao8c7761e2017-11-15 11:45:23 -0800117cc_test {
118 name: "minadbd_test",
Christopher Ferris272467d2018-08-22 19:38:49 -0700119 isolated: true,
Tao Bao8c7761e2017-11-15 11:45:23 -0800120
121 defaults: [
122 "minadbd_defaults",
Tao Baob548bea2019-09-30 16:16:07 -0700123 "librecovery_utils_defaults",
Josh Gao5ee3eba2020-03-27 20:37:07 -0700124 "libadbd_binary_dependencies",
Tao Bao8c7761e2017-11-15 11:45:23 -0800125 ],
126
127 srcs: [
128 "fuse_adb_provider_test.cpp",
xunchang9c04eb42019-04-17 14:43:58 -0700129 "minadbd_services_test.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -0800130 ],
131
132 static_libs: [
David Anderson8ee048d2023-11-17 20:30:02 -0800133 "android.hardware.health-V3-ndk", // from librecovery_utils
Tao Bao7d2a63a2018-08-13 11:15:29 -0700134 "libminadbd_services",
xunchangea2912f2019-03-17 16:45:12 -0700135 "libfusesideload",
Tao Baob548bea2019-09-30 16:16:07 -0700136 "librecovery_utils",
xunchang311e6ca2019-03-22 08:54:35 -0700137 "libotautil",
Tao Bao8c7761e2017-11-15 11:45:23 -0800138 ],
139
140 shared_libs: [
141 "libbase",
Pete Bentley189d4242019-09-12 19:53:46 +0100142 "libcrypto",
Tao Bao8c7761e2017-11-15 11:45:23 -0800143 "libcutils",
144 "liblog",
145 ],
146
147 test_suites: [
148 "device-tests",
149 ],
Kelvin Zhangd7ae5a02020-08-24 14:33:03 -0400150 require_root: true,
Tao Bao8c7761e2017-11-15 11:45:23 -0800151}