2018-03-24 07:24:25 +01:00
|
|
|
// Copyright (C) 2018 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
|
|
|
// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
|
|
|
|
// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
|
|
|
|
// DEPENDING ON IT IN YOUR PROJECT. ***
|
|
|
|
package {
|
|
|
|
default_applicable_licenses: ["bootable_recovery_license"],
|
|
|
|
}
|
|
|
|
|
|
|
|
// Added automatically by a large-scale-change that took the approach of
|
|
|
|
// 'apply every license found to every target'. While this makes sure we respect
|
|
|
|
// every license restriction, it may not be entirely correct.
|
|
|
|
//
|
|
|
|
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
|
|
|
|
//
|
|
|
|
// Please consider splitting the single license below into multiple licenses,
|
|
|
|
// taking care not to lose any license_kind information, and overriding the
|
|
|
|
// default license using the 'licenses: [...]' property on targets as needed.
|
|
|
|
//
|
|
|
|
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
|
|
|
|
// to attach the license to, and including a comment whether the files may be
|
|
|
|
// used in the current project.
|
|
|
|
// See: http://go/android-license-faq
|
|
|
|
license {
|
|
|
|
name: "bootable_recovery_license",
|
|
|
|
visibility: [":__subpackages__"],
|
|
|
|
license_kinds: [
|
|
|
|
"SPDX-license-identifier-Apache-2.0",
|
|
|
|
"SPDX-license-identifier-MIT",
|
|
|
|
"SPDX-license-identifier-OFL", // by exception only
|
|
|
|
],
|
|
|
|
license_text: [
|
|
|
|
"NOTICE",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2018-03-24 07:24:25 +01:00
|
|
|
cc_defaults {
|
|
|
|
name: "recovery_defaults",
|
|
|
|
|
|
|
|
cflags: [
|
2018-08-07 00:52:24 +02:00
|
|
|
"-D_FILE_OFFSET_BITS=64",
|
|
|
|
|
|
|
|
// Must be the same as RECOVERY_API_VERSION.
|
|
|
|
"-DRECOVERY_API_VERSION=3",
|
|
|
|
|
2018-03-24 07:24:25 +01:00
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2018-07-28 07:09:12 +02:00
|
|
|
cc_library_static {
|
|
|
|
name: "librecovery_fastboot",
|
|
|
|
recovery_available: true,
|
|
|
|
defaults: [
|
|
|
|
"recovery_defaults",
|
|
|
|
],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"fastboot/fastboot.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libbootloader_message",
|
|
|
|
"libcutils",
|
|
|
|
"liblog",
|
2018-08-20 22:40:47 +02:00
|
|
|
"librecovery_ui",
|
2018-07-28 07:09:12 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"librecovery_ui_default",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2018-08-07 23:38:51 +02:00
|
|
|
cc_defaults {
|
|
|
|
name: "librecovery_defaults",
|
|
|
|
|
|
|
|
defaults: [
|
|
|
|
"recovery_defaults",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
2019-10-15 22:22:20 +02:00
|
|
|
"android.hardware.boot@1.0",
|
|
|
|
"android.hardware.boot@1.1",
|
2018-08-07 23:38:51 +02:00
|
|
|
"libbase",
|
|
|
|
"libbootloader_message",
|
|
|
|
"libcrypto",
|
|
|
|
"libcutils",
|
|
|
|
"libfs_mgr",
|
2019-10-15 22:22:20 +02:00
|
|
|
"liblp",
|
2018-08-07 23:38:51 +02:00
|
|
|
"liblog",
|
2019-10-15 22:22:20 +02:00
|
|
|
"libprotobuf-cpp-lite",
|
2018-08-07 23:38:51 +02:00
|
|
|
"libziparchive",
|
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
2019-08-06 21:32:05 +02:00
|
|
|
"libc++fs",
|
2019-04-08 20:26:11 +02:00
|
|
|
"libinstall",
|
2018-07-28 07:09:12 +02:00
|
|
|
"librecovery_fastboot",
|
2018-08-07 23:38:51 +02:00
|
|
|
"libminui",
|
2019-10-01 20:55:36 +02:00
|
|
|
"librecovery_utils",
|
2018-08-07 23:38:51 +02:00
|
|
|
"libotautil",
|
2019-10-15 22:22:20 +02:00
|
|
|
"libsnapshot_nobinder",
|
2020-04-16 20:04:10 +02:00
|
|
|
"update_metadata-protos",
|
2018-08-07 23:38:51 +02:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_library_static {
|
|
|
|
name: "librecovery",
|
|
|
|
recovery_available: true,
|
|
|
|
|
|
|
|
defaults: [
|
|
|
|
"librecovery_defaults",
|
|
|
|
],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"recovery.cpp",
|
|
|
|
],
|
|
|
|
|
2018-08-20 22:40:47 +02:00
|
|
|
shared_libs: [
|
|
|
|
"librecovery_ui",
|
|
|
|
],
|
2019-03-12 20:40:14 +01:00
|
|
|
}
|
|
|
|
|
2019-11-05 00:17:17 +01:00
|
|
|
prebuilt_etc {
|
|
|
|
name: "init_recovery.rc",
|
|
|
|
filename: "init.rc",
|
|
|
|
src: "etc/init.rc",
|
|
|
|
sub_dir: "init/hw",
|
|
|
|
recovery: true,
|
|
|
|
}
|
|
|
|
|
2018-08-07 23:38:51 +02:00
|
|
|
cc_binary {
|
|
|
|
name: "recovery",
|
|
|
|
recovery: true,
|
|
|
|
|
|
|
|
defaults: [
|
2019-03-23 00:08:52 +01:00
|
|
|
"libinstall_defaults",
|
2018-08-07 23:38:51 +02:00
|
|
|
"librecovery_defaults",
|
2019-09-28 08:32:00 +02:00
|
|
|
"librecovery_utils_defaults",
|
2018-08-07 23:38:51 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"recovery_main.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
2021-12-01 01:39:00 +01:00
|
|
|
"android.hardware.health-V1-ndk", // from librecovery_utils
|
2018-08-07 23:38:51 +02:00
|
|
|
"librecovery_ui",
|
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"librecovery",
|
|
|
|
"librecovery_ui_default",
|
|
|
|
],
|
|
|
|
|
|
|
|
required: [
|
|
|
|
"e2fsdroid.recovery",
|
2019-11-05 00:17:17 +01:00
|
|
|
"init_recovery.rc",
|
2018-08-07 23:38:51 +02:00
|
|
|
"librecovery_ui_ext",
|
2019-04-06 01:16:07 +02:00
|
|
|
"minadbd",
|
2018-08-21 21:31:51 +02:00
|
|
|
"mke2fs.conf.recovery",
|
2018-08-07 23:38:51 +02:00
|
|
|
"mke2fs.recovery",
|
|
|
|
"recovery_deps",
|
2019-11-05 00:17:17 +01:00
|
|
|
"ueventd.rc.recovery",
|
2018-08-07 23:38:51 +02:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2018-03-24 07:24:25 +01:00
|
|
|
// The dynamic executable that runs after /data mounts.
|
|
|
|
cc_binary {
|
|
|
|
name: "recovery-persist",
|
|
|
|
|
|
|
|
defaults: [
|
|
|
|
"recovery_defaults",
|
|
|
|
],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"recovery-persist.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"liblog",
|
|
|
|
],
|
|
|
|
|
2018-05-03 01:56:00 +02:00
|
|
|
static_libs: [
|
2019-10-01 20:55:36 +02:00
|
|
|
"librecovery_utils",
|
2018-05-03 01:56:00 +02:00
|
|
|
],
|
|
|
|
|
2018-03-24 07:24:25 +01:00
|
|
|
init_rc: [
|
|
|
|
"recovery-persist.rc",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
// The dynamic executable that runs at init.
|
|
|
|
cc_binary {
|
|
|
|
name: "recovery-refresh",
|
|
|
|
|
|
|
|
defaults: [
|
|
|
|
"recovery_defaults",
|
|
|
|
],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"recovery-refresh.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"liblog",
|
|
|
|
],
|
|
|
|
|
2018-05-03 01:56:00 +02:00
|
|
|
static_libs: [
|
2019-10-01 20:55:36 +02:00
|
|
|
"librecovery_utils",
|
2018-05-03 01:56:00 +02:00
|
|
|
],
|
|
|
|
|
2018-03-24 07:24:25 +01:00
|
|
|
init_rc: [
|
|
|
|
"recovery-refresh.rc",
|
|
|
|
],
|
|
|
|
}
|
2018-07-25 00:34:39 +02:00
|
|
|
|
|
|
|
filegroup {
|
|
|
|
name: "res-testdata",
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"res-*/images/*_text.png",
|
|
|
|
],
|
|
|
|
}
|