2021-02-12 23:24:10 +01:00
|
|
|
package {
|
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
|
|
}
|
|
|
|
|
2017-10-23 22:38:55 +02:00
|
|
|
cc_defaults {
|
|
|
|
name: "vold_default_flags",
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
"-Wextra",
|
|
|
|
"-Wno-unused-parameter",
|
|
|
|
],
|
|
|
|
|
|
|
|
tidy: true,
|
|
|
|
tidy_checks: [
|
|
|
|
"-*",
|
|
|
|
"cert-*",
|
|
|
|
"clang-analyzer-security*",
|
2019-03-30 00:07:58 +01:00
|
|
|
"android-*",
|
2017-10-23 22:38:55 +02:00
|
|
|
],
|
2022-04-28 00:54:25 +02:00
|
|
|
tidy_checks_as_errors: [
|
|
|
|
"clang-analyzer-security*",
|
|
|
|
"cert-*",
|
2017-10-23 22:38:55 +02:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "vold_default_libs",
|
|
|
|
|
|
|
|
static_libs: [
|
2023-05-22 20:14:40 +02:00
|
|
|
"android.hardware.health.storage@1.0",
|
|
|
|
"android.hardware.health.storage-V1-ndk",
|
|
|
|
"android.security.maintenance-ndk",
|
2019-11-27 11:53:51 +01:00
|
|
|
"libasync_safe",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libavb",
|
|
|
|
"libbootloader_message",
|
2019-05-13 22:02:54 +02:00
|
|
|
"libdm",
|
2019-06-27 22:40:09 +02:00
|
|
|
"libext2_uuid",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libfec",
|
|
|
|
"libfec_rs",
|
2018-11-29 15:15:08 +01:00
|
|
|
"libfs_avb",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libfs_mgr",
|
|
|
|
"libsquashfs_utils",
|
|
|
|
"libvold_binder",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
2018-10-03 02:40:44 +02:00
|
|
|
"android.hardware.boot@1.0",
|
2022-06-21 23:31:01 +02:00
|
|
|
"android.hardware.boot-V1-ndk",
|
|
|
|
"libboot_control_client",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libbase",
|
|
|
|
"libbinder",
|
2023-05-22 20:14:40 +02:00
|
|
|
"libbinder_ndk",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libcrypto",
|
|
|
|
"libcrypto_utils",
|
|
|
|
"libcutils",
|
|
|
|
"libext4_utils",
|
|
|
|
"libf2fs_sparseblock",
|
2020-10-07 08:20:00 +02:00
|
|
|
"libgsi",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libhardware",
|
|
|
|
"libhardware_legacy",
|
2019-12-02 19:50:12 +01:00
|
|
|
"libincfs",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libhidlbase",
|
2023-05-22 20:14:40 +02:00
|
|
|
"libkeymint_support",
|
2017-10-23 22:38:55 +02:00
|
|
|
"liblog",
|
|
|
|
"liblogwrap",
|
|
|
|
"libselinux",
|
|
|
|
"libsysutils",
|
|
|
|
"libutils",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_library_static {
|
|
|
|
name: "libvold_binder",
|
|
|
|
defaults: ["vold_default_flags"],
|
|
|
|
|
|
|
|
srcs: [
|
2017-11-25 17:47:19 +01:00
|
|
|
":vold_aidl",
|
2017-10-23 22:38:55 +02:00
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"libbinder",
|
|
|
|
"libutils",
|
|
|
|
],
|
|
|
|
aidl: {
|
|
|
|
local_include_dirs: ["binder"],
|
2019-12-02 19:50:12 +01:00
|
|
|
include_dirs: [
|
|
|
|
"frameworks/native/aidl/binder",
|
2020-01-20 04:37:52 +01:00
|
|
|
"frameworks/base/core/java",
|
2019-12-02 19:50:12 +01:00
|
|
|
],
|
2017-10-23 22:38:55 +02:00
|
|
|
export_aidl_headers: true,
|
|
|
|
},
|
2019-12-02 19:50:12 +01:00
|
|
|
whole_static_libs: [
|
2021-01-26 14:35:14 +01:00
|
|
|
"libincremental_aidl-cpp",
|
2019-12-02 19:50:12 +01:00
|
|
|
],
|
2021-02-26 00:16:11 +01:00
|
|
|
export_shared_lib_headers: [
|
|
|
|
"libbinder",
|
|
|
|
],
|
2017-10-23 22:38:55 +02:00
|
|
|
}
|
|
|
|
|
2017-11-27 10:01:35 +01:00
|
|
|
cc_library_headers {
|
|
|
|
name: "libvold_headers",
|
2019-10-02 08:31:17 +02:00
|
|
|
recovery_available: true,
|
2017-11-27 10:01:35 +01:00
|
|
|
export_include_dirs: ["."],
|
|
|
|
}
|
|
|
|
|
2017-10-23 22:38:55 +02:00
|
|
|
// Static library factored out to support testing
|
|
|
|
cc_library_static {
|
|
|
|
name: "libvold",
|
|
|
|
defaults: [
|
|
|
|
"vold_default_flags",
|
|
|
|
"vold_default_libs",
|
2021-11-22 19:19:40 +01:00
|
|
|
"keystore2_use_latest_aidl_ndk_shared",
|
2017-10-23 22:38:55 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
srcs: [
|
2018-11-01 04:59:47 +01:00
|
|
|
"AppFuseUtil.cpp",
|
2017-10-23 22:38:55 +02:00
|
|
|
"Benchmark.cpp",
|
2018-08-28 10:58:49 +02:00
|
|
|
"Checkpoint.cpp",
|
2020-02-07 21:45:20 +01:00
|
|
|
"CryptoType.cpp",
|
2017-10-23 22:38:55 +02:00
|
|
|
"EncryptInplace.cpp",
|
2017-06-15 17:59:43 +02:00
|
|
|
"FileDeviceUtils.cpp",
|
2018-10-23 22:06:55 +02:00
|
|
|
"FsCrypt.cpp",
|
2017-10-23 22:38:55 +02:00
|
|
|
"IdleMaint.cpp",
|
|
|
|
"KeyBuffer.cpp",
|
|
|
|
"KeyStorage.cpp",
|
|
|
|
"KeyUtil.cpp",
|
2021-06-15 20:34:00 +02:00
|
|
|
"Keystore.cpp",
|
2017-10-23 22:38:55 +02:00
|
|
|
"Loop.cpp",
|
|
|
|
"MetadataCrypt.cpp",
|
|
|
|
"MoveStorage.cpp",
|
|
|
|
"NetlinkHandler.cpp",
|
|
|
|
"NetlinkManager.cpp",
|
|
|
|
"Process.cpp",
|
|
|
|
"Utils.cpp",
|
|
|
|
"VoldNativeService.cpp",
|
2020-03-25 07:49:02 +01:00
|
|
|
"VoldNativeServiceValidation.cpp",
|
2017-10-23 22:38:55 +02:00
|
|
|
"VoldUtil.cpp",
|
|
|
|
"VolumeManager.cpp",
|
|
|
|
"cryptfs.cpp",
|
2018-01-19 02:55:18 +01:00
|
|
|
"fs/Exfat.cpp",
|
2017-10-23 22:38:55 +02:00
|
|
|
"fs/Ext4.cpp",
|
|
|
|
"fs/F2fs.cpp",
|
|
|
|
"fs/Vfat.cpp",
|
|
|
|
"model/Disk.cpp",
|
|
|
|
"model/EmulatedVolume.cpp",
|
|
|
|
"model/ObbVolume.cpp",
|
|
|
|
"model/PrivateVolume.cpp",
|
|
|
|
"model/PublicVolume.cpp",
|
2018-10-29 00:52:56 +01:00
|
|
|
"model/StubVolume.cpp",
|
2020-02-07 21:45:20 +01:00
|
|
|
"model/VolumeBase.cpp",
|
2020-02-07 21:51:56 +01:00
|
|
|
"model/VolumeEncryption.cpp",
|
2017-10-23 22:38:55 +02:00
|
|
|
],
|
2020-07-17 17:17:50 +02:00
|
|
|
product_variables: {
|
2021-01-20 06:53:15 +01:00
|
|
|
arc: {
|
|
|
|
exclude_srcs: [
|
|
|
|
"model/StubVolume.cpp",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libarcvolume",
|
|
|
|
],
|
|
|
|
},
|
2020-07-17 17:17:50 +02:00
|
|
|
debuggable: {
|
|
|
|
cppflags: ["-D__ANDROID_DEBUGGABLE__"],
|
|
|
|
},
|
|
|
|
},
|
2017-10-23 22:38:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "vold",
|
|
|
|
defaults: [
|
|
|
|
"vold_default_flags",
|
|
|
|
"vold_default_libs",
|
2021-11-22 19:19:40 +01:00
|
|
|
"keystore2_use_latest_aidl_ndk_shared",
|
2017-10-23 22:38:55 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
srcs: ["main.cpp"],
|
2023-05-22 20:14:40 +02:00
|
|
|
static_libs: [
|
|
|
|
"libvold",
|
|
|
|
],
|
|
|
|
|
2018-05-16 01:12:20 +02:00
|
|
|
init_rc: [
|
|
|
|
"vold.rc",
|
|
|
|
],
|
2017-10-23 22:38:55 +02:00
|
|
|
|
|
|
|
required: [
|
|
|
|
"mke2fs",
|
|
|
|
"vold_prepare_subdirs",
|
2022-07-11 16:12:39 +02:00
|
|
|
"fuseMedia.o",
|
2017-10-23 22:38:55 +02:00
|
|
|
],
|
2018-08-10 22:50:46 +02:00
|
|
|
|
2021-01-20 06:53:15 +01:00
|
|
|
product_variables: {
|
|
|
|
arc: {
|
|
|
|
exclude_srcs: [
|
|
|
|
"model/StubVolume.cpp",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libarcvolume",
|
|
|
|
],
|
|
|
|
},
|
2022-04-18 06:00:10 +02:00
|
|
|
},
|
2017-10-23 22:38:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "vdc",
|
|
|
|
defaults: ["vold_default_flags"],
|
|
|
|
|
2021-07-08 00:38:04 +02:00
|
|
|
srcs: [
|
|
|
|
"vdc.cpp",
|
|
|
|
"Utils.cpp",
|
|
|
|
],
|
2017-10-23 22:38:55 +02:00
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libbinder",
|
|
|
|
"libcutils",
|
2021-07-08 00:38:04 +02:00
|
|
|
"liblogwrap",
|
|
|
|
"libselinux",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libutils",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libvold_binder",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "secdiscard",
|
|
|
|
defaults: ["vold_default_flags"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"FileDeviceUtils.cpp",
|
|
|
|
"secdiscard.cpp",
|
|
|
|
],
|
|
|
|
shared_libs: ["libbase"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
2017-10-20 17:17:54 +02:00
|
|
|
name: "vold_prepare_subdirs",
|
2023-08-11 17:34:35 +02:00
|
|
|
defaults: ["vold_default_flags"],
|
2017-10-23 22:38:55 +02:00
|
|
|
|
2022-04-18 06:00:10 +02:00
|
|
|
srcs: [
|
|
|
|
"vold_prepare_subdirs.cpp",
|
|
|
|
"Utils.cpp",
|
|
|
|
],
|
2017-10-23 22:38:55 +02:00
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
2017-10-20 17:17:54 +02:00
|
|
|
"liblogwrap",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libselinux",
|
2017-10-20 17:17:54 +02:00
|
|
|
"libutils",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libvold_binder",
|
2017-10-23 22:38:55 +02:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2017-11-25 17:47:19 +01:00
|
|
|
filegroup {
|
|
|
|
name: "vold_aidl",
|
|
|
|
srcs: [
|
|
|
|
"binder/android/os/IVold.aidl",
|
|
|
|
"binder/android/os/IVoldListener.aidl",
|
2019-11-19 10:16:03 +01:00
|
|
|
"binder/android/os/IVoldMountCallback.aidl",
|
2017-11-25 17:47:19 +01:00
|
|
|
"binder/android/os/IVoldTaskListener.aidl",
|
|
|
|
],
|
2018-09-15 06:28:50 +02:00
|
|
|
path: "binder",
|
2017-11-25 17:47:19 +01:00
|
|
|
}
|