blob: 069b4f854f7a7eea3ec324a7fbe8a8bd7c33f808 [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
15cc_defaults {
16 name: "minadbd_defaults",
17
18 cflags: [
19 "-DADB_HOST=0",
20 "-Wall",
21 "-Werror",
22 ],
23
Tao Bao5de19e22019-01-02 09:35:59 -080024 cpp_std: "experimental",
25
Tao Bao8c7761e2017-11-15 11:45:23 -080026 include_dirs: [
bigbiff673c7ae2020-12-02 19:44:56 -050027 "bootable/recovery/otautil/include",
Tao Bao8c7761e2017-11-15 11:45:23 -080028 "system/core/adb",
29 ],
Tao Bao3305d482019-09-26 00:02:29 -070030
31 header_libs: [
32 "libminadbd_headers",
33 ],
Tao Bao8c7761e2017-11-15 11:45:23 -080034}
35
Tao Bao7d2a63a2018-08-13 11:15:29 -070036// `libminadbd_services` is analogous to the `libadbd_services` for regular `adbd`, but providing
37// the sideload service only.
Josh Gao22beef12020-03-27 20:37:07 -070038cc_library_static {
Tao Bao7d2a63a2018-08-13 11:15:29 -070039 name: "libminadbd_services",
Tao Bao5fc72a12018-08-07 14:38:51 -070040 recovery_available: true,
Tao Bao8c7761e2017-11-15 11:45:23 -080041
42 defaults: [
43 "minadbd_defaults",
Tao Baob548bea2019-09-30 16:16:07 -070044 "librecovery_utils_defaults",
Tao Bao8c7761e2017-11-15 11:45:23 -080045 ],
46
47 srcs: [
48 "fuse_adb_provider.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -080049 "minadbd_services.cpp",
50 ],
51
xunchang311e6ca2019-03-22 08:54:35 -070052 static_libs: [
Tao Baob548bea2019-09-30 16:16:07 -070053 "librecovery_utils",
xunchang311e6ca2019-03-22 08:54:35 -070054 "libotautil",
55 ],
56
Tao Bao7d2a63a2018-08-13 11:15:29 -070057 shared_libs: [
58 "libadbd",
Tao Bao8c7761e2017-11-15 11:45:23 -080059 "libbase",
60 "libcrypto",
Tao Bao7d2a63a2018-08-13 11:15:29 -070061 "libfusesideload",
Tao Bao8c7761e2017-11-15 11:45:23 -080062 ],
63}
64
xunchang95d67322019-04-05 16:16:07 -070065cc_library_headers {
66 name: "libminadbd_headers",
67 recovery_available: true,
xunchang95d67322019-04-05 16:16:07 -070068 export_include_dirs: [
Tao Bao3305d482019-09-26 00:02:29 -070069 "include",
70 ],
71 // adb_install.cpp
72 visibility: [
73 "//bootable/recovery/install",
bigbiff673c7ae2020-12-02 19:44:56 -050074 "//bootable/recovery/twrpinstall",
xunchang95d67322019-04-05 16:16:07 -070075 ],
76}
77
78cc_binary {
79 name: "minadbd",
80 recovery: true,
81
82 defaults: [
83 "minadbd_defaults",
Josh Gao22beef12020-03-27 20:37:07 -070084 "libadbd_binary_dependencies",
85 "librecovery_utils_defaults",
xunchang95d67322019-04-05 16:16:07 -070086 ],
87
88 srcs: [
89 "minadbd.cpp",
90 ],
91
92 shared_libs: [
xunchang95d67322019-04-05 16:16:07 -070093 "libbase",
94 "libcrypto",
xunchang95d67322019-04-05 16:16:07 -070095 ],
Josh Gao22beef12020-03-27 20:37:07 -070096
97 static_libs: [
xunchang34690ce2019-04-05 16:16:07 -070098 "libminadbd_services",
Josh Gao22beef12020-03-27 20:37:07 -070099 "libfusesideload",
100 "librecovery_utils",
xunchang34690ce2019-04-05 16:16:07 -0700101 ],
Josh Gaoa91e4562019-10-22 16:10:48 -0700102
103 required: [
Josh Gao4473e162020-06-01 18:58:57 -0700104 "adbd_system_api_recovery",
Josh Gaoa91e4562019-10-22 16:10:48 -0700105 ]
xunchang95d67322019-04-05 16:16:07 -0700106}
107
Tao Bao8c7761e2017-11-15 11:45:23 -0800108cc_test {
109 name: "minadbd_test",
Christopher Ferris272467d2018-08-22 19:38:49 -0700110 isolated: true,
Tao Bao8c7761e2017-11-15 11:45:23 -0800111
112 defaults: [
113 "minadbd_defaults",
Tao Baob548bea2019-09-30 16:16:07 -0700114 "librecovery_utils_defaults",
Josh Gao22beef12020-03-27 20:37:07 -0700115 "libadbd_binary_dependencies",
Tao Bao8c7761e2017-11-15 11:45:23 -0800116 ],
117
118 srcs: [
119 "fuse_adb_provider_test.cpp",
xunchang23f15fc2019-04-17 14:43:58 -0700120 "minadbd_services_test.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -0800121 ],
122
123 static_libs: [
Tao Bao7d2a63a2018-08-13 11:15:29 -0700124 "libminadbd_services",
xunchangea2912f2019-03-17 16:45:12 -0700125 "libfusesideload",
Tao Baob548bea2019-09-30 16:16:07 -0700126 "librecovery_utils",
xunchang311e6ca2019-03-22 08:54:35 -0700127 "libotautil",
Tao Bao8c7761e2017-11-15 11:45:23 -0800128 ],
129
130 shared_libs: [
131 "libbase",
Pete Bentley189d4242019-09-12 19:53:46 +0100132 "libcrypto",
Tao Bao8c7761e2017-11-15 11:45:23 -0800133 "libcutils",
134 "liblog",
135 ],
136
137 test_suites: [
138 "device-tests",
139 ],
140}