Merge "Sandbox checkIn-service-stub-lite" into main
diff --git a/android/variable.go b/android/variable.go
index fe3a6d7..307deaf 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -538,18 +538,17 @@
 	TargetUserimagesSparseSquashfsDisabled bool `json:",omitempty"`
 	TargetUserimagesSparseF2fsDisabled     bool `json:",omitempty"`
 
-	BoardErofsCompressor                 string `json:",omitempty"`
-	BoardErofsCompressorHints            string `json:",omitempty"`
-	BoardErofsPclusterSize               string `json:",omitempty"`
-	BoardErofsShareDupBlocks             string `json:",omitempty"`
-	BoardErofsUseLegacyCompression       string `json:",omitempty"`
-	BoardExt4ShareDupBlocks              string `json:",omitempty"`
-	BoardFlashLogicalBlockSize           string `json:",omitempty"`
-	BoardFlashEraseBlockSize             string `json:",omitempty"`
-	BoardUsesRecoveryAsBoot              bool   `json:",omitempty"`
-	BoardBuildGkiBootImageWithoutRamdisk bool   `json:",omitempty"`
-	ProductUseDynamicPartitionSize       bool   `json:",omitempty"`
-	CopyImagesForTargetFilesZip          bool   `json:",omitempty"`
+	BoardErofsCompressor           string `json:",omitempty"`
+	BoardErofsCompressorHints      string `json:",omitempty"`
+	BoardErofsPclusterSize         string `json:",omitempty"`
+	BoardErofsShareDupBlocks       string `json:",omitempty"`
+	BoardErofsUseLegacyCompression string `json:",omitempty"`
+	BoardExt4ShareDupBlocks        string `json:",omitempty"`
+	BoardFlashLogicalBlockSize     string `json:",omitempty"`
+	BoardFlashEraseBlockSize       string `json:",omitempty"`
+	BoardUsesRecoveryAsBoot        bool   `json:",omitempty"`
+	ProductUseDynamicPartitionSize bool   `json:",omitempty"`
+	CopyImagesForTargetFilesZip    bool   `json:",omitempty"`
 
 	BoardAvbEnable bool `json:",omitempty"`
 
diff --git a/bp2build/bp2build_product_config.go b/bp2build/bp2build_product_config.go
index 7f26bef..0d1e433 100644
--- a/bp2build/bp2build_product_config.go
+++ b/bp2build/bp2build_product_config.go
@@ -793,9 +793,6 @@
 	if variables.BoardUsesRecoveryAsBoot {
 		ret["recovery_as_boot"] = "true"
 	}
-	if variables.BoardBuildGkiBootImageWithoutRamdisk {
-		ret["gki_boot_image_without_ramdisk"] = "true"
-	}
 	if variables.ProductUseDynamicPartitionSize {
 		ret["use_dynamic_partition_size"] = "true"
 	}
diff --git a/filesystem/avb_add_hash_footer.go b/filesystem/avb_add_hash_footer.go
index dabbc46..ead579f 100644
--- a/filesystem/avb_add_hash_footer.go
+++ b/filesystem/avb_add_hash_footer.go
@@ -25,6 +25,7 @@
 
 type avbAddHashFooter struct {
 	android.ModuleBase
+	android.DefaultableModuleBase
 
 	properties avbAddHashFooterProperties
 
@@ -80,6 +81,7 @@
 	module := &avbAddHashFooter{}
 	module.AddProperties(&module.properties)
 	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst)
+	android.InitDefaultableModule(module)
 	return module
 }
 
@@ -206,3 +208,19 @@
 func (a *avbAddHashFooter) Srcs() android.Paths {
 	return append(android.Paths{}, a.output)
 }
+
+type avbAddHashFooterDefaults struct {
+	android.ModuleBase
+	android.DefaultsModuleBase
+}
+
+// avb_add_hash_footer_defaults provides a set of properties that can be inherited by other
+// avb_add_hash_footer modules. A module can use the properties from an avb_add_hash_footer_defaults
+// using `defaults: ["<:default_module_name>"]`. Properties of both modules are erged (when
+// possible) by prepending the default module's values to the depending module's values.
+func avbAddHashFooterDefaultsFactory() android.Module {
+	module := &avbAddHashFooterDefaults{}
+	module.AddProperties(&avbAddHashFooterProperties{})
+	android.InitDefaultsModule(module)
+	return module
+}
diff --git a/filesystem/avb_gen_vbmeta_image.go b/filesystem/avb_gen_vbmeta_image.go
index 0f331f9..985f0ea 100644
--- a/filesystem/avb_gen_vbmeta_image.go
+++ b/filesystem/avb_gen_vbmeta_image.go
@@ -24,6 +24,7 @@
 
 type avbGenVbmetaImage struct {
 	android.ModuleBase
+	android.DefaultableModuleBase
 
 	properties avbGenVbmetaImageProperties
 
@@ -47,6 +48,7 @@
 	module := &avbGenVbmetaImage{}
 	module.AddProperties(&module.properties)
 	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst)
+	android.InitDefaultableModule(module)
 	return module
 }
 
@@ -106,3 +108,20 @@
 	}
 	return nil, fmt.Errorf("unsupported module reference tag %q", tag)
 }
+
+type avbGenVbmetaImageDefaults struct {
+	android.ModuleBase
+	android.DefaultsModuleBase
+}
+
+// avb_gen_vbmeta_image_defaults provides a set of properties that can be inherited by other
+// avb_gen_vbmeta_image modules. A module can use the properties from an
+// avb_gen_vbmeta_image_defaults using `defaults: ["<:default_module_name>"]`. Properties of both
+// modules are erged (when possible) by prepending the default module's values to the depending
+// module's values.
+func avbGenVbmetaImageDefaultsFactory() android.Module {
+	module := &avbGenVbmetaImageDefaults{}
+	module.AddProperties(&avbGenVbmetaImageProperties{})
+	android.InitDefaultsModule(module)
+	return module
+}
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 3d49114..7b207d6 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -36,7 +36,9 @@
 	ctx.RegisterModuleType("android_filesystem", filesystemFactory)
 	ctx.RegisterModuleType("android_system_image", systemImageFactory)
 	ctx.RegisterModuleType("avb_add_hash_footer", avbAddHashFooterFactory)
+	ctx.RegisterModuleType("avb_add_hash_footer_defaults", avbAddHashFooterDefaultsFactory)
 	ctx.RegisterModuleType("avb_gen_vbmeta_image", avbGenVbmetaImageFactory)
+	ctx.RegisterModuleType("avb_gen_vbmeta_image_defaults", avbGenVbmetaImageDefaultsFactory)
 }
 
 type filesystem struct {
diff --git a/genrule/allowlists.go b/genrule/allowlists.go
index 549018e..56b61bf 100644
--- a/genrule/allowlists.go
+++ b/genrule/allowlists.go
@@ -39,7 +39,6 @@
 		"libcore-non-cts-tests-txt",
 		"seller-frontend-service-stub-lite",
 		"swiftshader_spvtools_update_build_version",
-		"ue_unittest_erofs_imgs",
 		"vm-tests-tf-lib",
 		// go/keep-sorted end
 	}