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