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 "android.hardware.health-V1-ndk", // from librecovery_utils 101 "libbase", 102 "libcrypto", 103 ], 104 105 static_libs: [ 106 "libminadbd_services", 107 "libfusesideload", 108 "librecovery_utils", 109 ], 110 111 required: [ 112 "adbd_system_api_recovery", 113 ] 114} 115 116cc_test { 117 name: "minadbd_test", 118 isolated: true, 119 120 defaults: [ 121 "minadbd_defaults", 122 "librecovery_utils_defaults", 123 "libadbd_binary_dependencies", 124 ], 125 126 srcs: [ 127 "fuse_adb_provider_test.cpp", 128 "minadbd_services_test.cpp", 129 ], 130 131 static_libs: [ 132 "android.hardware.health-V1-ndk", // from librecovery_utils 133 "libminadbd_services", 134 "libfusesideload", 135 "librecovery_utils", 136 "libotautil", 137 ], 138 139 shared_libs: [ 140 "libbase", 141 "libcrypto", 142 "libcutils", 143 "liblog", 144 ], 145 146 test_suites: [ 147 "device-tests", 148 ], 149 require_root: true, 150} 151