Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 1 | // Copyright (C) 2019 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 | 832c9cd | 2019-09-27 23:32:00 -0700 | [diff] [blame] | 24 | cc_defaults { |
| 25 | name: "librecovery_utils_defaults", |
| 26 | |
| 27 | defaults: [ |
| 28 | "recovery_defaults", |
| 29 | ], |
| 30 | |
| 31 | shared_libs: [ |
| 32 | "android.hardware.health@2.0", |
| 33 | "libbase", |
Yifan Hong | 67a8fd2 | 2021-11-30 16:39:00 -0800 | [diff] [blame] | 34 | "libbinder_ndk", |
Tao Bao | 832c9cd | 2019-09-27 23:32:00 -0700 | [diff] [blame] | 35 | "libext4_utils", |
| 36 | "libfs_mgr", |
| 37 | "libhidlbase", |
| 38 | "libselinux", |
| 39 | "libutils", |
| 40 | ], |
| 41 | |
| 42 | static_libs: [ |
| 43 | "libotautil", |
| 44 | |
| 45 | // External dependencies. |
Yifan Hong | 67a8fd2 | 2021-11-30 16:39:00 -0800 | [diff] [blame] | 46 | "android.hardware.health-translate-ndk", |
Tao Bao | 832c9cd | 2019-09-27 23:32:00 -0700 | [diff] [blame] | 47 | "libfstab", |
| 48 | "libhealthhalutils", |
Yifan Hong | 67a8fd2 | 2021-11-30 16:39:00 -0800 | [diff] [blame] | 49 | "libhealthshim", |
Tao Bao | 832c9cd | 2019-09-27 23:32:00 -0700 | [diff] [blame] | 50 | ], |
| 51 | } |
| 52 | |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 53 | // A utility lib that's local to recovery (in contrast, libotautil is exposed to device-specific |
| 54 | // recovery_ui lib as well as device-specific updater). |
| 55 | cc_library_static { |
| 56 | name: "librecovery_utils", |
| 57 | |
| 58 | recovery_available: true, |
| 59 | |
| 60 | defaults: [ |
Tao Bao | 832c9cd | 2019-09-27 23:32:00 -0700 | [diff] [blame] | 61 | "librecovery_utils_defaults", |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 62 | ], |
| 63 | |
| 64 | srcs: [ |
Tao Bao | 832c9cd | 2019-09-27 23:32:00 -0700 | [diff] [blame] | 65 | "battery_utils.cpp", |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 66 | "logging.cpp", |
| 67 | "parse_install_logs.cpp", |
| 68 | "roots.cpp", |
| 69 | "thermalutil.cpp", |
| 70 | ], |
| 71 | |
Tao Bao | 640175e | 2019-10-01 23:24:30 -0700 | [diff] [blame] | 72 | header_libs: [ |
| 73 | "libvold_headers", |
| 74 | ], |
| 75 | |
Yifan Hong | 67a8fd2 | 2021-11-30 16:39:00 -0800 | [diff] [blame] | 76 | shared_libs: [ |
| 77 | // The following cannot be placed in librecovery_utils_defaults, |
| 78 | // because at the time of writing, android.hardware.health-V1-ndk.so |
| 79 | // is not installed to the system image yet. (It is installed |
| 80 | // to the recovery ramdisk.) Hence, minadbd_test must link to it |
| 81 | // statically. |
| 82 | "android.hardware.health-V1-ndk", |
| 83 | ], |
| 84 | |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 85 | export_include_dirs: [ |
| 86 | "include", |
| 87 | ], |
| 88 | |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 89 | export_static_lib_headers: [ |
Tao Bao | 640175e | 2019-10-01 23:24:30 -0700 | [diff] [blame] | 90 | // roots.h includes <fstab/fstab.h>. |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 91 | "libfstab", |
| 92 | ], |
| 93 | |
| 94 | // Should avoid exposing to the libs that might be used in device-specific codes (e.g. |
| 95 | // libedify, libotautil, librecovery_ui). |
| 96 | visibility: [ |
| 97 | "//bootable/recovery", |
| 98 | "//bootable/recovery/install", |
Tao Bao | b548bea | 2019-09-30 16:16:07 -0700 | [diff] [blame] | 99 | "//bootable/recovery/minadbd", |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 100 | "//bootable/recovery/tests", |
| 101 | ], |
| 102 | } |