f452774030
This is temporary. Keystore is in the process of being upgraded to use the new Keymaster 4.0 HAL, and I want to leave vold alone, using Keymaster 3.0 for the moment. This CL just copies relevant bits of keystore support utilities into vold, so it can stop depending on the copies from keystore. After the keystore update is complete, vold will be changed either to use Keymaster 4.0 or -- more likely -- to use keystore rather than talking to Keymaster directly. At that point the files added by this CL will be deleted. Test: Device boots and successfully decrypts /data Change-Id: I73f6d4cc4c5e20d89d7ac37d29d025bf279f9e12
190 lines
3.8 KiB
Text
190 lines
3.8 KiB
Text
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",
|
|
"libbase",
|
|
"libbinder",
|
|
"libcrypto",
|
|
"libcrypto_utils",
|
|
"libcutils",
|
|
"libdiskconfig",
|
|
"libext4_utils",
|
|
"libf2fs_sparseblock",
|
|
"libhardware",
|
|
"libhardware_legacy",
|
|
"libhidlbase",
|
|
"libhwbinder",
|
|
"libkeyutils",
|
|
"liblog",
|
|
"liblogwrap",
|
|
"libselinux",
|
|
"libsysutils",
|
|
"libutils",
|
|
],
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "libvold_binder",
|
|
defaults: ["vold_default_flags"],
|
|
|
|
srcs: [
|
|
"binder/android/os/IVold.aidl",
|
|
"binder/android/os/IVoldListener.aidl",
|
|
"binder/android/os/IVoldTaskListener.aidl",
|
|
],
|
|
shared_libs: [
|
|
"libbinder",
|
|
"libutils",
|
|
],
|
|
aidl: {
|
|
local_include_dirs: ["binder"],
|
|
include_dirs: ["frameworks/native/aidl/binder"],
|
|
export_aidl_headers: true,
|
|
},
|
|
}
|
|
|
|
// Static library factored out to support testing
|
|
cc_library_static {
|
|
name: "libvold",
|
|
defaults: [
|
|
"vold_default_flags",
|
|
"vold_default_libs",
|
|
],
|
|
|
|
srcs: [
|
|
"Benchmark.cpp",
|
|
"CheckEncryption.cpp",
|
|
"Devmapper.cpp",
|
|
"EncryptInplace.cpp",
|
|
"Ext4Crypt.cpp",
|
|
"FileDeviceUtils.cpp",
|
|
"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",
|
|
"authorization_set.cpp",
|
|
"cryptfs.cpp",
|
|
"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",
|
|
"secontext.cpp",
|
|
],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "vold",
|
|
defaults: [
|
|
"vold_default_flags",
|
|
"vold_default_libs",
|
|
],
|
|
|
|
srcs: ["main.cpp"],
|
|
static_libs: ["libvold"],
|
|
init_rc: ["vold.rc"],
|
|
|
|
required: [
|
|
"mke2fs",
|
|
"vold_prepare_subdirs",
|
|
],
|
|
}
|
|
|
|
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"],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "secdiscard",
|
|
defaults: ["vold_default_flags"],
|
|
|
|
srcs: [
|
|
"FileDeviceUtils.cpp",
|
|
"secdiscard.cpp",
|
|
],
|
|
shared_libs: ["libbase"],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "vold_prepare_subdirs",
|
|
defaults: ["vold_default_flags"],
|
|
|
|
srcs: ["vold_prepare_subdirs.cpp", "Utils.cpp"],
|
|
shared_libs: [
|
|
"libbase",
|
|
"libcutils",
|
|
"liblogwrap",
|
|
"libselinux",
|
|
"libutils",
|
|
],
|
|
static_libs: [
|
|
"libvold_binder",
|
|
],
|
|
}
|
|
|
|
subdirs = ["tests"]
|