2017-10-23 22:38:55 +02:00
|
|
|
cc_defaults {
|
|
|
|
name: "vold_default_flags",
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
"-Wextra",
|
|
|
|
"-Wno-missing-field-initializers",
|
|
|
|
"-Wno-unused-parameter",
|
|
|
|
"-Wno-unused-variable",
|
|
|
|
],
|
|
|
|
|
|
|
|
clang: true,
|
|
|
|
|
|
|
|
tidy: true,
|
|
|
|
tidy_checks: [
|
|
|
|
"-*",
|
|
|
|
"cert-*",
|
|
|
|
"clang-analyzer-security*",
|
|
|
|
],
|
|
|
|
tidy_flags: [
|
|
|
|
"-warnings-as-errors=clang-analyzer-security*,cert-*",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "vold_default_libs",
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"libavb",
|
|
|
|
"libbootloader_message",
|
|
|
|
"libfec",
|
|
|
|
"libfec_rs",
|
|
|
|
"libfs_mgr",
|
|
|
|
"libscrypt_static",
|
|
|
|
"libsquashfs_utils",
|
|
|
|
"libvold_binder",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"android.hardware.keymaster@3.0",
|
2018-01-22 17:08:32 +01:00
|
|
|
"android.hardware.keymaster@4.0",
|
2018-10-03 02:40:44 +02:00
|
|
|
"android.hardware.boot@1.0",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libbase",
|
|
|
|
"libbinder",
|
|
|
|
"libcrypto",
|
|
|
|
"libcrypto_utils",
|
|
|
|
"libcutils",
|
|
|
|
"libdiskconfig",
|
|
|
|
"libext4_utils",
|
|
|
|
"libf2fs_sparseblock",
|
2018-10-23 22:06:55 +02:00
|
|
|
"libfscrypt",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libhardware",
|
|
|
|
"libhardware_legacy",
|
|
|
|
"libhidlbase",
|
|
|
|
"libhwbinder",
|
2018-01-22 17:08:32 +01:00
|
|
|
"libkeymaster4support",
|
2017-10-23 22:38:55 +02:00
|
|
|
"libkeyutils",
|
|
|
|
"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"],
|
|
|
|
include_dirs: ["frameworks/native/aidl/binder"],
|
|
|
|
export_aidl_headers: true,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2017-11-27 10:01:35 +01:00
|
|
|
cc_library_headers {
|
|
|
|
name: "libvold_headers",
|
|
|
|
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",
|
|
|
|
],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"Benchmark.cpp",
|
2017-06-15 17:59:43 +02:00
|
|
|
"CheckEncryption.cpp",
|
2018-08-28 10:58:49 +02:00
|
|
|
"Checkpoint.cpp",
|
2017-10-23 22:38:55 +02:00
|
|
|
"Devmapper.cpp",
|
|
|
|
"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",
|
|
|
|
"Keymaster.cpp",
|
|
|
|
"Loop.cpp",
|
|
|
|
"MetadataCrypt.cpp",
|
|
|
|
"MoveStorage.cpp",
|
|
|
|
"NetlinkHandler.cpp",
|
|
|
|
"NetlinkManager.cpp",
|
|
|
|
"Process.cpp",
|
|
|
|
"ScryptParameters.cpp",
|
|
|
|
"Utils.cpp",
|
|
|
|
"VoldNativeService.cpp",
|
|
|
|
"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",
|
|
|
|
"model/VolumeBase.cpp",
|
2018-10-29 00:52:56 +01:00
|
|
|
"model/StubVolume.cpp",
|
2017-10-23 22:38:55 +02:00
|
|
|
"secontext.cpp",
|
|
|
|
],
|
2017-11-27 10:01:35 +01:00
|
|
|
product_variables: {
|
|
|
|
arc: {
|
|
|
|
exclude_srcs: [
|
|
|
|
"model/ObbVolume.cpp",
|
|
|
|
],
|
|
|
|
static_libs: [
|
2018-02-23 00:12:37 +01:00
|
|
|
"arc_services_aidl",
|
2017-11-27 10:01:35 +01:00
|
|
|
"libarcobbvolume",
|
|
|
|
],
|
|
|
|
},
|
2018-09-20 19:09:27 +02:00
|
|
|
debuggable: {
|
|
|
|
cppflags: ["-D__ANDROID_DEBUGGABLE__"],
|
|
|
|
},
|
2017-11-27 10:01:35 +01:00
|
|
|
},
|
2018-08-10 22:50:46 +02:00
|
|
|
shared_libs: [
|
2018-09-19 19:28:16 +02:00
|
|
|
"android.hardware.health.storage@1.0",
|
2018-08-10 22:50:46 +02:00
|
|
|
],
|
2017-10-23 22:38:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "vold",
|
|
|
|
defaults: [
|
|
|
|
"vold_default_flags",
|
|
|
|
"vold_default_libs",
|
|
|
|
],
|
|
|
|
|
|
|
|
srcs: ["main.cpp"],
|
|
|
|
static_libs: ["libvold"],
|
2017-11-27 10:01:35 +01:00
|
|
|
product_variables: {
|
|
|
|
arc: {
|
|
|
|
static_libs: [
|
2018-02-23 00:12:37 +01:00
|
|
|
"arc_services_aidl",
|
2017-11-27 10:01:35 +01:00
|
|
|
"libarcobbvolume",
|
2018-01-22 03:04:25 +01:00
|
|
|
],
|
2017-11-27 10:01:35 +01:00
|
|
|
},
|
|
|
|
},
|
2018-05-16 01:12:20 +02:00
|
|
|
init_rc: [
|
|
|
|
"vold.rc",
|
|
|
|
"wait_for_keymaster.rc",
|
|
|
|
],
|
2017-10-23 22:38:55 +02:00
|
|
|
|
|
|
|
required: [
|
|
|
|
"mke2fs",
|
|
|
|
"vold_prepare_subdirs",
|
2018-02-07 23:41:26 +01:00
|
|
|
"wait_for_keymaster",
|
2017-10-23 22:38:55 +02:00
|
|
|
],
|
2018-08-10 22:50:46 +02:00
|
|
|
|
|
|
|
shared_libs: [
|
2018-09-19 19:28:16 +02:00
|
|
|
"android.hardware.health.storage@1.0",
|
2018-08-10 22:50:46 +02:00
|
|
|
"libhidltransport",
|
|
|
|
],
|
2017-10-23 22:38:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "vdc",
|
|
|
|
defaults: ["vold_default_flags"],
|
|
|
|
|
|
|
|
srcs: ["vdc.cpp"],
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libbinder",
|
|
|
|
"libcutils",
|
|
|
|
"libutils",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libvold_binder",
|
|
|
|
],
|
|
|
|
init_rc: ["vdc.rc"],
|
|
|
|
}
|
|
|
|
|
2018-02-07 23:41:26 +01:00
|
|
|
cc_binary {
|
|
|
|
name: "wait_for_keymaster",
|
|
|
|
defaults: ["vold_default_flags"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"wait_for_keymaster.cpp",
|
|
|
|
"Keymaster.cpp",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libbinder",
|
|
|
|
|
|
|
|
"android.hardware.keymaster@3.0",
|
|
|
|
"android.hardware.keymaster@4.0",
|
|
|
|
"libhardware",
|
|
|
|
"libhardware_legacy",
|
|
|
|
"libhidlbase",
|
|
|
|
"libhwbinder",
|
|
|
|
"libkeymaster4support",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2017-10-23 22:38:55 +02:00
|
|
|
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",
|
2017-10-23 22:38:55 +02:00
|
|
|
defaults: ["vold_default_flags"],
|
|
|
|
|
2017-10-20 17:17:54 +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",
|
|
|
|
"binder/android/os/IVoldTaskListener.aidl",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2017-10-23 22:38:55 +02:00
|
|
|
subdirs = ["tests"]
|