2019-10-01 20:55:36 +02:00
|
|
|
// Copyright (C) 2019 The Android Open Source Project
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
2021-02-13 03:00:57 +01:00
|
|
|
package {
|
|
|
|
// See: http://go/android-license-faq
|
|
|
|
// A large-scale-change added 'default_applicable_licenses' to import
|
|
|
|
// all of the 'license_kinds' from "bootable_recovery_license"
|
|
|
|
// to get the below license kinds:
|
|
|
|
// SPDX-license-identifier-Apache-2.0
|
|
|
|
default_applicable_licenses: ["bootable_recovery_license"],
|
|
|
|
}
|
|
|
|
|
2019-09-28 08:32:00 +02:00
|
|
|
cc_defaults {
|
|
|
|
name: "librecovery_utils_defaults",
|
|
|
|
|
|
|
|
defaults: [
|
|
|
|
"recovery_defaults",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"android.hardware.health@2.0",
|
|
|
|
"libbase",
|
2021-12-01 01:39:00 +01:00
|
|
|
"libbinder_ndk",
|
2019-09-28 08:32:00 +02:00
|
|
|
"libext4_utils",
|
|
|
|
"libfs_mgr",
|
|
|
|
"libhidlbase",
|
|
|
|
"libselinux",
|
|
|
|
"libutils",
|
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"libotautil",
|
|
|
|
|
|
|
|
// External dependencies.
|
2021-12-01 01:39:00 +01:00
|
|
|
"android.hardware.health-translate-ndk",
|
2019-09-28 08:32:00 +02:00
|
|
|
"libfstab",
|
|
|
|
"libhealthhalutils",
|
2021-12-01 01:39:00 +01:00
|
|
|
"libhealthshim",
|
2019-09-28 08:32:00 +02:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2019-10-01 20:55:36 +02:00
|
|
|
// A utility lib that's local to recovery (in contrast, libotautil is exposed to device-specific
|
|
|
|
// recovery_ui lib as well as device-specific updater).
|
|
|
|
cc_library_static {
|
|
|
|
name: "librecovery_utils",
|
|
|
|
|
|
|
|
recovery_available: true,
|
|
|
|
|
|
|
|
defaults: [
|
2019-09-28 08:32:00 +02:00
|
|
|
"librecovery_utils_defaults",
|
2019-10-01 20:55:36 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
srcs: [
|
2019-09-28 08:32:00 +02:00
|
|
|
"battery_utils.cpp",
|
2019-10-01 20:55:36 +02:00
|
|
|
"logging.cpp",
|
|
|
|
"parse_install_logs.cpp",
|
|
|
|
"roots.cpp",
|
|
|
|
"thermalutil.cpp",
|
|
|
|
],
|
|
|
|
|
2019-10-02 08:24:30 +02:00
|
|
|
header_libs: [
|
|
|
|
"libvold_headers",
|
2019-10-01 20:55:36 +02:00
|
|
|
],
|
|
|
|
|
2021-12-01 01:39:00 +01:00
|
|
|
shared_libs: [
|
|
|
|
// The following cannot be placed in librecovery_utils_defaults,
|
2022-11-24 13:45:47 +01:00
|
|
|
// because at the time of writing, android.hardware.health-V2-ndk.so
|
2021-12-01 01:39:00 +01:00
|
|
|
// is not installed to the system image yet. (It is installed
|
|
|
|
// to the recovery ramdisk.) Hence, minadbd_test must link to it
|
|
|
|
// statically.
|
2022-11-24 13:45:47 +01:00
|
|
|
"android.hardware.health-V2-ndk",
|
2021-12-01 01:39:00 +01:00
|
|
|
],
|
|
|
|
|
2019-10-02 08:24:30 +02:00
|
|
|
export_include_dirs: [
|
|
|
|
"include",
|
2019-10-01 20:55:36 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
export_static_lib_headers: [
|
2019-10-02 08:24:30 +02:00
|
|
|
// roots.h includes <fstab/fstab.h>.
|
2019-10-01 20:55:36 +02:00
|
|
|
"libfstab",
|
|
|
|
],
|
|
|
|
|
|
|
|
// Should avoid exposing to the libs that might be used in device-specific codes (e.g.
|
|
|
|
// libedify, libotautil, librecovery_ui).
|
|
|
|
visibility: [
|
|
|
|
"//bootable/recovery",
|
|
|
|
"//bootable/recovery/install",
|
2019-10-01 01:16:07 +02:00
|
|
|
"//bootable/recovery/minadbd",
|
2019-10-01 20:55:36 +02:00
|
|
|
"//bootable/recovery/tests",
|
|
|
|
],
|
|
|
|
}
|