GuangHui Liu | 3599439 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 1 | // Copyright (C) 2017 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 Badour | 4a6774b | 2021-02-12 19:46:09 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["packages_modules_adb_license"], |
| 17 | } |
| 18 | |
| 19 | // Added automatically by a large-scale-change |
| 20 | // See: http://go/android-license-faq |
| 21 | license { |
| 22 | name: "packages_modules_adb_license", |
| 23 | visibility: [":__subpackages__"], |
| 24 | license_kinds: [ |
| 25 | "SPDX-license-identifier-Apache-2.0", |
| 26 | ], |
| 27 | license_text: [ |
| 28 | "NOTICE", |
| 29 | ], |
| 30 | } |
| 31 | |
Joshua Duong | b5c3bec | 2020-07-17 14:14:00 -0700 | [diff] [blame] | 32 | tidy_errors = [ |
| 33 | "-*", |
| 34 | "bugprone-inaccurate-erase", |
Joshua Duong | f4ba8d7 | 2021-01-13 12:18:15 -0800 | [diff] [blame] | 35 | "bugprone-use-after-move", |
Joshua Duong | b5c3bec | 2020-07-17 14:14:00 -0700 | [diff] [blame] | 36 | ] |
| 37 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 38 | cc_defaults { |
| 39 | name: "adb_defaults", |
| 40 | |
| 41 | cflags: [ |
| 42 | "-Wall", |
| 43 | "-Wextra", |
| 44 | "-Werror", |
Jiyong Park | f2721bc | 2020-09-18 16:35:06 +0900 | [diff] [blame] | 45 | "-Wno-non-virtual-dtor", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 46 | "-Wno-unused-parameter", |
| 47 | "-Wno-missing-field-initializers", |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 48 | "-Wthread-safety", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 49 | "-Wvla", |
Bowgo Tsai | 35b817b | 2019-03-12 04:25:33 +0800 | [diff] [blame] | 50 | "-DADB_HOST=1", // overridden by adbd_defaults |
Josh Gao | 90228a6 | 2019-04-25 14:04:57 -0700 | [diff] [blame] | 51 | "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION=1", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 52 | ], |
Josh Gao | 3edf807 | 2018-11-16 15:40:16 -0800 | [diff] [blame] | 53 | cpp_std: "experimental", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 54 | |
Josh Gao | 66766f8 | 2018-02-27 15:49:23 -0800 | [diff] [blame] | 55 | use_version_lib: true, |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 56 | compile_multilib: "first", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 57 | |
| 58 | target: { |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 59 | darwin: { |
| 60 | host_ldlibs: [ |
| 61 | "-lpthread", |
| 62 | "-framework CoreFoundation", |
| 63 | "-framework IOKit", |
Elliott Hughes | 038a7ac | 2022-08-12 15:26:44 +0000 | [diff] [blame] | 64 | "-framework Security", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 65 | "-lobjc", |
| 66 | ], |
Joshua Duong | 28fd4e5 | 2021-03-19 12:12:35 -0700 | [diff] [blame] | 67 | cflags: [ |
| 68 | // Required, to use the new IPv6 Sockets options introduced by RFC 3542. |
| 69 | "-D__APPLE_USE_RFC_3542", |
| 70 | ], |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 71 | }, |
| 72 | |
| 73 | windows: { |
| 74 | cflags: [ |
| 75 | // Define windows.h and tchar.h Unicode preprocessor symbols so that |
| 76 | // CreateFile(), _tfopen(), etc. map to versions that take wchar_t*, breaking the |
| 77 | // build if you accidentally pass char*. Fix by calling like: |
| 78 | // std::wstring path_wide; |
| 79 | // if (!android::base::UTF8ToWide(path_utf8, &path_wide)) { /* error handling */ } |
| 80 | // CreateFileW(path_wide.c_str()); |
| 81 | "-DUNICODE=1", |
| 82 | "-D_UNICODE=1", |
| 83 | |
Elliott Hughes | c229a72 | 2018-12-03 09:02:18 -0800 | [diff] [blame] | 84 | // Unlike on Linux, -std=gnu++ doesn't set _GNU_SOURCE on Windows. |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 85 | "-D_GNU_SOURCE", |
Josh Gao | 96049b9 | 2018-03-23 13:03:28 -0700 | [diff] [blame] | 86 | |
| 87 | // MinGW hides some things behind _POSIX_SOURCE. |
| 88 | "-D_POSIX_SOURCE", |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 89 | |
Josh Gao | c3b6403 | 2019-04-17 16:57:43 -0700 | [diff] [blame] | 90 | // libusb uses __stdcall on a variadic function, which gets ignored. |
| 91 | "-Wno-ignored-attributes", |
| 92 | |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 93 | // Not supported yet. |
| 94 | "-Wno-thread-safety", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 95 | ], |
Josh Gao | ea7b95a | 2018-03-23 15:37:20 -0700 | [diff] [blame] | 96 | |
| 97 | host_ldlibs: [ |
| 98 | "-lws2_32", |
| 99 | "-lgdi32", |
| 100 | "-luserenv", |
Joshua Duong | f4ba8d7 | 2021-01-13 12:18:15 -0800 | [diff] [blame] | 101 | "-liphlpapi", |
Josh Gao | ea7b95a | 2018-03-23 15:37:20 -0700 | [diff] [blame] | 102 | ], |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 103 | }, |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 104 | }, |
Joshua Duong | b5c3bec | 2020-07-17 14:14:00 -0700 | [diff] [blame] | 105 | |
| 106 | tidy: true, |
| 107 | tidy_checks: tidy_errors, |
| 108 | tidy_checks_as_errors: tidy_errors, |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 109 | } |
Pirama Arumuga Nainar | 7aa2023 | 2018-06-01 11:31:38 -0700 | [diff] [blame] | 110 | |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 111 | cc_defaults { |
| 112 | name: "adbd_defaults", |
| 113 | defaults: ["adb_defaults"], |
| 114 | |
| 115 | cflags: ["-UADB_HOST", "-DADB_HOST=0"], |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 116 | } |
| 117 | |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 118 | cc_defaults { |
| 119 | name: "host_adbd_supported", |
| 120 | |
| 121 | host_supported: true, |
| 122 | target: { |
| 123 | linux: { |
| 124 | enabled: true, |
| 125 | host_ldlibs: [ |
| 126 | "-lresolv", // b64_pton |
| 127 | "-lutil", // forkpty |
| 128 | ], |
| 129 | }, |
| 130 | darwin: { |
| 131 | enabled: false, |
| 132 | }, |
| 133 | windows: { |
| 134 | enabled: false, |
| 135 | }, |
| 136 | }, |
| 137 | } |
| 138 | |
Liz Kammer | 6836b05 | 2021-01-22 13:39:03 -0500 | [diff] [blame] | 139 | soong_config_module_type_import { |
| 140 | from: "system/apex/Android.bp", |
| 141 | module_types: ["library_linking_strategy_cc_defaults"], |
| 142 | } |
| 143 | |
| 144 | library_linking_strategy_cc_defaults { |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 145 | name: "libadbd_binary_dependencies", |
| 146 | static_libs: [ |
| 147 | "libadb_crypto", |
| 148 | "libadb_pairing_connection", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 149 | "libadb_protos", |
Joshua Duong | 93b407c | 2020-07-30 16:34:29 -0700 | [diff] [blame] | 150 | "libadb_sysdeps", |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 151 | "libadb_tls_connection", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 152 | "libadbconnection_server", |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 153 | "libadbd", |
| 154 | "libadbd_core", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 155 | "libapp_processes_protos_lite", |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 156 | "libasyncio", |
| 157 | "libbrotli", |
Josh Gao | 7e3f811 | 2021-04-09 17:32:58 -0700 | [diff] [blame] | 158 | "libcrypto_utils", |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 159 | "libcutils_sockets", |
| 160 | "libdiagnose_usb", |
| 161 | "libmdnssd", |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 162 | "libprotobuf-cpp-lite", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 163 | "libzstd", |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 164 | ], |
| 165 | |
| 166 | shared_libs: [ |
| 167 | "libadbd_auth", |
| 168 | "libadbd_fs", |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 169 | "liblog", |
| 170 | "libselinux", |
| 171 | ], |
| 172 | |
Liz Kammer | 6836b05 | 2021-01-22 13:39:03 -0500 | [diff] [blame] | 173 | soong_config_variables:{ |
| 174 | library_linking_strategy: { |
| 175 | prefer_static: { |
| 176 | static_libs: [ |
| 177 | "libbase", |
| 178 | ], |
| 179 | }, |
| 180 | conditions_default: { |
| 181 | shared_libs: [ |
| 182 | "libbase", |
| 183 | ], |
| 184 | }, |
| 185 | }, |
| 186 | }, |
| 187 | |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 188 | target: { |
Josh Gao | 7e3f811 | 2021-04-09 17:32:58 -0700 | [diff] [blame] | 189 | android: { |
| 190 | shared_libs: ["libcrypto"], |
| 191 | }, |
Colin Cross | 0229086 | 2022-03-24 15:47:28 -0700 | [diff] [blame] | 192 | host_linux: { |
Josh Gao | 7e3f811 | 2021-04-09 17:32:58 -0700 | [diff] [blame] | 193 | static_libs: ["libcrypto_static"], |
| 194 | }, |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 195 | recovery: { |
| 196 | exclude_static_libs: [ |
| 197 | "libadb_pairing_auth", |
| 198 | "libadb_pairing_connection", |
| 199 | ], |
| 200 | }, |
| 201 | }, |
| 202 | } |
| 203 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 204 | // libadb |
| 205 | // ========================================================= |
| 206 | // These files are compiled for both the host and the device. |
| 207 | libadb_srcs = [ |
| 208 | "adb.cpp", |
| 209 | "adb_io.cpp", |
| 210 | "adb_listeners.cpp", |
Joshua Duong | f4ba8d7 | 2021-01-13 12:18:15 -0800 | [diff] [blame] | 211 | "adb_mdns.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 212 | "adb_trace.cpp", |
Josh Gao | 7d5762c | 2018-05-24 22:54:50 -0700 | [diff] [blame] | 213 | "adb_unique_fd.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 214 | "adb_utils.cpp", |
Josh Gao | b51193a | 2019-06-28 13:50:37 -0700 | [diff] [blame] | 215 | "fdevent/fdevent.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 216 | "services.cpp", |
| 217 | "sockets.cpp", |
| 218 | "socket_spec.cpp", |
Joshua Duong | 93b407c | 2020-07-30 16:34:29 -0700 | [diff] [blame] | 219 | "sysdeps/env.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 220 | "sysdeps/errno.cpp", |
| 221 | "transport.cpp", |
Josh Gao | 1e41fda | 2018-04-05 16:16:04 -0700 | [diff] [blame] | 222 | "transport_fd.cpp", |
Yurii Zubrytskyi | e5e6b0d | 2019-07-12 14:11:54 -0700 | [diff] [blame] | 223 | "types.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 224 | ] |
| 225 | |
Josh Gao | d7c49ec | 2020-04-20 19:22:05 -0700 | [diff] [blame] | 226 | libadb_darwin_srcs = [ |
| 227 | "fdevent/fdevent_poll.cpp", |
| 228 | ] |
| 229 | |
| 230 | libadb_windows_srcs = [ |
| 231 | "fdevent/fdevent_poll.cpp", |
| 232 | "sysdeps_win32.cpp", |
| 233 | "sysdeps/win32/errno.cpp", |
| 234 | "sysdeps/win32/stat.cpp", |
| 235 | ] |
| 236 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 237 | libadb_posix_srcs = [ |
| 238 | "sysdeps_unix.cpp", |
| 239 | "sysdeps/posix/network.cpp", |
| 240 | ] |
| 241 | |
Josh Gao | dd71642 | 2019-07-11 13:47:44 -0700 | [diff] [blame] | 242 | libadb_linux_srcs = [ |
| 243 | "fdevent/fdevent_epoll.cpp", |
| 244 | ] |
| 245 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 246 | libadb_test_srcs = [ |
| 247 | "adb_io_test.cpp", |
| 248 | "adb_listeners_test.cpp", |
| 249 | "adb_utils_test.cpp", |
Josh Gao | b51193a | 2019-06-28 13:50:37 -0700 | [diff] [blame] | 250 | "fdevent/fdevent_test.cpp", |
Shaju Mathew | 3f7b440 | 2023-01-19 21:56:37 -0800 | [diff] [blame] | 251 | "shell_service_protocol.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 252 | "socket_spec_test.cpp", |
| 253 | "socket_test.cpp", |
| 254 | "sysdeps_test.cpp", |
| 255 | "sysdeps/stat_test.cpp", |
| 256 | "transport_test.cpp", |
Josh Gao | 9f155db | 2018-04-03 14:37:11 -0700 | [diff] [blame] | 257 | "types_test.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 258 | ] |
| 259 | |
| 260 | cc_library_host_static { |
| 261 | name: "libadb_host", |
| 262 | defaults: ["adb_defaults"], |
| 263 | |
| 264 | srcs: libadb_srcs + [ |
Joshua Duong | f4ba8d7 | 2021-01-13 12:18:15 -0800 | [diff] [blame] | 265 | "client/openscreen/mdns_service_info.cpp", |
| 266 | "client/openscreen/mdns_service_watcher.cpp", |
| 267 | "client/openscreen/platform/logging.cpp", |
| 268 | "client/openscreen/platform/task_runner.cpp", |
| 269 | "client/openscreen/platform/udp_socket.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 270 | "client/auth.cpp", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 271 | "client/adb_wifi.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 272 | "client/usb_libusb.cpp", |
Josh Gao | a5baef9 | 2020-04-22 17:30:06 -0700 | [diff] [blame] | 273 | "client/transport_local.cpp", |
Joshua Duong | f4ba8d7 | 2021-01-13 12:18:15 -0800 | [diff] [blame] | 274 | "client/mdnsresponder_client.cpp", |
Joshua Duong | f2a0d87 | 2020-04-30 15:45:38 -0700 | [diff] [blame] | 275 | "client/mdns_utils.cpp", |
Joshua Duong | f4ba8d7 | 2021-01-13 12:18:15 -0800 | [diff] [blame] | 276 | "client/transport_mdns.cpp", |
Josh Gao | 6b55e75 | 2020-03-27 18:09:56 -0700 | [diff] [blame] | 277 | "client/transport_usb.cpp", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 278 | "client/pairing/pairing_client.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 279 | ], |
| 280 | |
Dan Willemsen | 1886189 | 2018-08-29 14:58:02 -0700 | [diff] [blame] | 281 | generated_headers: ["platform_tools_version"], |
| 282 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 283 | target: { |
| 284 | linux: { |
Josh Gao | dd71642 | 2019-07-11 13:47:44 -0700 | [diff] [blame] | 285 | srcs: ["client/usb_linux.cpp"] + libadb_linux_srcs, |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 286 | }, |
| 287 | darwin: { |
Josh Gao | d7c49ec | 2020-04-20 19:22:05 -0700 | [diff] [blame] | 288 | srcs: ["client/usb_osx.cpp"] + libadb_darwin_srcs, |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 289 | }, |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 290 | not_windows: { |
| 291 | srcs: libadb_posix_srcs, |
| 292 | }, |
| 293 | windows: { |
| 294 | enabled: true, |
| 295 | srcs: [ |
| 296 | "client/usb_windows.cpp", |
Josh Gao | d7c49ec | 2020-04-20 19:22:05 -0700 | [diff] [blame] | 297 | ] + libadb_windows_srcs, |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 298 | shared_libs: ["AdbWinApi"], |
| 299 | }, |
| 300 | }, |
| 301 | |
| 302 | static_libs: [ |
Joshua Duong | 090c807 | 2019-12-19 16:36:30 -0800 | [diff] [blame] | 303 | "libadb_crypto", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 304 | "libadb_pairing_connection", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 305 | "libadb_protos", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 306 | "libadb_tls_connection", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 307 | "libbase", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 308 | "libcrypto", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 309 | "libcrypto_utils", |
Idries Hamadi | 78330f0 | 2018-09-13 18:00:25 +0100 | [diff] [blame] | 310 | "libcutils", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 311 | "libdiagnose_usb", |
Fabien Sanglard | 3d155b6 | 2023-11-30 14:52:40 -0800 | [diff] [blame] | 312 | "libdevices_protos", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 313 | "liblog", |
| 314 | "libmdnssd", |
Joshua Duong | f4ba8d7 | 2021-01-13 12:18:15 -0800 | [diff] [blame] | 315 | "libopenscreen-discovery", |
| 316 | "libopenscreen-platform-impl", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 317 | "libprotobuf-cpp-lite", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 318 | "libusb", |
| 319 | "libutils", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 320 | ], |
| 321 | } |
| 322 | |
Joshua Duong | 93b407c | 2020-07-30 16:34:29 -0700 | [diff] [blame] | 323 | cc_library { |
| 324 | name: "libadb_sysdeps", |
| 325 | defaults: ["adb_defaults"], |
| 326 | recovery_available: true, |
| 327 | host_supported: true, |
| 328 | compile_multilib: "both", |
| 329 | min_sdk_version: "apex_inherit", |
Jiyong Park | c55fa5c | 2020-08-25 17:05:41 +0900 | [diff] [blame] | 330 | // This library doesn't use build::GetBuildNumber() |
| 331 | use_version_lib: false, |
Joshua Duong | 93b407c | 2020-07-30 16:34:29 -0700 | [diff] [blame] | 332 | |
| 333 | srcs: [ |
| 334 | "sysdeps/env.cpp", |
| 335 | ], |
| 336 | |
| 337 | shared_libs: [ |
| 338 | "libbase", |
| 339 | "liblog", |
| 340 | ], |
| 341 | |
| 342 | target: { |
| 343 | windows: { |
| 344 | enabled: true, |
| 345 | ldflags: ["-municode"], |
| 346 | }, |
| 347 | }, |
| 348 | |
| 349 | export_include_dirs: ["."], |
| 350 | |
| 351 | visibility: [ |
Joshua Duong | 93b407c | 2020-07-30 16:34:29 -0700 | [diff] [blame] | 352 | "//bootable/recovery/minadbd:__subpackages__", |
Baligh Uddin | 95e0367 | 2020-10-18 15:09:52 +0000 | [diff] [blame] | 353 | "//packages/modules/adb:__subpackages__", |
Joshua Duong | 93b407c | 2020-07-30 16:34:29 -0700 | [diff] [blame] | 354 | ], |
| 355 | |
| 356 | apex_available: [ |
| 357 | "com.android.adbd", |
| 358 | "test_com.android.adbd", |
| 359 | ], |
| 360 | } |
| 361 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 362 | cc_test_host { |
| 363 | name: "adb_test", |
| 364 | defaults: ["adb_defaults"], |
Joshua Duong | f2a0d87 | 2020-04-30 15:45:38 -0700 | [diff] [blame] | 365 | srcs: libadb_test_srcs + [ |
| 366 | "client/mdns_utils_test.cpp", |
Shaju Mathew | 3f7b440 | 2023-01-19 21:56:37 -0800 | [diff] [blame] | 367 | "test_utils/test_utils.cpp", |
Joshua Duong | f2a0d87 | 2020-04-30 15:45:38 -0700 | [diff] [blame] | 368 | ], |
| 369 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 370 | static_libs: [ |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 371 | "libadb_crypto_static", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 372 | "libadb_host", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 373 | "libadb_pairing_auth_static", |
| 374 | "libadb_pairing_connection_static", |
| 375 | "libadb_protos_static", |
Joshua Duong | 93b407c | 2020-07-30 16:34:29 -0700 | [diff] [blame] | 376 | "libadb_sysdeps", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 377 | "libadb_tls_connection_static", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 378 | "libbase", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 379 | "libcrypto", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 380 | "libcrypto_utils", |
| 381 | "libcutils", |
Fabien Sanglard | 3d155b6 | 2023-11-30 14:52:40 -0800 | [diff] [blame] | 382 | "libdevices_protos", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 383 | "libdiagnose_usb", |
Tom Cherry | 49b96ec | 2020-01-08 13:41:56 -0800 | [diff] [blame] | 384 | "liblog", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 385 | "libmdnssd", |
Joshua Duong | f4ba8d7 | 2021-01-13 12:18:15 -0800 | [diff] [blame] | 386 | "libopenscreen-discovery", |
| 387 | "libopenscreen-platform-impl", |
Fabien Sanglard | 3d155b6 | 2023-11-30 14:52:40 -0800 | [diff] [blame] | 388 | "libprotobuf-cpp-full", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 389 | "libssl", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 390 | "libusb", |
| 391 | ], |
Josh Gao | ea7b95a | 2018-03-23 15:37:20 -0700 | [diff] [blame] | 392 | |
| 393 | target: { |
| 394 | windows: { |
| 395 | enabled: true, |
Josh Gao | 3e8bdab | 2019-07-16 15:08:42 -0700 | [diff] [blame] | 396 | ldflags: ["-municode"], |
Josh Gao | ea7b95a | 2018-03-23 15:37:20 -0700 | [diff] [blame] | 397 | shared_libs: ["AdbWinApi"], |
| 398 | }, |
| 399 | }, |
zeek | 9afe4f8 | 2022-09-20 00:49:44 +0800 | [diff] [blame] | 400 | |
| 401 | test_options: { |
| 402 | // TODO(b/247985207) remove "no-remote" tag when b/247985207 is fixed. |
| 403 | tags: ["no-remote"], |
| 404 | } |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 405 | } |
| 406 | |
| 407 | cc_binary_host { |
| 408 | name: "adb", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 409 | |
Josh Gao | 06af61e | 2020-02-03 23:08:05 -0800 | [diff] [blame] | 410 | stl: "libc++_static", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 411 | defaults: ["adb_defaults"], |
| 412 | |
| 413 | srcs: [ |
| 414 | "client/adb_client.cpp", |
| 415 | "client/bugreport.cpp", |
| 416 | "client/commandline.cpp", |
| 417 | "client/file_sync_client.cpp", |
| 418 | "client/main.cpp", |
| 419 | "client/console.cpp", |
Idries Hamadi | 1ecee44 | 2018-01-29 16:30:36 +0000 | [diff] [blame] | 420 | "client/adb_install.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 421 | "client/line_printer.cpp", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 422 | "client/fastdeploy.cpp", |
| 423 | "client/fastdeploycallbacks.cpp", |
Alex Buynytskyy | 175ce29 | 2020-02-13 06:52:04 -0800 | [diff] [blame] | 424 | "client/incremental.cpp", |
| 425 | "client/incremental_server.cpp", |
Songchun Fan | 965301e | 2020-03-13 13:11:43 -0700 | [diff] [blame] | 426 | "client/incremental_utils.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 427 | "shell_service_protocol.cpp", |
| 428 | ], |
| 429 | |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 430 | generated_headers: [ |
| 431 | "bin2c_fastdeployagent", |
| 432 | "bin2c_fastdeployagentscript" |
| 433 | ], |
| 434 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 435 | static_libs: [ |
Joshua Duong | 090c807 | 2019-12-19 16:36:30 -0800 | [diff] [blame] | 436 | "libadb_crypto", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 437 | "libadb_host", |
Josh Gao | d8bad8e | 2020-03-26 13:46:08 -0700 | [diff] [blame] | 438 | "libadb_pairing_auth", |
| 439 | "libadb_pairing_connection", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 440 | "libadb_protos", |
Joshua Duong | 93b407c | 2020-07-30 16:34:29 -0700 | [diff] [blame] | 441 | "libadb_sysdeps", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 442 | "libadb_tls_connection", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 443 | "libandroidfw", |
Shukang Zhou | 420ad55 | 2020-02-13 17:01:39 -0800 | [diff] [blame] | 444 | "libapp_processes_protos_full", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 445 | "libbase", |
Josh Gao | 2f0f9eb | 2020-03-04 19:34:08 -0800 | [diff] [blame] | 446 | "libbrotli", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 447 | "libcrypto", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 448 | "libcrypto_utils", |
| 449 | "libcutils", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 450 | "libdiagnose_usb", |
Fabien Sanglard | 3d155b6 | 2023-11-30 14:52:40 -0800 | [diff] [blame] | 451 | "libdevices_protos", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 452 | "libfastdeploy_host", |
| 453 | "liblog", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 454 | "liblog", |
Alex Buynytskyy | 175ce29 | 2020-02-13 06:52:04 -0800 | [diff] [blame] | 455 | "liblz4", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 456 | "libmdnssd", |
Joshua Duong | f4ba8d7 | 2021-01-13 12:18:15 -0800 | [diff] [blame] | 457 | "libopenscreen-discovery", |
| 458 | "libopenscreen-platform-impl", |
Shukang Zhou | 420ad55 | 2020-02-13 17:01:39 -0800 | [diff] [blame] | 459 | "libprotobuf-cpp-full", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 460 | "libssl", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 461 | "libusb", |
Idries Hamadi | 78330f0 | 2018-09-13 18:00:25 +0100 | [diff] [blame] | 462 | "libutils", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 463 | "libz", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 464 | "libziparchive", |
Josh Gao | bdebc9b | 2020-05-27 17:52:52 -0700 | [diff] [blame] | 465 | "libzstd", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 466 | ], |
| 467 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 468 | // Don't add anything here, we don't want additional shared dependencies |
| 469 | // on the host adb tool, and shared libraries that link against libc++ |
| 470 | // will violate ODR |
| 471 | shared_libs: [], |
| 472 | |
Dan Willemsen | 7024da4 | 2018-11-19 19:11:35 -0800 | [diff] [blame] | 473 | // Archive adb, adb.exe. |
| 474 | dist: { |
| 475 | targets: [ |
| 476 | "dist_files", |
| 477 | "sdk", |
Shaju Mathew | 9510d64 | 2022-10-06 22:18:29 +0000 | [diff] [blame] | 478 | "sdk-repo-platform-tools", |
| 479 | "sdk_repo", |
Dan Willemsen | 7024da4 | 2018-11-19 19:11:35 -0800 | [diff] [blame] | 480 | "win_sdk", |
| 481 | ], |
| 482 | }, |
| 483 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 484 | target: { |
| 485 | darwin: { |
| 486 | cflags: [ |
| 487 | "-Wno-sizeof-pointer-memaccess", |
| 488 | ], |
| 489 | }, |
| 490 | windows: { |
| 491 | enabled: true, |
| 492 | ldflags: ["-municode"], |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 493 | shared_libs: ["AdbWinApi"], |
| 494 | required: [ |
| 495 | "AdbWinUsbApi", |
| 496 | ], |
| 497 | }, |
| 498 | }, |
| 499 | } |
| 500 | |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 501 | // libadbd_core contains the common sources to build libadbd and libadbd_services. |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 502 | cc_library_static { |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 503 | name: "libadbd_core", |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 504 | defaults: ["adbd_defaults", "host_adbd_supported"], |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 505 | recovery_available: true, |
| 506 | |
| 507 | // libminadbd wants both, as it's used to build native tests. |
| 508 | compile_multilib: "both", |
| 509 | |
Josh Gao | dd71642 | 2019-07-11 13:47:44 -0700 | [diff] [blame] | 510 | srcs: libadb_srcs + libadb_linux_srcs + libadb_posix_srcs + [ |
Josh Gao | a5baef9 | 2020-04-22 17:30:06 -0700 | [diff] [blame] | 511 | "daemon/adb_wifi.cpp", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 512 | "daemon/auth.cpp", |
| 513 | "daemon/jdwp_service.cpp", |
Josh Gao | bd77521 | 2020-02-26 16:39:20 -0800 | [diff] [blame] | 514 | "daemon/logging.cpp", |
Josh Gao | a5baef9 | 2020-04-22 17:30:06 -0700 | [diff] [blame] | 515 | "daemon/transport_local.cpp", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 516 | ], |
| 517 | |
Dan Willemsen | 1886189 | 2018-08-29 14:58:02 -0700 | [diff] [blame] | 518 | generated_headers: ["platform_tools_version"], |
| 519 | |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 520 | static_libs: [ |
| 521 | "libdiagnose_usb", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 522 | ], |
| 523 | |
| 524 | shared_libs: [ |
Joshua Duong | 090c807 | 2019-12-19 16:36:30 -0800 | [diff] [blame] | 525 | "libadb_crypto", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 526 | "libadb_pairing_connection", |
| 527 | "libadb_protos", |
| 528 | "libadb_tls_connection", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 529 | "libadbconnection_server", |
Josh Gao | 7cac88a | 2019-10-22 12:30:39 -0700 | [diff] [blame] | 530 | "libadbd_auth", |
Josh Gao | fa3605a | 2020-03-16 11:30:09 -0700 | [diff] [blame] | 531 | "libapp_processes_protos_lite", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 532 | "libasyncio", |
| 533 | "libbase", |
| 534 | "libcrypto", |
| 535 | "libcrypto_utils", |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 536 | "libcutils_sockets", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 537 | "liblog", |
| 538 | ], |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 539 | |
Shukang Zhou | 420ad55 | 2020-02-13 17:01:39 -0800 | [diff] [blame] | 540 | proto: { |
| 541 | type: "lite", |
| 542 | static: true, |
| 543 | export_proto_headers: true, |
| 544 | }, |
| 545 | |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 546 | target: { |
| 547 | android: { |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 548 | srcs: [ |
Josh Gao | 822f674 | 2021-02-03 22:12:41 -0800 | [diff] [blame] | 549 | "daemon/property_monitor.cpp", |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 550 | "daemon/usb.cpp", |
| 551 | "daemon/usb_ffs.cpp", |
Josh Gao | 2dc6196 | 2021-02-03 22:11:45 -0800 | [diff] [blame] | 552 | "daemon/watchdog.cpp", |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 553 | ] |
Joshua Duong | 929364a | 2020-02-26 15:43:44 -0800 | [diff] [blame] | 554 | }, |
| 555 | recovery: { |
| 556 | exclude_shared_libs: [ |
| 557 | "libadb_pairing_auth", |
| 558 | "libadb_pairing_connection", |
Josh Gao | fa3605a | 2020-03-16 11:30:09 -0700 | [diff] [blame] | 559 | "libapp_processes_protos_lite", |
Joshua Duong | 929364a | 2020-02-26 15:43:44 -0800 | [diff] [blame] | 560 | ], |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 561 | } |
| 562 | }, |
Josh Gao | 5fcd7ae | 2020-03-16 12:48:18 -0700 | [diff] [blame] | 563 | |
Jooyung Han | 9864dad | 2021-11-22 10:15:19 +0900 | [diff] [blame] | 564 | min_sdk_version: "30", |
Josh Gao | 5fcd7ae | 2020-03-16 12:48:18 -0700 | [diff] [blame] | 565 | apex_available: [ |
| 566 | "//apex_available:platform", |
| 567 | "com.android.adbd", |
| 568 | ], |
| 569 | visibility: [ |
| 570 | "//bootable/recovery/minadbd", |
Baligh Uddin | 95e0367 | 2020-10-18 15:09:52 +0000 | [diff] [blame] | 571 | "//packages/modules/adb:__subpackages__", |
Josh Gao | 5fcd7ae | 2020-03-16 12:48:18 -0700 | [diff] [blame] | 572 | ], |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 573 | } |
| 574 | |
Josh Gao | 2029a37 | 2020-03-09 15:20:55 -0700 | [diff] [blame] | 575 | cc_library { |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 576 | name: "libadbd_services", |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 577 | defaults: ["adbd_defaults", "host_adbd_supported"], |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 578 | recovery_available: true, |
| 579 | compile_multilib: "both", |
| 580 | |
Liz Kammer | 58c7173 | 2023-10-13 17:15:06 -0400 | [diff] [blame] | 581 | // avoid getting duplicate symbol of android::build::getbuildnumber(). |
| 582 | use_version_lib: false, |
| 583 | |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 584 | srcs: [ |
| 585 | "daemon/file_sync_service.cpp", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 586 | "daemon/services.cpp", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 587 | "daemon/shell_service.cpp", |
| 588 | "shell_service_protocol.cpp", |
| 589 | ], |
| 590 | |
| 591 | cflags: [ |
| 592 | "-D_GNU_SOURCE", |
| 593 | "-Wno-deprecated-declarations", |
| 594 | ], |
| 595 | |
| 596 | static_libs: [ |
Josh Gao | bf5a936 | 2020-01-22 17:58:03 -0800 | [diff] [blame] | 597 | "libadbconnection_server", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 598 | "libadbd_core", |
Josh Gao | 2f0f9eb | 2020-03-04 19:34:08 -0800 | [diff] [blame] | 599 | "libbrotli", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 600 | "libdiagnose_usb", |
Josh Gao | fb386cc | 2020-03-26 22:02:03 -0700 | [diff] [blame] | 601 | "liblz4", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 602 | "libprotobuf-cpp-lite", |
Josh Gao | bdebc9b | 2020-05-27 17:52:52 -0700 | [diff] [blame] | 603 | "libzstd", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 604 | ], |
| 605 | |
| 606 | shared_libs: [ |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 607 | "libadb_crypto", |
| 608 | "libadb_pairing_connection", |
| 609 | "libadb_protos", |
| 610 | "libadb_tls_connection", |
Josh Gao | fa3605a | 2020-03-16 11:30:09 -0700 | [diff] [blame] | 611 | "libapp_processes_protos_lite", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 612 | "libasyncio", |
| 613 | "libbase", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 614 | "libcrypto_utils", |
Josh Gao | 2029a37 | 2020-03-09 15:20:55 -0700 | [diff] [blame] | 615 | "libcutils_sockets", |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 616 | |
| 617 | // APEX dependencies. |
| 618 | "libadbd_auth", |
| 619 | "libadbd_fs", |
| 620 | "libcrypto", |
| 621 | "liblog", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 622 | ], |
Alex Buynytskyy | ef34f01 | 2018-12-12 10:48:50 -0800 | [diff] [blame] | 623 | |
| 624 | target: { |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 625 | android: { |
| 626 | srcs: [ |
| 627 | "daemon/abb_service.cpp", |
| 628 | "daemon/framebuffer_service.cpp", |
| 629 | "daemon/mdns.cpp", |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 630 | "daemon/restart_service.cpp", |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 631 | ], |
| 632 | shared_libs: [ |
LuK1337 | 9c67d4b | 2020-09-16 19:35:05 +0200 | [diff] [blame] | 633 | "libbinder_ndk", |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 634 | "libmdnssd", |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 635 | "libselinux", |
| 636 | ], |
LuK1337 | 9c67d4b | 2020-09-16 19:35:05 +0200 | [diff] [blame] | 637 | static_libs: [ |
| 638 | "adbroot_aidl_interface-ndk", |
| 639 | ], |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 640 | }, |
Alex Buynytskyy | ef34f01 | 2018-12-12 10:48:50 -0800 | [diff] [blame] | 641 | recovery: { |
| 642 | exclude_srcs: [ |
| 643 | "daemon/abb_service.cpp", |
| 644 | ], |
Joshua Duong | 929364a | 2020-02-26 15:43:44 -0800 | [diff] [blame] | 645 | exclude_shared_libs: [ |
LuK1337 | 9c67d4b | 2020-09-16 19:35:05 +0200 | [diff] [blame] | 646 | "libbinder_ndk", |
Joshua Duong | 929364a | 2020-02-26 15:43:44 -0800 | [diff] [blame] | 647 | "libadb_pairing_auth", |
| 648 | "libadb_pairing_connection", |
| 649 | ], |
LuK1337 | 9c67d4b | 2020-09-16 19:35:05 +0200 | [diff] [blame] | 650 | exclude_static_libs: [ |
| 651 | "adbroot_aidl_interface-ndk", |
| 652 | ], |
Alex Buynytskyy | ef34f01 | 2018-12-12 10:48:50 -0800 | [diff] [blame] | 653 | }, |
| 654 | }, |
Josh Gao | 5fcd7ae | 2020-03-16 12:48:18 -0700 | [diff] [blame] | 655 | |
Jooyung Han | 9864dad | 2021-11-22 10:15:19 +0900 | [diff] [blame] | 656 | min_sdk_version: "30", |
Josh Gao | 5fcd7ae | 2020-03-16 12:48:18 -0700 | [diff] [blame] | 657 | apex_available: [ |
| 658 | "//apex_available:platform", |
| 659 | "com.android.adbd", |
| 660 | ], |
| 661 | visibility: [ |
Baligh Uddin | 95e0367 | 2020-10-18 15:09:52 +0000 | [diff] [blame] | 662 | "//packages/modules/adb", |
Josh Gao | 5fcd7ae | 2020-03-16 12:48:18 -0700 | [diff] [blame] | 663 | ], |
| 664 | |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 665 | } |
| 666 | |
| 667 | cc_library { |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 668 | name: "libadbd", |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 669 | defaults: ["adbd_defaults", "host_adbd_supported"], |
Jiyong Park | eb59039 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 670 | recovery_available: true, |
Jooyung Han | 9864dad | 2021-11-22 10:15:19 +0900 | [diff] [blame] | 671 | min_sdk_version: "30", |
Jiyong Park | c6afe4a | 2020-03-23 14:40:50 +0000 | [diff] [blame] | 672 | apex_available: ["com.android.adbd"], |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 673 | |
Josh Gao | bf5a936 | 2020-01-22 17:58:03 -0800 | [diff] [blame] | 674 | // avoid getting duplicate symbol of android::build::getbuildnumber(). |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 675 | use_version_lib: false, |
| 676 | |
| 677 | // libminadbd wants both, as it's used to build native tests. |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 678 | compile_multilib: "both", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 679 | |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 680 | static_libs: [ |
| 681 | "libadbd_core", |
| 682 | "libadbd_services", |
| 683 | "libbrotli", |
| 684 | "libcutils_sockets", |
| 685 | "libdiagnose_usb", |
| 686 | "liblz4", |
| 687 | "libmdnssd", |
| 688 | "libprotobuf-cpp-lite", |
| 689 | "libzstd", |
| 690 | ], |
| 691 | |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 692 | shared_libs: [ |
Josh Gao | fa3605a | 2020-03-16 11:30:09 -0700 | [diff] [blame] | 693 | "libadbconnection_server", |
| 694 | "libapp_processes_protos_lite", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 695 | "libadb_crypto", |
| 696 | "libadb_pairing_connection", |
| 697 | "libadb_tls_connection", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 698 | "libasyncio", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 699 | "libbase", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 700 | "libcrypto", |
| 701 | "libcrypto_utils", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 702 | "liblog", |
Josh Gao | a4dfc14 | 2020-02-19 13:50:57 -0800 | [diff] [blame] | 703 | "libselinux", |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 704 | |
| 705 | // APEX dependencies on the system image. |
| 706 | "libadbd_auth", |
| 707 | "libadbd_fs", |
Josh Gao | a4dfc14 | 2020-02-19 13:50:57 -0800 | [diff] [blame] | 708 | ], |
| 709 | |
Joshua Duong | 929364a | 2020-02-26 15:43:44 -0800 | [diff] [blame] | 710 | target: { |
| 711 | recovery: { |
| 712 | exclude_shared_libs: [ |
| 713 | "libadb_pairing_auth", |
| 714 | "libadb_pairing_connection", |
| 715 | ], |
| 716 | } |
| 717 | }, |
| 718 | |
Jerry Zhang | d4fe8b6 | 2018-05-07 15:14:47 -0700 | [diff] [blame] | 719 | |
Josh Gao | 6b55e75 | 2020-03-27 18:09:56 -0700 | [diff] [blame] | 720 | visibility: [ |
| 721 | "//bootable/recovery/minadbd", |
Baligh Uddin | 95e0367 | 2020-10-18 15:09:52 +0000 | [diff] [blame] | 722 | "//packages/modules/adb", |
Jerry Zhang | d4fe8b6 | 2018-05-07 15:14:47 -0700 | [diff] [blame] | 723 | ], |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 724 | } |
| 725 | |
| 726 | cc_binary { |
| 727 | name: "adbd", |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 728 | defaults: ["adbd_defaults", "host_adbd_supported", "libadbd_binary_dependencies"], |
Jiyong Park | eb59039 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 729 | recovery_available: true, |
Jooyung Han | 9864dad | 2021-11-22 10:15:19 +0900 | [diff] [blame] | 730 | min_sdk_version: "30", |
Jiyong Park | c6afe4a | 2020-03-23 14:40:50 +0000 | [diff] [blame] | 731 | apex_available: ["com.android.adbd"], |
Josh Gao | 3e0540a | 2018-03-06 12:57:27 -0800 | [diff] [blame] | 732 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 733 | srcs: [ |
| 734 | "daemon/main.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 735 | ], |
| 736 | |
| 737 | cflags: [ |
| 738 | "-D_GNU_SOURCE", |
| 739 | "-Wno-deprecated-declarations", |
| 740 | ], |
| 741 | |
| 742 | strip: { |
| 743 | keep_symbols: true, |
| 744 | }, |
| 745 | |
Josh Gao | 2bfc85e | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 746 | static_libs: [ |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 747 | "libadb_protos", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 748 | "libadbd", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 749 | "libadbd_services", |
Josh Gao | 2bfc85e | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 750 | "libasyncio", |
Tao Bao | 49042e3 | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 751 | "libcap", |
Josh Gao | fb386cc | 2020-03-26 22:02:03 -0700 | [diff] [blame] | 752 | "liblz4", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 753 | "libminijail", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 754 | "libssl", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 755 | ], |
Josh Gao | 2bfc85e | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 756 | |
| 757 | shared_libs: [ |
Josh Gao | 090712a | 2020-01-16 12:40:43 -0800 | [diff] [blame] | 758 | "libadbd_auth", |
Josh Gao | 2bfc85e | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 759 | ], |
Josh Gao | 06af61e | 2020-02-03 23:08:05 -0800 | [diff] [blame] | 760 | |
Joshua Duong | 929364a | 2020-02-26 15:43:44 -0800 | [diff] [blame] | 761 | target: { |
LuK1337 | 9c67d4b | 2020-09-16 19:35:05 +0200 | [diff] [blame] | 762 | android: { |
| 763 | shared_libs: [ |
| 764 | "libbinder_ndk", |
| 765 | ], |
| 766 | |
| 767 | static_libs: [ |
| 768 | "adbroot_aidl_interface-ndk", |
| 769 | ], |
| 770 | }, |
| 771 | |
Joshua Duong | 929364a | 2020-02-26 15:43:44 -0800 | [diff] [blame] | 772 | recovery: { |
| 773 | exclude_shared_libs: [ |
| 774 | "libadb_pairing_auth", |
| 775 | "libadb_pairing_connection", |
LuK1337 | 9c67d4b | 2020-09-16 19:35:05 +0200 | [diff] [blame] | 776 | "libbinder_ndk", |
| 777 | ], |
| 778 | |
| 779 | exclude_static_libs: [ |
| 780 | "adbroot_aidl_interface-ndk", |
Joshua Duong | 929364a | 2020-02-26 15:43:44 -0800 | [diff] [blame] | 781 | ], |
| 782 | } |
| 783 | }, |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 784 | } |
| 785 | |
Josh Gao | 06e4593 | 2019-10-23 13:27:17 -0700 | [diff] [blame] | 786 | phony { |
Josh Gao | df43f5e | 2020-06-01 18:59:21 -0700 | [diff] [blame] | 787 | // Interface between adbd in a module and the system. |
| 788 | name: "adbd_system_api", |
Josh Gao | 06e4593 | 2019-10-23 13:27:17 -0700 | [diff] [blame] | 789 | required: [ |
Josh Gao | df43f5e | 2020-06-01 18:59:21 -0700 | [diff] [blame] | 790 | "libadbd_auth", |
| 791 | "libadbd_fs", |
Josh Gao | 06e4593 | 2019-10-23 13:27:17 -0700 | [diff] [blame] | 792 | "abb", |
Josh Gao | 83ce3e2 | 2019-10-22 12:30:36 -0700 | [diff] [blame] | 793 | "reboot", |
Yi-Yo Chiang | c24ad0d | 2022-08-05 12:07:34 +0800 | [diff] [blame] | 794 | ], |
| 795 | product_variables: { |
| 796 | debuggable: { |
| 797 | required: [ |
| 798 | "remount", |
Yi-Yo Chiang | c24ad0d | 2022-08-05 12:07:34 +0800 | [diff] [blame] | 799 | ], |
| 800 | }, |
| 801 | }, |
Josh Gao | 06e4593 | 2019-10-23 13:27:17 -0700 | [diff] [blame] | 802 | } |
| 803 | |
| 804 | phony { |
Josh Gao | df43f5e | 2020-06-01 18:59:21 -0700 | [diff] [blame] | 805 | name: "adbd_system_api_recovery", |
Josh Gao | 06e4593 | 2019-10-23 13:27:17 -0700 | [diff] [blame] | 806 | required: [ |
Inseob Kim | fc0410d | 2021-06-30 15:07:24 +0900 | [diff] [blame] | 807 | "libadbd_auth.recovery", |
| 808 | "libadbd_fs.recovery", |
Josh Gao | 83ce3e2 | 2019-10-22 12:30:36 -0700 | [diff] [blame] | 809 | "reboot.recovery", |
Josh Gao | 06e4593 | 2019-10-23 13:27:17 -0700 | [diff] [blame] | 810 | ], |
| 811 | } |
| 812 | |
Alex Buynytskyy | ef34f01 | 2018-12-12 10:48:50 -0800 | [diff] [blame] | 813 | cc_binary { |
LuK1337 | 9c67d4b | 2020-09-16 19:35:05 +0200 | [diff] [blame] | 814 | name: "adb_root", |
| 815 | srcs: [ |
| 816 | "root/adbroot_service.cpp", |
| 817 | "root/main.cpp", |
| 818 | ], |
| 819 | init_rc: [ |
| 820 | "root/adb_root.rc", |
| 821 | ], |
| 822 | shared_libs: [ |
| 823 | "libbase", |
| 824 | "libbinder_ndk", |
| 825 | "liblog", |
| 826 | "libutils", |
| 827 | ], |
| 828 | static_libs: [ |
| 829 | "adbroot_aidl_interface-ndk", |
| 830 | ], |
| 831 | system_ext_specific: true, |
| 832 | } |
| 833 | |
| 834 | cc_binary { |
Alex Buynytskyy | ef34f01 | 2018-12-12 10:48:50 -0800 | [diff] [blame] | 835 | name: "abb", |
| 836 | |
Josh Gao | 0560feb | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 837 | defaults: ["adbd_defaults"], |
Josh Gao | 06af61e | 2020-02-03 23:08:05 -0800 | [diff] [blame] | 838 | stl: "libc++", |
Alex Buynytskyy | ef34f01 | 2018-12-12 10:48:50 -0800 | [diff] [blame] | 839 | recovery_available: false, |
| 840 | |
| 841 | srcs: [ |
| 842 | "daemon/abb.cpp", |
| 843 | ], |
| 844 | |
| 845 | cflags: [ |
| 846 | "-D_GNU_SOURCE", |
| 847 | "-Wno-deprecated-declarations", |
| 848 | ], |
| 849 | |
| 850 | strip: { |
| 851 | keep_symbols: true, |
| 852 | }, |
| 853 | |
| 854 | static_libs: [ |
| 855 | "libadbd_core", |
| 856 | "libadbd_services", |
| 857 | "libcmd", |
| 858 | ], |
| 859 | |
| 860 | shared_libs: [ |
| 861 | "libbase", |
| 862 | "libbinder", |
| 863 | "liblog", |
| 864 | "libutils", |
| 865 | "libselinux", |
| 866 | ], |
| 867 | } |
| 868 | |
Jingwen Chen | e29935e | 2022-12-10 03:50:12 +0000 | [diff] [blame] | 869 | ADBD_TEST_LIBS = [ |
| 870 | "libadbd", |
| 871 | "libadbd_auth", |
| 872 | "libbase", |
Jingwen Chen | e29935e | 2022-12-10 03:50:12 +0000 | [diff] [blame] | 873 | "libusb", |
| 874 | ] |
| 875 | |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 876 | cc_test { |
| 877 | name: "adbd_test", |
Josh Gao | 06af61e | 2020-02-03 23:08:05 -0800 | [diff] [blame] | 878 | |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 879 | defaults: ["adbd_defaults", "libadbd_binary_dependencies"], |
Josh Gao | 06af61e | 2020-02-03 23:08:05 -0800 | [diff] [blame] | 880 | |
| 881 | recovery_available: false, |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 882 | srcs: libadb_test_srcs + [ |
Shaju Mathew | ccdd7ff | 2023-02-01 03:00:40 -0800 | [diff] [blame] | 883 | "daemon/restart_service.cpp", |
| 884 | "daemon/restart_service_test.cpp", |
Josh Gao | 5607e92 | 2018-07-25 18:15:52 -0700 | [diff] [blame] | 885 | "daemon/services.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 886 | "daemon/shell_service.cpp", |
| 887 | "daemon/shell_service_test.cpp", |
Shaju Mathew | 3f7b440 | 2023-01-19 21:56:37 -0800 | [diff] [blame] | 888 | "test_utils/test_utils.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 889 | "shell_service_protocol_test.cpp", |
Joshua Duong | 77b8ff3 | 2020-04-16 15:58:19 -0700 | [diff] [blame] | 890 | "mdns_test.cpp", |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 891 | ], |
| 892 | |
Fabien Sanglard | fcd6499 | 2022-09-02 17:43:55 -0700 | [diff] [blame] | 893 | test_config: "adbd_test.xml", |
Chen Zhu | 72ccee3 | 2020-05-08 16:45:11 -0700 | [diff] [blame] | 894 | |
Josh Gao | 822f674 | 2021-02-03 22:12:41 -0800 | [diff] [blame] | 895 | target: { |
| 896 | android: { |
| 897 | srcs: [ |
| 898 | "daemon/property_monitor_test.cpp", |
| 899 | ], |
| 900 | }, |
| 901 | }, |
| 902 | |
Josh Gao | dc20c2f | 2020-03-27 19:41:59 -0700 | [diff] [blame] | 903 | shared_libs: [ |
| 904 | "liblog", |
| 905 | ], |
| 906 | |
Jingwen Chen | e29935e | 2022-12-10 03:50:12 +0000 | [diff] [blame] | 907 | static_libs: ADBD_TEST_LIBS, |
| 908 | |
| 909 | // Shared lib versions of static libs can potentially come from |
| 910 | // libadbd_binary_dependencies (e.g. libbase as a shared_lib, depending on |
| 911 | // library_linking_strategy), which will cause both shared/static versions of |
| 912 | // the same library to be in the link action. |
| 913 | // |
| 914 | // adbd_test uses the static version of these libraries above, so exclude them here. |
| 915 | exclude_shared_libs: ADBD_TEST_LIBS, |
| 916 | |
easoncylee | 83d1c9d | 2021-04-15 16:28:54 +0800 | [diff] [blame] | 917 | test_suites: ["general-tests", "mts-adbd"], |
Dan Shi | 22e091b | 2019-09-24 09:04:05 -0700 | [diff] [blame] | 918 | require_root: true, |
Josh Gao | 361148b | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 919 | } |
| 920 | |
Julien Desprez | ae94f51 | 2018-08-08 12:08:50 -0700 | [diff] [blame] | 921 | python_test_host { |
Elliott Hughes | 307e767 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 922 | name: "adb_integration_test_adb", |
| 923 | main: "test_adb.py", |
| 924 | srcs: [ |
| 925 | "test_adb.py", |
| 926 | ], |
Julien Desprez | ae94f51 | 2018-08-08 12:08:50 -0700 | [diff] [blame] | 927 | test_config: "adb_integration_test_adb.xml", |
| 928 | test_suites: ["general-tests"], |
Julien Desprez | b099b53 | 2021-03-25 19:26:23 +0000 | [diff] [blame] | 929 | test_options: { |
| 930 | unit_test: false, |
| 931 | }, |
GuangHui Liu | 3599439 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 932 | } |
| 933 | |
Julien Desprez | cd11d0d | 2018-10-12 13:48:14 -0700 | [diff] [blame] | 934 | python_test_host { |
Elliott Hughes | 307e767 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 935 | name: "adb_integration_test_device", |
| 936 | main: "test_device.py", |
| 937 | srcs: [ |
Fabien Sanglard | 3d155b6 | 2023-11-30 14:52:40 -0800 | [diff] [blame] | 938 | "proto/devices.proto", |
Elliott Hughes | 307e767 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 939 | "test_device.py", |
| 940 | ], |
Fabien Sanglard | 3d155b6 | 2023-11-30 14:52:40 -0800 | [diff] [blame] | 941 | proto: { |
| 942 | canonical_path_from_root: false, |
| 943 | }, |
Elliott Hughes | 307e767 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 944 | libs: [ |
| 945 | "adb_py", |
Fabien Sanglard | 3d155b6 | 2023-11-30 14:52:40 -0800 | [diff] [blame] | 946 | "libprotobuf-python", |
Elliott Hughes | 307e767 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 947 | ], |
Julien Desprez | cd11d0d | 2018-10-12 13:48:14 -0700 | [diff] [blame] | 948 | test_config: "adb_integration_test_device.xml", |
| 949 | test_suites: ["general-tests"], |
Julien Desprez | b099b53 | 2021-03-25 19:26:23 +0000 | [diff] [blame] | 950 | test_options: { |
| 951 | unit_test: false, |
| 952 | }, |
GuangHui Liu | 3599439 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 953 | } |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 954 | |
| 955 | // Note: using pipe for xxd to control the variable name generated |
| 956 | // the default name used by xxd is the path to the input file. |
| 957 | java_genrule { |
| 958 | name: "bin2c_fastdeployagent", |
| 959 | out: ["deployagent.inc"], |
| 960 | srcs: [":deployagent"], |
| 961 | cmd: "(echo 'unsigned char kDeployAgent[] = {' && xxd -i <$(in) && echo '};') > $(out)", |
| 962 | } |
| 963 | |
| 964 | genrule { |
| 965 | name: "bin2c_fastdeployagentscript", |
| 966 | out: ["deployagentscript.inc"], |
| 967 | srcs: ["fastdeploy/deployagent/deployagent.sh"], |
| 968 | cmd: "(echo 'unsigned char kDeployAgentScript[] = {' && xxd -i <$(in) && echo '};') > $(out)", |
| 969 | } |
| 970 | |
| 971 | cc_library_host_static { |
| 972 | name: "libfastdeploy_host", |
| 973 | defaults: ["adb_defaults"], |
| 974 | srcs: [ |
Alex Buynytskyy | 1af550e | 2019-09-16 12:10:54 -0700 | [diff] [blame] | 975 | "fastdeploy/deploypatchgenerator/apk_archive.cpp", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 976 | "fastdeploy/deploypatchgenerator/deploy_patch_generator.cpp", |
| 977 | "fastdeploy/deploypatchgenerator/patch_utils.cpp", |
| 978 | "fastdeploy/proto/ApkEntry.proto", |
| 979 | ], |
| 980 | static_libs: [ |
| 981 | "libadb_host", |
| 982 | "libandroidfw", |
| 983 | "libbase", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 984 | "libcrypto", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 985 | "libcrypto_utils", |
| 986 | "libcutils", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 987 | "libdiagnose_usb", |
| 988 | "liblog", |
| 989 | "libmdnssd", |
| 990 | "libusb", |
| 991 | "libutils", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 992 | "libz", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 993 | "libziparchive", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 994 | ], |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 995 | proto: { |
| 996 | type: "lite", |
| 997 | export_proto_headers: true, |
| 998 | }, |
| 999 | target: { |
| 1000 | windows: { |
| 1001 | enabled: true, |
| 1002 | shared_libs: ["AdbWinApi"], |
| 1003 | }, |
| 1004 | }, |
| 1005 | } |
| 1006 | |
| 1007 | cc_test_host { |
| 1008 | name: "fastdeploy_test", |
| 1009 | defaults: ["adb_defaults"], |
| 1010 | srcs: [ |
Alex Buynytskyy | 1af550e | 2019-09-16 12:10:54 -0700 | [diff] [blame] | 1011 | "fastdeploy/deploypatchgenerator/apk_archive_test.cpp", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 1012 | "fastdeploy/deploypatchgenerator/deploy_patch_generator_test.cpp", |
| 1013 | "fastdeploy/deploypatchgenerator/patch_utils_test.cpp", |
| 1014 | ], |
| 1015 | static_libs: [ |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 1016 | "libadb_crypto_static", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 1017 | "libadb_host", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 1018 | "libadb_pairing_auth_static", |
| 1019 | "libadb_pairing_connection_static", |
| 1020 | "libadb_protos_static", |
Joshua Duong | 93b407c | 2020-07-30 16:34:29 -0700 | [diff] [blame] | 1021 | "libadb_sysdeps", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 1022 | "libadb_tls_connection_static", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 1023 | "libandroidfw", |
| 1024 | "libbase", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 1025 | "libcrypto", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 1026 | "libcrypto_utils", |
| 1027 | "libcutils", |
Fabien Sanglard | 3d155b6 | 2023-11-30 14:52:40 -0800 | [diff] [blame] | 1028 | "libdevices_protos", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 1029 | "libdiagnose_usb", |
| 1030 | "libfastdeploy_host", |
| 1031 | "liblog", |
| 1032 | "libmdnssd", |
Joshua Duong | f4ba8d7 | 2021-01-13 12:18:15 -0800 | [diff] [blame] | 1033 | "libopenscreen-discovery", |
| 1034 | "libopenscreen-platform-impl", |
Fabien Sanglard | 3d155b6 | 2023-11-30 14:52:40 -0800 | [diff] [blame] | 1035 | "libprotobuf-cpp-full", |
Joshua Duong | 290ccb5 | 2019-11-20 14:18:43 -0800 | [diff] [blame] | 1036 | "libssl", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 1037 | "libusb", |
| 1038 | "libutils", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 1039 | "libz", |
Oriol Prieto Gasco | 532e570 | 2021-08-20 14:36:42 +0000 | [diff] [blame] | 1040 | "libziparchive", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 1041 | ], |
| 1042 | target: { |
| 1043 | windows: { |
| 1044 | enabled: true, |
| 1045 | shared_libs: ["AdbWinApi"], |
| 1046 | }, |
| 1047 | }, |
| 1048 | data: [ |
Alex Buynytskyy | 1af550e | 2019-09-16 12:10:54 -0700 | [diff] [blame] | 1049 | "fastdeploy/testdata/rotating_cube-metadata-release.data", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 1050 | "fastdeploy/testdata/rotating_cube-release.apk", |
Alex Buynytskyy | 1af550e | 2019-09-16 12:10:54 -0700 | [diff] [blame] | 1051 | "fastdeploy/testdata/sample.apk", |
| 1052 | "fastdeploy/testdata/sample.cd", |
Joshua Gilpatrick | 0d38411 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 1053 | ], |
| 1054 | } |
LuK1337 | 9c67d4b | 2020-09-16 19:35:05 +0200 | [diff] [blame] | 1055 | |
| 1056 | aidl_interface { |
| 1057 | name: "adbroot_aidl_interface", |
| 1058 | unstable: true, |
| 1059 | local_include_dir: "aidl", |
| 1060 | srcs: [ |
| 1061 | "aidl/android/adbroot/IADBRootService.aidl", |
| 1062 | ], |
| 1063 | backend: { |
| 1064 | cpp: { |
| 1065 | enabled: false, |
| 1066 | }, |
| 1067 | java: { |
| 1068 | enabled: false, |
| 1069 | }, |
| 1070 | ndk: { |
| 1071 | apex_available: [ |
| 1072 | "//apex_available:platform", |
| 1073 | "com.android.adbd", |
| 1074 | ], |
| 1075 | min_sdk_version: "30", |
| 1076 | }, |
| 1077 | }, |
| 1078 | } |
| 1079 | |
| 1080 | filegroup { |
| 1081 | name: "adbrootservice_aidl", |
| 1082 | srcs: [ |
| 1083 | "aidl/android/adbroot/IADBRootService.aidl", |
| 1084 | ], |
| 1085 | } |