blob: 9d3f7334ac6f934a9490927e65ef7f56095931fa [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 {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "bootable_recovery_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["bootable_recovery_license"],
22}
23
Tao Bao8c7761e2017-11-15 11:45:23 -080024cc_defaults {
25 name: "minadbd_defaults",
26
27 cflags: [
28 "-DADB_HOST=0",
29 "-Wall",
30 "-Werror",
31 ],
32
Tao Bao5de19e22019-01-02 09:35:59 -080033 cpp_std: "experimental",
34
Tao Bao8c7761e2017-11-15 11:45:23 -080035 include_dirs: [
Baligh Uddin0e313c12020-10-18 15:07:17 +000036 "packages/modules/adb",
Tao Bao8c7761e2017-11-15 11:45:23 -080037 ],
Tao Bao3305d482019-09-26 00:02:29 -070038
39 header_libs: [
40 "libminadbd_headers",
41 ],
Tao Bao8c7761e2017-11-15 11:45:23 -080042}
43
Tao Bao7d2a63a2018-08-13 11:15:29 -070044// `libminadbd_services` is analogous to the `libadbd_services` for regular `adbd`, but providing
45// the sideload service only.
Josh Gao5ee3eba2020-03-27 20:37:07 -070046cc_library_static {
Tao Bao7d2a63a2018-08-13 11:15:29 -070047 name: "libminadbd_services",
Tao Bao5fc72a12018-08-07 14:38:51 -070048 recovery_available: true,
Tao Bao8c7761e2017-11-15 11:45:23 -080049
50 defaults: [
51 "minadbd_defaults",
Tao Baob548bea2019-09-30 16:16:07 -070052 "librecovery_utils_defaults",
Tao Bao8c7761e2017-11-15 11:45:23 -080053 ],
54
55 srcs: [
56 "fuse_adb_provider.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -080057 "minadbd_services.cpp",
58 ],
59
xunchang311e6ca2019-03-22 08:54:35 -070060 static_libs: [
Tao Baob548bea2019-09-30 16:16:07 -070061 "librecovery_utils",
xunchang311e6ca2019-03-22 08:54:35 -070062 "libotautil",
63 ],
64
Tao Bao7d2a63a2018-08-13 11:15:29 -070065 shared_libs: [
66 "libadbd",
Tao Bao8c7761e2017-11-15 11:45:23 -080067 "libbase",
68 "libcrypto",
Tao Bao7d2a63a2018-08-13 11:15:29 -070069 "libfusesideload",
Tao Bao8c7761e2017-11-15 11:45:23 -080070 ],
71}
72
xunchang34690ce2019-04-05 16:16:07 -070073cc_library_headers {
74 name: "libminadbd_headers",
75 recovery_available: true,
xunchang34690ce2019-04-05 16:16:07 -070076 export_include_dirs: [
Tao Bao3305d482019-09-26 00:02:29 -070077 "include",
78 ],
79 // adb_install.cpp
80 visibility: [
81 "//bootable/recovery/install",
xunchang34690ce2019-04-05 16:16:07 -070082 ],
83}
84
85cc_binary {
86 name: "minadbd",
87 recovery: true,
88
89 defaults: [
90 "minadbd_defaults",
Josh Gao5ee3eba2020-03-27 20:37:07 -070091 "libadbd_binary_dependencies",
92 "librecovery_utils_defaults",
xunchang34690ce2019-04-05 16:16:07 -070093 ],
94
95 srcs: [
96 "minadbd.cpp",
97 ],
98
99 shared_libs: [
Yifan Hong67a8fd22021-11-30 16:39:00 -0800100 "android.hardware.health-V1-ndk", // from librecovery_utils
xunchang34690ce2019-04-05 16:16:07 -0700101 "libbase",
102 "libcrypto",
Josh Gao5ee3eba2020-03-27 20:37:07 -0700103 ],
104
105 static_libs: [
xunchang34690ce2019-04-05 16:16:07 -0700106 "libminadbd_services",
Josh Gao5ee3eba2020-03-27 20:37:07 -0700107 "libfusesideload",
108 "librecovery_utils",
xunchang34690ce2019-04-05 16:16:07 -0700109 ],
Josh Gaoa91e4562019-10-22 16:10:48 -0700110
111 required: [
Josh Gaod4a964f2020-06-01 18:58:57 -0700112 "adbd_system_api_recovery",
Josh Gaoa91e4562019-10-22 16:10:48 -0700113 ]
xunchang34690ce2019-04-05 16:16:07 -0700114}
115
Tao Bao8c7761e2017-11-15 11:45:23 -0800116cc_test {
117 name: "minadbd_test",
Christopher Ferris272467d2018-08-22 19:38:49 -0700118 isolated: true,
Tao Bao8c7761e2017-11-15 11:45:23 -0800119
120 defaults: [
121 "minadbd_defaults",
Tao Baob548bea2019-09-30 16:16:07 -0700122 "librecovery_utils_defaults",
Josh Gao5ee3eba2020-03-27 20:37:07 -0700123 "libadbd_binary_dependencies",
Tao Bao8c7761e2017-11-15 11:45:23 -0800124 ],
125
126 srcs: [
127 "fuse_adb_provider_test.cpp",
xunchang9c04eb42019-04-17 14:43:58 -0700128 "minadbd_services_test.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -0800129 ],
130
131 static_libs: [
Yifan Hong67a8fd22021-11-30 16:39:00 -0800132 "android.hardware.health-V1-ndk", // from librecovery_utils
Tao Bao7d2a63a2018-08-13 11:15:29 -0700133 "libminadbd_services",
xunchangea2912f2019-03-17 16:45:12 -0700134 "libfusesideload",
Tao Baob548bea2019-09-30 16:16:07 -0700135 "librecovery_utils",
xunchang311e6ca2019-03-22 08:54:35 -0700136 "libotautil",
Tao Bao8c7761e2017-11-15 11:45:23 -0800137 ],
138
139 shared_libs: [
140 "libbase",
Pete Bentley189d4242019-09-12 19:53:46 +0100141 "libcrypto",
Tao Bao8c7761e2017-11-15 11:45:23 -0800142 "libcutils",
143 "liblog",
144 ],
145
146 test_suites: [
147 "device-tests",
148 ],
Kelvin Zhangd7ae5a02020-08-24 14:33:03 -0400149 require_root: true,
Tao Bao8c7761e2017-11-15 11:45:23 -0800150}