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