Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 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 | |
Bob Badour | 29be3f6 | 2021-02-12 18:00:57 -0800 | [diff] [blame] | 15 | package { |
| 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 | |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 24 | cc_defaults { |
| 25 | name: "minadbd_defaults", |
| 26 | |
| 27 | cflags: [ |
| 28 | "-DADB_HOST=0", |
| 29 | "-Wall", |
| 30 | "-Werror", |
| 31 | ], |
| 32 | |
Tao Bao | 5de19e2 | 2019-01-02 09:35:59 -0800 | [diff] [blame] | 33 | cpp_std: "experimental", |
| 34 | |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 35 | include_dirs: [ |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 36 | "bootable/recovery/otautil/include", |
Baligh Uddin | 0e313c1 | 2020-10-18 15:07:17 +0000 | [diff] [blame] | 37 | "packages/modules/adb", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 38 | ], |
Tao Bao | 3305d48 | 2019-09-26 00:02:29 -0700 | [diff] [blame] | 39 | |
| 40 | header_libs: [ |
| 41 | "libminadbd_headers", |
| 42 | ], |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 43 | } |
| 44 | |
Tao Bao | 7d2a63a | 2018-08-13 11:15:29 -0700 | [diff] [blame] | 45 | // `libminadbd_services` is analogous to the `libadbd_services` for regular `adbd`, but providing |
| 46 | // the sideload service only. |
Josh Gao | 22beef1 | 2020-03-27 20:37:07 -0700 | [diff] [blame] | 47 | cc_library_static { |
Tao Bao | 7d2a63a | 2018-08-13 11:15:29 -0700 | [diff] [blame] | 48 | name: "libminadbd_services", |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 49 | recovery_available: true, |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 50 | |
| 51 | defaults: [ |
| 52 | "minadbd_defaults", |
Tao Bao | b548bea | 2019-09-30 16:16:07 -0700 | [diff] [blame] | 53 | "librecovery_utils_defaults", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 54 | ], |
| 55 | |
| 56 | srcs: [ |
| 57 | "fuse_adb_provider.cpp", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 58 | "minadbd_services.cpp", |
| 59 | ], |
| 60 | |
xunchang | 311e6ca | 2019-03-22 08:54:35 -0700 | [diff] [blame] | 61 | static_libs: [ |
Tao Bao | b548bea | 2019-09-30 16:16:07 -0700 | [diff] [blame] | 62 | "librecovery_utils", |
xunchang | 311e6ca | 2019-03-22 08:54:35 -0700 | [diff] [blame] | 63 | "libotautil", |
| 64 | ], |
| 65 | |
Tao Bao | 7d2a63a | 2018-08-13 11:15:29 -0700 | [diff] [blame] | 66 | shared_libs: [ |
| 67 | "libadbd", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 68 | "libbase", |
| 69 | "libcrypto", |
Tao Bao | 7d2a63a | 2018-08-13 11:15:29 -0700 | [diff] [blame] | 70 | "libfusesideload", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 71 | ], |
| 72 | } |
| 73 | |
xunchang | 95d6732 | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 74 | cc_library_headers { |
| 75 | name: "libminadbd_headers", |
| 76 | recovery_available: true, |
xunchang | 95d6732 | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 77 | export_include_dirs: [ |
Tao Bao | 3305d48 | 2019-09-26 00:02:29 -0700 | [diff] [blame] | 78 | "include", |
| 79 | ], |
| 80 | // adb_install.cpp |
| 81 | visibility: [ |
| 82 | "//bootable/recovery/install", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 83 | "//bootable/recovery/twrpinstall", |
xunchang | 95d6732 | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 84 | ], |
| 85 | } |
| 86 | |
| 87 | cc_binary { |
| 88 | name: "minadbd", |
| 89 | recovery: true, |
| 90 | |
| 91 | defaults: [ |
| 92 | "minadbd_defaults", |
Josh Gao | 22beef1 | 2020-03-27 20:37:07 -0700 | [diff] [blame] | 93 | "libadbd_binary_dependencies", |
| 94 | "librecovery_utils_defaults", |
xunchang | 95d6732 | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 95 | ], |
| 96 | |
| 97 | srcs: [ |
| 98 | "minadbd.cpp", |
| 99 | ], |
| 100 | |
| 101 | shared_libs: [ |
xunchang | 95d6732 | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 102 | "libbase", |
| 103 | "libcrypto", |
xunchang | 95d6732 | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 104 | ], |
Josh Gao | 22beef1 | 2020-03-27 20:37:07 -0700 | [diff] [blame] | 105 | |
| 106 | static_libs: [ |
xunchang | 34690ce | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 107 | "libminadbd_services", |
Josh Gao | 22beef1 | 2020-03-27 20:37:07 -0700 | [diff] [blame] | 108 | "libfusesideload", |
| 109 | "librecovery_utils", |
xunchang | 34690ce | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 110 | ], |
Josh Gao | a91e456 | 2019-10-22 16:10:48 -0700 | [diff] [blame] | 111 | |
| 112 | required: [ |
Josh Gao | 4473e16 | 2020-06-01 18:58:57 -0700 | [diff] [blame] | 113 | "adbd_system_api_recovery", |
Josh Gao | a91e456 | 2019-10-22 16:10:48 -0700 | [diff] [blame] | 114 | ] |
xunchang | 95d6732 | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 115 | } |
| 116 | |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 117 | cc_test { |
| 118 | name: "minadbd_test", |
Christopher Ferris | 272467d | 2018-08-22 19:38:49 -0700 | [diff] [blame] | 119 | isolated: true, |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 120 | |
| 121 | defaults: [ |
| 122 | "minadbd_defaults", |
Tao Bao | b548bea | 2019-09-30 16:16:07 -0700 | [diff] [blame] | 123 | "librecovery_utils_defaults", |
Josh Gao | 22beef1 | 2020-03-27 20:37:07 -0700 | [diff] [blame] | 124 | "libadbd_binary_dependencies", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 125 | ], |
| 126 | |
| 127 | srcs: [ |
| 128 | "fuse_adb_provider_test.cpp", |
xunchang | 23f15fc | 2019-04-17 14:43:58 -0700 | [diff] [blame] | 129 | "minadbd_services_test.cpp", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 130 | ], |
| 131 | |
| 132 | static_libs: [ |
Tao Bao | 7d2a63a | 2018-08-13 11:15:29 -0700 | [diff] [blame] | 133 | "libminadbd_services", |
xunchang | ea2912f | 2019-03-17 16:45:12 -0700 | [diff] [blame] | 134 | "libfusesideload", |
Tao Bao | b548bea | 2019-09-30 16:16:07 -0700 | [diff] [blame] | 135 | "librecovery_utils", |
xunchang | 311e6ca | 2019-03-22 08:54:35 -0700 | [diff] [blame] | 136 | "libotautil", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 137 | ], |
| 138 | |
| 139 | shared_libs: [ |
| 140 | "libbase", |
Pete Bentley | 189d424 | 2019-09-12 19:53:46 +0100 | [diff] [blame] | 141 | "libcrypto", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 142 | "libcutils", |
| 143 | "liblog", |
| 144 | ], |
| 145 | |
| 146 | test_suites: [ |
| 147 | "device-tests", |
| 148 | ], |
Kelvin Zhang | d7ae5a0 | 2020-08-24 14:33:03 -0400 | [diff] [blame] | 149 | require_root: true, |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 150 | } |