• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2018 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    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "bootable_recovery_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["bootable_recovery_license"],
22}
23
24cc_defaults {
25    name: "minadbd_defaults",
26
27    cflags: [
28        "-DADB_HOST=0",
29        "-Wall",
30        "-Werror",
31    ],
32
33    cpp_std: "experimental",
34
35    include_dirs: [
36        "packages/modules/adb",
37    ],
38
39    header_libs: [
40        "libminadbd_headers",
41    ],
42}
43
44// `libminadbd_services` is analogous to the `libadbd_services` for regular `adbd`, but providing
45// the sideload service only.
46cc_library_static {
47    name: "libminadbd_services",
48    recovery_available: true,
49
50    defaults: [
51        "minadbd_defaults",
52        "librecovery_utils_defaults",
53    ],
54
55    srcs: [
56        "fuse_adb_provider.cpp",
57        "minadbd_services.cpp",
58    ],
59
60    static_libs: [
61        "librecovery_utils",
62        "libotautil",
63    ],
64
65    shared_libs: [
66        "libadbd",
67        "libbase",
68        "libcrypto",
69        "libfusesideload",
70    ],
71}
72
73cc_library_headers {
74    name: "libminadbd_headers",
75    recovery_available: true,
76    export_include_dirs: [
77        "include",
78    ],
79    // adb_install.cpp
80    visibility: [
81        "//bootable/recovery/install",
82    ],
83}
84
85cc_binary {
86    name: "minadbd",
87    recovery: true,
88
89    defaults: [
90        "minadbd_defaults",
91        "libadbd_binary_dependencies",
92        "librecovery_utils_defaults",
93    ],
94
95    srcs: [
96        "minadbd.cpp",
97    ],
98
99    shared_libs: [
100        "libbase",
101        "libcrypto",
102    ],
103
104    static_libs: [
105        "libminadbd_services",
106        "libfusesideload",
107        "librecovery_utils",
108    ],
109
110    required: [
111        "adbd_system_api_recovery",
112    ]
113}
114
115cc_test {
116    name: "minadbd_test",
117    isolated: true,
118
119    defaults: [
120        "minadbd_defaults",
121        "librecovery_utils_defaults",
122        "libadbd_binary_dependencies",
123    ],
124
125    srcs: [
126        "fuse_adb_provider_test.cpp",
127        "minadbd_services_test.cpp",
128    ],
129
130    static_libs: [
131        "libminadbd_services",
132        "libfusesideload",
133        "librecovery_utils",
134        "libotautil",
135    ],
136
137    shared_libs: [
138        "libbase",
139        "libcrypto",
140        "libcutils",
141        "liblog",
142    ],
143
144    test_suites: [
145        "device-tests",
146    ],
147    require_root: true,
148}
149