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