diff options
| -rw-r--r-- | android/variable.go | 2 | ||||
| -rw-r--r-- | fsgen/filesystem_creator.go | 32 |
2 files changed, 20 insertions, 14 deletions
diff --git a/android/variable.go b/android/variable.go index 25d99da26..46f54dbb4 100644 --- a/android/variable.go +++ b/android/variable.go @@ -665,6 +665,8 @@ type PartitionVariables struct { VendorRamdiskKernelBlocklistFile string `json:",omitempty"` VendorRamdiskKernelLoadModules []string `json:",omitempty"` VendorRamdiskKernelOptionsFile string `json:",omitempty"` + + ProductFsverityGenerateMetadata bool `json:",omitempty"` } func boolPtr(v bool) *bool { diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go index 8325b1ed5..738438407 100644 --- a/fsgen/filesystem_creator.go +++ b/fsgen/filesystem_creator.go @@ -212,16 +212,18 @@ func partitionSpecificFsProps(fsProps *filesystem.FilesystemProperties, partitio // https://source.corp.google.com/h/googleplex-android/platform/build//639d79f5012a6542ab1f733b0697db45761ab0f3:core/packaging/flags.mk;l=21;drc=5ba8a8b77507f93aa48cc61c5ba3f31a4d0cbf37;bpv=1;bpt=0 fsProps.Gen_aconfig_flags_pb = proptools.BoolPtr(true) // Identical to that of the aosp_shared_system_image - fsProps.Fsverity.Inputs = []string{ - "etc/boot-image.prof", - "etc/dirty-image-objects", - "etc/preloaded-classes", - "etc/classpaths/*.pb", - "framework/*", - "framework/*/*", // framework/{arch} - "framework/oat/*/*", // framework/oat/{arch} + if partitionVars.ProductFsverityGenerateMetadata { + fsProps.Fsverity.Inputs = []string{ + "etc/boot-image.prof", + "etc/dirty-image-objects", + "etc/preloaded-classes", + "etc/classpaths/*.pb", + "framework/*", + "framework/*/*", // framework/{arch} + "framework/oat/*/*", // framework/oat/{arch} + } + fsProps.Fsverity.Libs = []string{":framework-res{.export-package.apk}"} } - fsProps.Fsverity.Libs = []string{":framework-res{.export-package.apk}"} // Most of the symlinks and directories listed here originate from create_root_structure.mk, // but the handwritten generic system image also recreates them: // https://cs.android.com/android/platform/superproject/main/+/main:build/make/target/product/generic/Android.bp;l=33;drc=db08311f1b6ef6cb0a4fbcc6263b89849360ce04 @@ -348,12 +350,14 @@ func partitionSpecificFsProps(fsProps *filesystem.FilesystemProperties, partitio "product", }) case "system_ext": - fsProps.Fsverity.Inputs = []string{ - "framework/*", - "framework/*/*", // framework/{arch} - "framework/oat/*/*", // framework/oat/{arch} + if partitionVars.ProductFsverityGenerateMetadata { + fsProps.Fsverity.Inputs = []string{ + "framework/*", + "framework/*/*", // framework/{arch} + "framework/oat/*/*", // framework/oat/{arch} + } + fsProps.Fsverity.Libs = []string{":framework-res{.export-package.apk}"} } - fsProps.Fsverity.Libs = []string{":framework-res{.export-package.apk}"} case "product": fsProps.Gen_aconfig_flags_pb = proptools.BoolPtr(true) case "vendor": |