| GuangHui Liu | 41bda34 | 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 |  | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 15 | cc_defaults { | 
|  | 16 | name: "adb_defaults", | 
|  | 17 |  | 
|  | 18 | cflags: [ | 
|  | 19 | "-Wall", | 
|  | 20 | "-Wextra", | 
|  | 21 | "-Werror", | 
| Pirama Arumuga Nainar | 7982178 | 2018-06-01 11:31:38 -0700 | [diff] [blame] | 22 | "-Wexit-time-destructors", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 23 | "-Wno-unused-parameter", | 
|  | 24 | "-Wno-missing-field-initializers", | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 25 | "-Wthread-safety", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 26 | "-Wvla", | 
| Bowgo Tsai | 9b30c0a | 2019-03-12 04:25:33 +0800 | [diff] [blame] | 27 | "-DADB_HOST=1",         // overridden by adbd_defaults | 
|  | 28 | "-DALLOW_ADBD_ROOT=0",  // overridden by adbd_defaults | 
| Josh Gao | 27241a7 | 2019-04-25 14:04:57 -0700 | [diff] [blame] | 29 | "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION=1", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 30 | ], | 
| Josh Gao | 6eb7882 | 2018-11-16 15:40:16 -0800 | [diff] [blame] | 31 | cpp_std: "experimental", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 32 |  | 
| Josh Gao | c7567fa | 2018-02-27 15:49:23 -0800 | [diff] [blame] | 33 | use_version_lib: true, | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 34 | compile_multilib: "first", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 35 |  | 
|  | 36 | target: { | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 37 | darwin: { | 
|  | 38 | host_ldlibs: [ | 
|  | 39 | "-lpthread", | 
|  | 40 | "-framework CoreFoundation", | 
|  | 41 | "-framework IOKit", | 
|  | 42 | "-lobjc", | 
|  | 43 | ], | 
|  | 44 | }, | 
|  | 45 |  | 
|  | 46 | windows: { | 
|  | 47 | cflags: [ | 
|  | 48 | // Define windows.h and tchar.h Unicode preprocessor symbols so that | 
|  | 49 | // CreateFile(), _tfopen(), etc. map to versions that take wchar_t*, breaking the | 
|  | 50 | // build if you accidentally pass char*. Fix by calling like: | 
|  | 51 | //   std::wstring path_wide; | 
|  | 52 | //   if (!android::base::UTF8ToWide(path_utf8, &path_wide)) { /* error handling */ } | 
|  | 53 | //   CreateFileW(path_wide.c_str()); | 
|  | 54 | "-DUNICODE=1", | 
|  | 55 | "-D_UNICODE=1", | 
|  | 56 |  | 
| Elliott Hughes | 3c59cb8 | 2018-12-03 09:02:18 -0800 | [diff] [blame] | 57 | // Unlike on Linux, -std=gnu++ doesn't set _GNU_SOURCE on Windows. | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 58 | "-D_GNU_SOURCE", | 
| Josh Gao | 2e1e789 | 2018-03-23 13:03:28 -0700 | [diff] [blame] | 59 |  | 
|  | 60 | // MinGW hides some things behind _POSIX_SOURCE. | 
|  | 61 | "-D_POSIX_SOURCE", | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 62 |  | 
| Josh Gao | 4710e53 | 2019-04-17 16:57:43 -0700 | [diff] [blame] | 63 | // libusb uses __stdcall on a variadic function, which gets ignored. | 
|  | 64 | "-Wno-ignored-attributes", | 
|  | 65 |  | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 66 | // Not supported yet. | 
|  | 67 | "-Wno-thread-safety", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 68 | ], | 
| Josh Gao | f8a97c1 | 2018-03-23 15:37:20 -0700 | [diff] [blame] | 69 |  | 
|  | 70 | host_ldlibs: [ | 
|  | 71 | "-lws2_32", | 
|  | 72 | "-lgdi32", | 
|  | 73 | "-luserenv", | 
|  | 74 | ], | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 75 | }, | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 76 | }, | 
|  | 77 | } | 
| Pirama Arumuga Nainar | 7982178 | 2018-06-01 11:31:38 -0700 | [diff] [blame] | 78 |  | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 79 | cc_defaults { | 
|  | 80 | name: "adbd_defaults", | 
|  | 81 | defaults: ["adb_defaults"], | 
|  | 82 |  | 
|  | 83 | cflags: ["-UADB_HOST", "-DADB_HOST=0"], | 
|  | 84 | product_variables: { | 
|  | 85 | debuggable: { | 
| Pirama Arumuga Nainar | 7982178 | 2018-06-01 11:31:38 -0700 | [diff] [blame] | 86 | cflags: [ | 
| Bowgo Tsai | 9b30c0a | 2019-03-12 04:25:33 +0800 | [diff] [blame] | 87 | "-UALLOW_ADBD_ROOT", | 
|  | 88 | "-DALLOW_ADBD_ROOT=1", | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 89 | "-DALLOW_ADBD_DISABLE_VERITY", | 
|  | 90 | "-DALLOW_ADBD_NO_AUTH", | 
| Pirama Arumuga Nainar | 7982178 | 2018-06-01 11:31:38 -0700 | [diff] [blame] | 91 | ], | 
|  | 92 | }, | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 93 | }, | 
|  | 94 | } | 
|  | 95 |  | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 96 | cc_defaults { | 
|  | 97 | name: "host_adbd_supported", | 
|  | 98 |  | 
|  | 99 | host_supported: true, | 
|  | 100 | target: { | 
|  | 101 | linux: { | 
|  | 102 | enabled: true, | 
|  | 103 | host_ldlibs: [ | 
|  | 104 | "-lresolv", // b64_pton | 
|  | 105 | "-lutil", // forkpty | 
|  | 106 | ], | 
|  | 107 | }, | 
|  | 108 | darwin: { | 
|  | 109 | enabled: false, | 
|  | 110 | }, | 
|  | 111 | windows: { | 
|  | 112 | enabled: false, | 
|  | 113 | }, | 
|  | 114 | }, | 
|  | 115 | } | 
|  | 116 |  | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 117 | // libadb | 
|  | 118 | // ========================================================= | 
|  | 119 | // These files are compiled for both the host and the device. | 
|  | 120 | libadb_srcs = [ | 
|  | 121 | "adb.cpp", | 
|  | 122 | "adb_io.cpp", | 
|  | 123 | "adb_listeners.cpp", | 
|  | 124 | "adb_trace.cpp", | 
| Josh Gao | 6e1246c | 2018-05-24 22:54:50 -0700 | [diff] [blame] | 125 | "adb_unique_fd.cpp", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 126 | "adb_utils.cpp", | 
| Josh Gao | 57e09b1 | 2019-06-28 13:50:37 -0700 | [diff] [blame] | 127 | "fdevent/fdevent.cpp", | 
| Josh Gao | 95068bb | 2019-07-08 15:23:17 -0700 | [diff] [blame] | 128 | "fdevent/fdevent_poll.cpp", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 129 | "services.cpp", | 
|  | 130 | "sockets.cpp", | 
|  | 131 | "socket_spec.cpp", | 
|  | 132 | "sysdeps/errno.cpp", | 
|  | 133 | "transport.cpp", | 
| Josh Gao | 6082e7d | 2018-04-05 16:16:04 -0700 | [diff] [blame] | 134 | "transport_fd.cpp", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 135 | "transport_local.cpp", | 
|  | 136 | "transport_usb.cpp", | 
|  | 137 | ] | 
|  | 138 |  | 
|  | 139 | libadb_posix_srcs = [ | 
|  | 140 | "sysdeps_unix.cpp", | 
|  | 141 | "sysdeps/posix/network.cpp", | 
|  | 142 | ] | 
|  | 143 |  | 
| Josh Gao | b43ad44 | 2019-07-11 13:47:44 -0700 | [diff] [blame] | 144 | libadb_linux_srcs = [ | 
|  | 145 | "fdevent/fdevent_epoll.cpp", | 
|  | 146 | ] | 
|  | 147 |  | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 148 | libadb_test_srcs = [ | 
|  | 149 | "adb_io_test.cpp", | 
|  | 150 | "adb_listeners_test.cpp", | 
|  | 151 | "adb_utils_test.cpp", | 
| Josh Gao | 57e09b1 | 2019-06-28 13:50:37 -0700 | [diff] [blame] | 152 | "fdevent/fdevent_test.cpp", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 153 | "socket_spec_test.cpp", | 
|  | 154 | "socket_test.cpp", | 
|  | 155 | "sysdeps_test.cpp", | 
|  | 156 | "sysdeps/stat_test.cpp", | 
|  | 157 | "transport_test.cpp", | 
| Josh Gao | 7c738cd | 2018-04-03 14:37:11 -0700 | [diff] [blame] | 158 | "types_test.cpp", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 159 | ] | 
|  | 160 |  | 
|  | 161 | cc_library_host_static { | 
|  | 162 | name: "libadb_host", | 
|  | 163 | defaults: ["adb_defaults"], | 
|  | 164 |  | 
|  | 165 | srcs: libadb_srcs + [ | 
|  | 166 | "client/auth.cpp", | 
|  | 167 | "client/usb_libusb.cpp", | 
|  | 168 | "client/usb_dispatch.cpp", | 
|  | 169 | "client/transport_mdns.cpp", | 
|  | 170 | ], | 
|  | 171 |  | 
| Dan Willemsen | ab971b5 | 2018-08-29 14:58:02 -0700 | [diff] [blame] | 172 | generated_headers: ["platform_tools_version"], | 
|  | 173 |  | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 174 | target: { | 
|  | 175 | linux: { | 
| Josh Gao | b43ad44 | 2019-07-11 13:47:44 -0700 | [diff] [blame] | 176 | srcs: ["client/usb_linux.cpp"] + libadb_linux_srcs, | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 177 | }, | 
|  | 178 | darwin: { | 
|  | 179 | srcs: ["client/usb_osx.cpp"], | 
|  | 180 | }, | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 181 | not_windows: { | 
|  | 182 | srcs: libadb_posix_srcs, | 
|  | 183 | }, | 
|  | 184 | windows: { | 
|  | 185 | enabled: true, | 
|  | 186 | srcs: [ | 
|  | 187 | "client/usb_windows.cpp", | 
|  | 188 | "sysdeps_win32.cpp", | 
|  | 189 | "sysdeps/win32/errno.cpp", | 
|  | 190 | "sysdeps/win32/stat.cpp", | 
|  | 191 | ], | 
|  | 192 | shared_libs: ["AdbWinApi"], | 
|  | 193 | }, | 
|  | 194 | }, | 
|  | 195 |  | 
|  | 196 | static_libs: [ | 
|  | 197 | "libbase", | 
|  | 198 | "libcrypto_utils", | 
|  | 199 | "libcrypto", | 
|  | 200 | "libdiagnose_usb", | 
|  | 201 | "libmdnssd", | 
|  | 202 | "libusb", | 
| Idries Hamadi | 269a4b4 | 2018-09-13 18:00:25 +0100 | [diff] [blame] | 203 | "libutils", | 
|  | 204 | "liblog", | 
|  | 205 | "libcutils", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 206 | ], | 
|  | 207 | } | 
|  | 208 |  | 
|  | 209 | cc_test_host { | 
|  | 210 | name: "adb_test", | 
|  | 211 | defaults: ["adb_defaults"], | 
|  | 212 | srcs: libadb_test_srcs, | 
|  | 213 | static_libs: [ | 
|  | 214 | "libadb_host", | 
|  | 215 | "libbase", | 
|  | 216 | "libcutils", | 
|  | 217 | "libcrypto_utils", | 
|  | 218 | "libcrypto", | 
|  | 219 | "libmdnssd", | 
|  | 220 | "libdiagnose_usb", | 
|  | 221 | "libusb", | 
|  | 222 | ], | 
| Josh Gao | f8a97c1 | 2018-03-23 15:37:20 -0700 | [diff] [blame] | 223 |  | 
|  | 224 | target: { | 
|  | 225 | windows: { | 
|  | 226 | enabled: true, | 
| Josh Gao | efd8ae2 | 2019-07-16 15:08:42 -0700 | [diff] [blame] | 227 | ldflags: ["-municode"], | 
| Josh Gao | f8a97c1 | 2018-03-23 15:37:20 -0700 | [diff] [blame] | 228 | shared_libs: ["AdbWinApi"], | 
|  | 229 | }, | 
|  | 230 | }, | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 231 | } | 
|  | 232 |  | 
| Josh Gao | 9c59649 | 2018-04-04 11:27:24 -0700 | [diff] [blame] | 233 | cc_benchmark { | 
|  | 234 | name: "adb_benchmark", | 
|  | 235 | defaults: ["adb_defaults"], | 
|  | 236 |  | 
|  | 237 | srcs: ["transport_benchmark.cpp"], | 
|  | 238 | target: { | 
|  | 239 | android: { | 
|  | 240 | static_libs: [ | 
|  | 241 | "libadbd", | 
|  | 242 | ], | 
|  | 243 | }, | 
|  | 244 | host: { | 
|  | 245 | static_libs: [ | 
|  | 246 | "libadb_host", | 
|  | 247 | ], | 
|  | 248 | }, | 
|  | 249 | }, | 
|  | 250 |  | 
|  | 251 | static_libs: [ | 
|  | 252 | "libbase", | 
|  | 253 | "libcutils", | 
|  | 254 | "libcrypto_utils", | 
| Colin Cross | f117f34 | 2019-09-18 11:04:35 -0700 | [diff] [blame] | 255 | "libcrypto_static", | 
| Josh Gao | 9c59649 | 2018-04-04 11:27:24 -0700 | [diff] [blame] | 256 | "libdiagnose_usb", | 
|  | 257 | "liblog", | 
|  | 258 | "libusb", | 
|  | 259 | ], | 
|  | 260 | } | 
|  | 261 |  | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 262 | cc_binary_host { | 
|  | 263 | name: "adb", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 264 |  | 
|  | 265 | defaults: ["adb_defaults"], | 
|  | 266 |  | 
|  | 267 | srcs: [ | 
|  | 268 | "client/adb_client.cpp", | 
|  | 269 | "client/bugreport.cpp", | 
|  | 270 | "client/commandline.cpp", | 
|  | 271 | "client/file_sync_client.cpp", | 
|  | 272 | "client/main.cpp", | 
|  | 273 | "client/console.cpp", | 
| Idries Hamadi | ed409ea | 2018-01-29 16:30:36 +0000 | [diff] [blame] | 274 | "client/adb_install.cpp", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 275 | "client/line_printer.cpp", | 
| Joshua Gilpatrick | af3ce08 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 276 | "client/fastdeploy.cpp", | 
|  | 277 | "client/fastdeploycallbacks.cpp", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 278 | "shell_service_protocol.cpp", | 
|  | 279 | ], | 
|  | 280 |  | 
| Joshua Gilpatrick | af3ce08 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 281 | generated_headers: [ | 
|  | 282 | "bin2c_fastdeployagent", | 
|  | 283 | "bin2c_fastdeployagentscript" | 
|  | 284 | ], | 
|  | 285 |  | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 286 | static_libs: [ | 
|  | 287 | "libadb_host", | 
| Joshua Gilpatrick | af3ce08 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 288 | "libandroidfw", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 289 | "libbase", | 
|  | 290 | "libcutils", | 
|  | 291 | "libcrypto_utils", | 
|  | 292 | "libcrypto", | 
| Joshua Gilpatrick | af3ce08 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 293 | "libfastdeploy_host", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 294 | "libdiagnose_usb", | 
|  | 295 | "liblog", | 
|  | 296 | "libmdnssd", | 
| Joshua Gilpatrick | af3ce08 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 297 | "libprotobuf-cpp-lite", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 298 | "libusb", | 
| Idries Hamadi | 269a4b4 | 2018-09-13 18:00:25 +0100 | [diff] [blame] | 299 | "libutils", | 
|  | 300 | "liblog", | 
| Joshua Gilpatrick | af3ce08 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 301 | "libziparchive", | 
|  | 302 | "libz", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 303 | ], | 
|  | 304 |  | 
|  | 305 | stl: "libc++_static", | 
|  | 306 |  | 
|  | 307 | // Don't add anything here, we don't want additional shared dependencies | 
|  | 308 | // on the host adb tool, and shared libraries that link against libc++ | 
|  | 309 | // will violate ODR | 
|  | 310 | shared_libs: [], | 
|  | 311 |  | 
| Dan Willemsen | 3f439a7 | 2018-11-19 19:11:35 -0800 | [diff] [blame] | 312 | // Archive adb, adb.exe. | 
|  | 313 | dist: { | 
|  | 314 | targets: [ | 
|  | 315 | "dist_files", | 
|  | 316 | "sdk", | 
|  | 317 | "win_sdk", | 
|  | 318 | ], | 
|  | 319 | }, | 
|  | 320 |  | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 321 | target: { | 
|  | 322 | darwin: { | 
|  | 323 | cflags: [ | 
|  | 324 | "-Wno-sizeof-pointer-memaccess", | 
|  | 325 | ], | 
|  | 326 | }, | 
|  | 327 | windows: { | 
|  | 328 | enabled: true, | 
|  | 329 | ldflags: ["-municode"], | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 330 | shared_libs: ["AdbWinApi"], | 
|  | 331 | required: [ | 
|  | 332 | "AdbWinUsbApi", | 
|  | 333 | ], | 
|  | 334 | }, | 
|  | 335 | }, | 
|  | 336 | } | 
|  | 337 |  | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 338 | // libadbd_core contains the common sources to build libadbd and libadbd_services. | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 339 | cc_library_static { | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 340 | name: "libadbd_core", | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 341 | defaults: ["adbd_defaults", "host_adbd_supported"], | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 342 | recovery_available: true, | 
|  | 343 |  | 
|  | 344 | // libminadbd wants both, as it's used to build native tests. | 
|  | 345 | compile_multilib: "both", | 
|  | 346 |  | 
| Josh Gao | b43ad44 | 2019-07-11 13:47:44 -0700 | [diff] [blame] | 347 | srcs: libadb_srcs + libadb_linux_srcs + libadb_posix_srcs + [ | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 348 | "daemon/auth.cpp", | 
|  | 349 | "daemon/jdwp_service.cpp", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 350 | ], | 
|  | 351 |  | 
|  | 352 | local_include_dirs: [ | 
|  | 353 | "daemon/include", | 
|  | 354 | ], | 
|  | 355 |  | 
| Dan Willemsen | ab971b5 | 2018-08-29 14:58:02 -0700 | [diff] [blame] | 356 | generated_headers: ["platform_tools_version"], | 
|  | 357 |  | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 358 | static_libs: [ | 
|  | 359 | "libdiagnose_usb", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 360 | ], | 
|  | 361 |  | 
|  | 362 | shared_libs: [ | 
| Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 363 | "libadbconnection_server", | 
| Josh Gao | 2752326 | 2019-10-22 12:30:39 -0700 | [diff] [blame] | 364 | "libadbd_auth", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 365 | "libasyncio", | 
|  | 366 | "libbase", | 
|  | 367 | "libcrypto", | 
|  | 368 | "libcrypto_utils", | 
|  | 369 | "libcutils", | 
|  | 370 | "liblog", | 
|  | 371 | ], | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 372 |  | 
|  | 373 | target: { | 
|  | 374 | android: { | 
|  | 375 | whole_static_libs: [ | 
|  | 376 | "libqemu_pipe", | 
|  | 377 | ], | 
|  | 378 | srcs: [ | 
|  | 379 | "daemon/transport_qemu.cpp", | 
|  | 380 | "daemon/usb.cpp", | 
|  | 381 | "daemon/usb_ffs.cpp", | 
|  | 382 | "daemon/usb_legacy.cpp", | 
|  | 383 | ] | 
|  | 384 | }, | 
|  | 385 | linux_glibc: { | 
|  | 386 | srcs: [ | 
|  | 387 | "daemon/usb_dummy.cpp", | 
|  | 388 | ] | 
|  | 389 | } | 
|  | 390 | }, | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 391 | } | 
|  | 392 |  | 
|  | 393 | cc_library { | 
|  | 394 | name: "libadbd_services", | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 395 | defaults: ["adbd_defaults", "host_adbd_supported"], | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 396 | recovery_available: true, | 
|  | 397 | compile_multilib: "both", | 
|  | 398 |  | 
|  | 399 | srcs: [ | 
|  | 400 | "daemon/file_sync_service.cpp", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 401 | "daemon/services.cpp", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 402 | "daemon/shell_service.cpp", | 
|  | 403 | "shell_service_protocol.cpp", | 
|  | 404 | ], | 
|  | 405 |  | 
|  | 406 | cflags: [ | 
|  | 407 | "-D_GNU_SOURCE", | 
|  | 408 | "-Wno-deprecated-declarations", | 
|  | 409 | ], | 
|  | 410 |  | 
|  | 411 | static_libs: [ | 
|  | 412 | "libadbd_core", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 413 | "libdiagnose_usb", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 414 | ], | 
|  | 415 |  | 
|  | 416 | shared_libs: [ | 
| Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 417 | "libadbconnection_server", | 
| Josh Gao | 2752326 | 2019-10-22 12:30:39 -0700 | [diff] [blame] | 418 | "libadbd_auth", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 419 | "libasyncio", | 
|  | 420 | "libbase", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 421 | "libcrypto", | 
|  | 422 | "libcrypto_utils", | 
|  | 423 | "libcutils", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 424 | "liblog", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 425 | ], | 
| Alex Buynytskyy | 640407d | 2018-12-12 10:48:50 -0800 | [diff] [blame] | 426 |  | 
|  | 427 | target: { | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 428 | android: { | 
|  | 429 | srcs: [ | 
|  | 430 | "daemon/abb_service.cpp", | 
|  | 431 | "daemon/framebuffer_service.cpp", | 
|  | 432 | "daemon/mdns.cpp", | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 433 | "daemon/restart_service.cpp", | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 434 | ], | 
|  | 435 | shared_libs: [ | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 436 | "libmdnssd", | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 437 | "libselinux", | 
|  | 438 | ], | 
|  | 439 | }, | 
| Alex Buynytskyy | 640407d | 2018-12-12 10:48:50 -0800 | [diff] [blame] | 440 | recovery: { | 
|  | 441 | exclude_srcs: [ | 
|  | 442 | "daemon/abb_service.cpp", | 
|  | 443 | ], | 
|  | 444 | }, | 
|  | 445 | }, | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 446 | } | 
|  | 447 |  | 
|  | 448 | cc_library { | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 449 | name: "libadbd", | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 450 | defaults: ["adbd_defaults", "host_adbd_supported"], | 
| Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 451 | recovery_available: true, | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 452 |  | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 453 | // Avoid getting duplicate symbol of android::build::GetBuildNumber(). | 
|  | 454 | use_version_lib: false, | 
|  | 455 |  | 
|  | 456 | // libminadbd wants both, as it's used to build native tests. | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 457 | compile_multilib: "both", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 458 |  | 
|  | 459 | // libadbd doesn't build any additional source, but to expose libadbd_core as a shared library. | 
|  | 460 | whole_static_libs: [ | 
|  | 461 | "libadbd_core", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 462 | ], | 
|  | 463 |  | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 464 | shared_libs: [ | 
| Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 465 | "libadbconnection_server", | 
| Josh Gao | 2752326 | 2019-10-22 12:30:39 -0700 | [diff] [blame] | 466 | "libadbd_auth", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 467 | "libadbd_services", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 468 | "libasyncio", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 469 | "libbase", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 470 | "libcrypto", | 
|  | 471 | "libcrypto_utils", | 
|  | 472 | "libcutils", | 
|  | 473 | "liblog", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 474 | ], | 
| Jerry Zhang | b156c60 | 2018-05-07 15:14:47 -0700 | [diff] [blame] | 475 |  | 
|  | 476 | export_include_dirs: [ | 
|  | 477 | "daemon/include", | 
|  | 478 | ], | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 479 | } | 
|  | 480 |  | 
|  | 481 | cc_binary { | 
|  | 482 | name: "adbd", | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 483 | defaults: ["adbd_defaults", "host_adbd_supported"], | 
| Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 484 | recovery_available: true, | 
| Josh Gao | 8db99f8 | 2018-03-06 12:57:27 -0800 | [diff] [blame] | 485 |  | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 486 | srcs: [ | 
|  | 487 | "daemon/main.cpp", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 488 | ], | 
|  | 489 |  | 
|  | 490 | cflags: [ | 
|  | 491 | "-D_GNU_SOURCE", | 
|  | 492 | "-Wno-deprecated-declarations", | 
|  | 493 | ], | 
|  | 494 |  | 
|  | 495 | strip: { | 
|  | 496 | keep_symbols: true, | 
|  | 497 | }, | 
|  | 498 |  | 
| Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 499 | stl: "libc++_static", | 
|  | 500 | static_libs: [ | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 501 | "libadbd", | 
| Josh Gao | 2752326 | 2019-10-22 12:30:39 -0700 | [diff] [blame] | 502 | "libadbd_auth", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 503 | "libadbd_services", | 
| Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 504 | "libasyncio", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 505 | "libbase", | 
|  | 506 | "libcap", | 
| Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 507 | "libcrypto_utils", | 
| Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 508 | "libcutils", | 
| Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 509 | "libdiagnose_usb", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 510 | "liblog", | 
| Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 511 | "libmdnssd", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 512 | "libminijail", | 
|  | 513 | "libselinux", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 514 | ], | 
| Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 515 |  | 
|  | 516 | shared_libs: [ | 
|  | 517 | "libadbconnection_server", | 
|  | 518 | "libcrypto", | 
|  | 519 | ], | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 520 | } | 
|  | 521 |  | 
| Josh Gao | 7b7ee19 | 2019-10-23 13:27:17 -0700 | [diff] [blame] | 522 | phony { | 
|  | 523 | name: "adbd_system_binaries", | 
|  | 524 | required: [ | 
|  | 525 | "abb", | 
| Josh Gao | 2752326 | 2019-10-22 12:30:39 -0700 | [diff] [blame] | 526 | "libadbd_auth", | 
| Josh Gao | 2c356bb | 2019-10-22 12:30:36 -0700 | [diff] [blame] | 527 | "reboot", | 
| Josh Gao | f61f414 | 2019-10-22 12:30:30 -0700 | [diff] [blame] | 528 | "set-verity-state", | 
| Josh Gao | 7b7ee19 | 2019-10-23 13:27:17 -0700 | [diff] [blame] | 529 | ] | 
|  | 530 | } | 
|  | 531 |  | 
|  | 532 | phony { | 
|  | 533 | name: "adbd_system_binaries_recovery", | 
|  | 534 | required: [ | 
| Josh Gao | 2c356bb | 2019-10-22 12:30:36 -0700 | [diff] [blame] | 535 | "reboot.recovery", | 
| Josh Gao | 7b7ee19 | 2019-10-23 13:27:17 -0700 | [diff] [blame] | 536 | ], | 
|  | 537 | } | 
|  | 538 |  | 
| Alex Buynytskyy | 640407d | 2018-12-12 10:48:50 -0800 | [diff] [blame] | 539 | cc_binary { | 
|  | 540 | name: "abb", | 
|  | 541 |  | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 542 | defaults: ["adbd_defaults"], | 
| Alex Buynytskyy | 640407d | 2018-12-12 10:48:50 -0800 | [diff] [blame] | 543 | recovery_available: false, | 
|  | 544 |  | 
|  | 545 | srcs: [ | 
|  | 546 | "daemon/abb.cpp", | 
|  | 547 | ], | 
|  | 548 |  | 
|  | 549 | cflags: [ | 
|  | 550 | "-D_GNU_SOURCE", | 
|  | 551 | "-Wno-deprecated-declarations", | 
|  | 552 | ], | 
|  | 553 |  | 
|  | 554 | strip: { | 
|  | 555 | keep_symbols: true, | 
|  | 556 | }, | 
|  | 557 |  | 
|  | 558 | static_libs: [ | 
|  | 559 | "libadbd_core", | 
|  | 560 | "libadbd_services", | 
|  | 561 | "libcmd", | 
|  | 562 | ], | 
|  | 563 |  | 
|  | 564 | shared_libs: [ | 
|  | 565 | "libbase", | 
|  | 566 | "libbinder", | 
|  | 567 | "liblog", | 
|  | 568 | "libutils", | 
|  | 569 | "libselinux", | 
|  | 570 | ], | 
|  | 571 | } | 
|  | 572 |  | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 573 | cc_test { | 
|  | 574 | name: "adbd_test", | 
| Josh Gao | 776c2ec | 2019-01-22 19:36:15 -0800 | [diff] [blame] | 575 | defaults: ["adbd_defaults"], | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 576 | srcs: libadb_test_srcs + [ | 
| Josh Gao | 997cfac | 2018-07-25 18:15:52 -0700 | [diff] [blame] | 577 | "daemon/services.cpp", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 578 | "daemon/shell_service.cpp", | 
|  | 579 | "daemon/shell_service_test.cpp", | 
|  | 580 | "shell_service_protocol.cpp", | 
|  | 581 | "shell_service_protocol_test.cpp", | 
|  | 582 | ], | 
|  | 583 |  | 
|  | 584 | static_libs: [ | 
|  | 585 | "libadbd", | 
| Josh Gao | 2752326 | 2019-10-22 12:30:39 -0700 | [diff] [blame] | 586 | "libadbd_auth", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 587 | "libbase", | 
|  | 588 | "libcutils", | 
|  | 589 | "libcrypto_utils", | 
| Colin Cross | f117f34 | 2019-09-18 11:04:35 -0700 | [diff] [blame] | 590 | "libcrypto_static", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 591 | "libdiagnose_usb", | 
|  | 592 | "liblog", | 
|  | 593 | "libusb", | 
|  | 594 | "libmdnssd", | 
| Jiyong Park | 011ee12 | 2018-05-29 16:41:30 +0900 | [diff] [blame] | 595 | "libselinux", | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 596 | ], | 
| Elliott Hughes | 40fdf3f | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 597 | test_suites: ["device-tests"], | 
| Dan Shi | d1360f4 | 2019-09-24 09:04:05 -0700 | [diff] [blame] | 598 | require_root: true, | 
| Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 599 | } | 
|  | 600 |  | 
| Julien Desprez | 75fea7e | 2018-08-08 12:08:50 -0700 | [diff] [blame] | 601 | python_test_host { | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 602 | name: "adb_integration_test_adb", | 
|  | 603 | main: "test_adb.py", | 
|  | 604 | srcs: [ | 
|  | 605 | "test_adb.py", | 
|  | 606 | ], | 
| Julien Desprez | 75fea7e | 2018-08-08 12:08:50 -0700 | [diff] [blame] | 607 | test_config: "adb_integration_test_adb.xml", | 
|  | 608 | test_suites: ["general-tests"], | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 609 | version: { | 
|  | 610 | py2: { | 
| Josh Gao | 9b6522b | 2018-08-07 14:31:17 -0700 | [diff] [blame] | 611 | enabled: false, | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 612 | }, | 
|  | 613 | py3: { | 
| Josh Gao | 9b6522b | 2018-08-07 14:31:17 -0700 | [diff] [blame] | 614 | enabled: true, | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 615 | }, | 
| GuangHui Liu | 41bda34 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 616 | }, | 
| GuangHui Liu | 41bda34 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 617 | } | 
|  | 618 |  | 
| Julien Desprez | 618f0e1 | 2018-10-12 13:48:14 -0700 | [diff] [blame] | 619 | python_test_host { | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 620 | name: "adb_integration_test_device", | 
|  | 621 | main: "test_device.py", | 
|  | 622 | srcs: [ | 
|  | 623 | "test_device.py", | 
|  | 624 | ], | 
|  | 625 | libs: [ | 
|  | 626 | "adb_py", | 
|  | 627 | ], | 
| Julien Desprez | 618f0e1 | 2018-10-12 13:48:14 -0700 | [diff] [blame] | 628 | test_config: "adb_integration_test_device.xml", | 
|  | 629 | test_suites: ["general-tests"], | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 630 | version: { | 
|  | 631 | py2: { | 
|  | 632 | enabled: true, | 
|  | 633 | }, | 
|  | 634 | py3: { | 
|  | 635 | enabled: false, | 
|  | 636 | }, | 
| GuangHui Liu | 41bda34 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 637 | }, | 
| GuangHui Liu | 41bda34 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 638 | } | 
| Joshua Gilpatrick | af3ce08 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 639 |  | 
|  | 640 | // Note: using pipe for xxd to control the variable name generated | 
|  | 641 | // the default name used by xxd is the path to the input file. | 
|  | 642 | java_genrule { | 
|  | 643 | name: "bin2c_fastdeployagent", | 
|  | 644 | out: ["deployagent.inc"], | 
|  | 645 | srcs: [":deployagent"], | 
|  | 646 | cmd: "(echo 'unsigned char kDeployAgent[] = {' && xxd -i <$(in) && echo '};') > $(out)", | 
|  | 647 | } | 
|  | 648 |  | 
|  | 649 | genrule { | 
|  | 650 | name: "bin2c_fastdeployagentscript", | 
|  | 651 | out: ["deployagentscript.inc"], | 
|  | 652 | srcs: ["fastdeploy/deployagent/deployagent.sh"], | 
|  | 653 | cmd: "(echo 'unsigned char kDeployAgentScript[] = {' && xxd -i <$(in) && echo '};') > $(out)", | 
|  | 654 | } | 
|  | 655 |  | 
|  | 656 | cc_library_host_static { | 
|  | 657 | name: "libfastdeploy_host", | 
|  | 658 | defaults: ["adb_defaults"], | 
|  | 659 | srcs: [ | 
| Alex Buynytskyy | 665f3ff | 2019-09-16 12:10:54 -0700 | [diff] [blame] | 660 | "fastdeploy/deploypatchgenerator/apk_archive.cpp", | 
| Joshua Gilpatrick | af3ce08 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 661 | "fastdeploy/deploypatchgenerator/deploy_patch_generator.cpp", | 
|  | 662 | "fastdeploy/deploypatchgenerator/patch_utils.cpp", | 
|  | 663 | "fastdeploy/proto/ApkEntry.proto", | 
|  | 664 | ], | 
|  | 665 | static_libs: [ | 
|  | 666 | "libadb_host", | 
|  | 667 | "libandroidfw", | 
|  | 668 | "libbase", | 
|  | 669 | "libcutils", | 
|  | 670 | "libcrypto_utils", | 
|  | 671 | "libcrypto", | 
|  | 672 | "libdiagnose_usb", | 
|  | 673 | "liblog", | 
|  | 674 | "libmdnssd", | 
|  | 675 | "libusb", | 
|  | 676 | "libutils", | 
|  | 677 | "libziparchive", | 
|  | 678 | "libz", | 
|  | 679 | ], | 
|  | 680 | stl: "libc++_static", | 
|  | 681 | proto: { | 
|  | 682 | type: "lite", | 
|  | 683 | export_proto_headers: true, | 
|  | 684 | }, | 
|  | 685 | target: { | 
|  | 686 | windows: { | 
|  | 687 | enabled: true, | 
|  | 688 | shared_libs: ["AdbWinApi"], | 
|  | 689 | }, | 
|  | 690 | }, | 
|  | 691 | } | 
|  | 692 |  | 
|  | 693 | cc_test_host { | 
|  | 694 | name: "fastdeploy_test", | 
|  | 695 | defaults: ["adb_defaults"], | 
|  | 696 | srcs: [ | 
| Alex Buynytskyy | 665f3ff | 2019-09-16 12:10:54 -0700 | [diff] [blame] | 697 | "fastdeploy/deploypatchgenerator/apk_archive_test.cpp", | 
| Joshua Gilpatrick | af3ce08 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 698 | "fastdeploy/deploypatchgenerator/deploy_patch_generator_test.cpp", | 
|  | 699 | "fastdeploy/deploypatchgenerator/patch_utils_test.cpp", | 
|  | 700 | ], | 
|  | 701 | static_libs: [ | 
|  | 702 | "libadb_host", | 
|  | 703 | "libandroidfw", | 
|  | 704 | "libbase", | 
|  | 705 | "libcutils", | 
|  | 706 | "libcrypto_utils", | 
|  | 707 | "libcrypto", | 
|  | 708 | "libdiagnose_usb", | 
|  | 709 | "libfastdeploy_host", | 
|  | 710 | "liblog", | 
|  | 711 | "libmdnssd", | 
|  | 712 | "libprotobuf-cpp-lite", | 
|  | 713 | "libusb", | 
|  | 714 | "libutils", | 
|  | 715 | "libziparchive", | 
|  | 716 | "libz", | 
|  | 717 | ], | 
|  | 718 | target: { | 
|  | 719 | windows: { | 
|  | 720 | enabled: true, | 
|  | 721 | shared_libs: ["AdbWinApi"], | 
|  | 722 | }, | 
|  | 723 | }, | 
|  | 724 | data: [ | 
| Alex Buynytskyy | 665f3ff | 2019-09-16 12:10:54 -0700 | [diff] [blame] | 725 | "fastdeploy/testdata/rotating_cube-metadata-release.data", | 
| Joshua Gilpatrick | af3ce08 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 726 | "fastdeploy/testdata/rotating_cube-release.apk", | 
| Alex Buynytskyy | 665f3ff | 2019-09-16 12:10:54 -0700 | [diff] [blame] | 727 | "fastdeploy/testdata/sample.apk", | 
|  | 728 | "fastdeploy/testdata/sample.cd", | 
| Joshua Gilpatrick | af3ce08 | 2019-07-19 09:42:12 -0700 | [diff] [blame] | 729 | ], | 
|  | 730 | } | 
| Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 731 |  | 
|  | 732 | prebuilt_etc { | 
|  | 733 | name: "com.android.adbd.ld.config.txt", | 
|  | 734 | src: "apex/ld.config.txt", | 
|  | 735 | filename: "ld.config.txt", | 
|  | 736 | installable: false, | 
|  | 737 | } | 
|  | 738 |  | 
|  | 739 | apex { | 
|  | 740 | name: "com.android.adbd", | 
|  | 741 | manifest: "apex/apex_manifest.json", | 
|  | 742 |  | 
|  | 743 | binaries: ["adbd"], | 
|  | 744 | prebuilts: ["com.android.adbd.init.rc", "com.android.adbd.ld.config.txt"], | 
|  | 745 |  | 
|  | 746 | key: "com.android.adbd.key", | 
|  | 747 | certificate: ":com.android.adbd.certificate", | 
|  | 748 | } | 
|  | 749 |  | 
|  | 750 | apex_key { | 
|  | 751 | name: "com.android.adbd.key", | 
|  | 752 | public_key: "apex/com.android.adbd.avbpubkey", | 
|  | 753 | private_key: "apex/com.android.adbd.pem", | 
|  | 754 | } | 
|  | 755 |  | 
|  | 756 | android_app_certificate { | 
|  | 757 | name: "com.android.adbd.certificate", | 
|  | 758 | certificate: "apex/com.android.adbd", | 
|  | 759 | } | 
|  | 760 |  | 
|  | 761 | prebuilt_etc { | 
|  | 762 | name: "com.android.adbd.init.rc", | 
|  | 763 | src: "apex/adbd.rc", | 
|  | 764 | filename: "init.rc", | 
|  | 765 | installable: false, | 
|  | 766 | } |