443a73b100
In this change, the logic to get the list of apexes is replaced with the query to apexservice, which is the source of truth. This dedups the manual scanning of /apex for the apex list, which should be internal to apexd. (Note how vold_prepare_subdirs filtered out directories with "@" character). This also makes vold_prepare_subdirs immune to the upcoming changes: /apex directory containing only bootstrap APEXes in the bootstrap NS. Until now, getting the list of apexes by scanning /apex was okay because of the accidental fact that /apex directory has directories for all the apexes, not only bootstrap apexes. Bug: 293949266 Bug: 293546778 Test: CtsPackageSettingHostTestCases Change-Id: I3fe373ca6f4c2281439bb2449845a1a14357131e
272 lines
5.4 KiB
Text
272 lines
5.4 KiB
Text
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "vold_default_flags",
|
|
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wextra",
|
|
"-Wno-unused-parameter",
|
|
],
|
|
|
|
tidy: true,
|
|
tidy_checks: [
|
|
"-*",
|
|
"cert-*",
|
|
"clang-analyzer-security*",
|
|
"android-*",
|
|
],
|
|
tidy_checks_as_errors: [
|
|
"clang-analyzer-security*",
|
|
"cert-*",
|
|
],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "vold_default_libs",
|
|
|
|
static_libs: [
|
|
"android.hardware.health.storage@1.0",
|
|
"android.hardware.health.storage-V1-ndk",
|
|
"android.security.maintenance-ndk",
|
|
"libasync_safe",
|
|
"libavb",
|
|
"libbootloader_message",
|
|
"libdm",
|
|
"libext2_uuid",
|
|
"libfec",
|
|
"libfec_rs",
|
|
"libfs_avb",
|
|
"libfs_mgr",
|
|
"libsquashfs_utils",
|
|
"libvold_binder",
|
|
],
|
|
shared_libs: [
|
|
"android.hardware.boot@1.0",
|
|
"android.hardware.boot-V1-ndk",
|
|
"libboot_control_client",
|
|
"libbase",
|
|
"libbinder",
|
|
"libbinder_ndk",
|
|
"libcrypto",
|
|
"libcrypto_utils",
|
|
"libcutils",
|
|
"libext4_utils",
|
|
"libf2fs_sparseblock",
|
|
"libgsi",
|
|
"libhardware",
|
|
"libhardware_legacy",
|
|
"libincfs",
|
|
"libhidlbase",
|
|
"libkeymint_support",
|
|
"libkeyutils",
|
|
"liblog",
|
|
"liblogwrap",
|
|
"libselinux",
|
|
"libsysutils",
|
|
"libutils",
|
|
],
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "libvold_binder",
|
|
defaults: ["vold_default_flags"],
|
|
|
|
srcs: [
|
|
":vold_aidl",
|
|
],
|
|
shared_libs: [
|
|
"libbinder",
|
|
"libutils",
|
|
],
|
|
aidl: {
|
|
local_include_dirs: ["binder"],
|
|
include_dirs: [
|
|
"frameworks/native/aidl/binder",
|
|
"frameworks/base/core/java",
|
|
],
|
|
export_aidl_headers: true,
|
|
},
|
|
whole_static_libs: [
|
|
"libincremental_aidl-cpp",
|
|
],
|
|
export_shared_lib_headers: [
|
|
"libbinder",
|
|
],
|
|
}
|
|
|
|
cc_library_headers {
|
|
name: "libvold_headers",
|
|
recovery_available: true,
|
|
export_include_dirs: ["."],
|
|
}
|
|
|
|
// Static library factored out to support testing
|
|
cc_library_static {
|
|
name: "libvold",
|
|
defaults: [
|
|
"vold_default_flags",
|
|
"vold_default_libs",
|
|
"keystore2_use_latest_aidl_ndk_shared",
|
|
],
|
|
|
|
srcs: [
|
|
"AppFuseUtil.cpp",
|
|
"Benchmark.cpp",
|
|
"Checkpoint.cpp",
|
|
"CryptoType.cpp",
|
|
"EncryptInplace.cpp",
|
|
"FileDeviceUtils.cpp",
|
|
"FsCrypt.cpp",
|
|
"IdleMaint.cpp",
|
|
"KeyBuffer.cpp",
|
|
"KeyStorage.cpp",
|
|
"KeyUtil.cpp",
|
|
"Keystore.cpp",
|
|
"Loop.cpp",
|
|
"MetadataCrypt.cpp",
|
|
"MoveStorage.cpp",
|
|
"NetlinkHandler.cpp",
|
|
"NetlinkManager.cpp",
|
|
"Process.cpp",
|
|
"Utils.cpp",
|
|
"VoldNativeService.cpp",
|
|
"VoldNativeServiceValidation.cpp",
|
|
"VoldUtil.cpp",
|
|
"VolumeManager.cpp",
|
|
"cryptfs.cpp",
|
|
"fs/Exfat.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/StubVolume.cpp",
|
|
"model/VolumeBase.cpp",
|
|
"model/VolumeEncryption.cpp",
|
|
],
|
|
product_variables: {
|
|
arc: {
|
|
exclude_srcs: [
|
|
"model/StubVolume.cpp",
|
|
],
|
|
static_libs: [
|
|
"libarcvolume",
|
|
],
|
|
},
|
|
debuggable: {
|
|
cppflags: ["-D__ANDROID_DEBUGGABLE__"],
|
|
},
|
|
},
|
|
whole_static_libs: [
|
|
"libcom.android.sysprop.apex",
|
|
"libc++fs",
|
|
],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "vold",
|
|
defaults: [
|
|
"vold_default_flags",
|
|
"vold_default_libs",
|
|
"keystore2_use_latest_aidl_ndk_shared",
|
|
],
|
|
|
|
srcs: ["main.cpp"],
|
|
static_libs: [
|
|
"libvold",
|
|
],
|
|
|
|
init_rc: [
|
|
"vold.rc",
|
|
],
|
|
|
|
required: [
|
|
"mke2fs",
|
|
"vold_prepare_subdirs",
|
|
"fuseMedia.o",
|
|
],
|
|
|
|
product_variables: {
|
|
arc: {
|
|
exclude_srcs: [
|
|
"model/StubVolume.cpp",
|
|
],
|
|
static_libs: [
|
|
"libarcvolume",
|
|
],
|
|
},
|
|
},
|
|
}
|
|
|
|
cc_binary {
|
|
name: "vdc",
|
|
defaults: ["vold_default_flags"],
|
|
|
|
srcs: [
|
|
"vdc.cpp",
|
|
"Utils.cpp",
|
|
],
|
|
shared_libs: [
|
|
"libbase",
|
|
"libbinder",
|
|
"libcutils",
|
|
"liblogwrap",
|
|
"libselinux",
|
|
"libutils",
|
|
],
|
|
static_libs: [
|
|
"libvold_binder",
|
|
],
|
|
}
|
|
|
|
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",
|
|
"libapexservice-deps",
|
|
],
|
|
|
|
srcs: [
|
|
"vold_prepare_subdirs.cpp",
|
|
"Utils.cpp",
|
|
],
|
|
shared_libs: [
|
|
"libbase",
|
|
"libcutils",
|
|
"liblogwrap",
|
|
"libselinux",
|
|
"libutils",
|
|
],
|
|
static_libs: [
|
|
"libvold_binder",
|
|
],
|
|
}
|
|
|
|
filegroup {
|
|
name: "vold_aidl",
|
|
srcs: [
|
|
"binder/android/os/IVold.aidl",
|
|
"binder/android/os/IVoldListener.aidl",
|
|
"binder/android/os/IVoldMountCallback.aidl",
|
|
"binder/android/os/IVoldTaskListener.aidl",
|
|
],
|
|
path: "binder",
|
|
}
|