Revert "Make vendor_ramdisk partition install recovery partition..."

Revert submission 3425159

Reason for revert: <Reason for revert: Dorid monitor: Likely culprit for b/385262936  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>

Reverted changes: /q/submissionid:3425159

Change-Id: I83d6af532bd76c4e10fcedc3d49b4c43efa0ecfe
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 3f08648..2244aff 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -155,11 +155,6 @@
 	// Directories to be created under root. e.g. /dev, /proc, etc.
 	Dirs proptools.Configurable[[]string]
 
-	// List of filesystem modules to include in creating the partition. The root directory of
-	// the provided filesystem modules are included in creating the partition.
-	// This is only supported for cpio and compressed cpio filesystem types.
-	Include_files_of []string
-
 	// Symbolic links to be created under root with "ln -sf <target> <name>".
 	Symlinks []SymlinkDefinition
 
@@ -291,8 +286,6 @@
 
 var interPartitionDependencyTag = interPartitionDepTag{}
 
-var interPartitionInstallDependencyTag = interPartitionDepTag{}
-
 var _ android.ExcludeFromVisibilityEnforcementTag = (*depTagWithVisibilityEnforcementBypass)(nil)
 
 func (t depTagWithVisibilityEnforcementBypass) ExcludeFromVisibilityEnforcement() {}
@@ -324,9 +317,6 @@
 	for _, partition := range f.properties.Import_aconfig_flags_from {
 		ctx.AddDependency(ctx.Module(), importAconfigDependencyTag, partition)
 	}
-	for _, partition := range f.properties.Include_files_of {
-		ctx.AddDependency(ctx.Module(), interPartitionInstallDependencyTag, partition)
-	}
 }
 
 type fsType int
@@ -347,13 +337,6 @@
 type FilesystemInfo struct {
 	// A text file containing the list of paths installed on the partition.
 	FileListFile android.Path
-
-	// Root directory of the installed partition
-	Rootdir android.Path
-
-	// A text file containing the hash value of the metadata and the content hashes
-	// of Rootdir
-	DirectoryHashFile android.Path
 }
 
 var FilesystemProvider = blueprint.NewProvider[FilesystemInfo]()
@@ -427,19 +410,13 @@
 	if f.filesystemBuilder.ShouldUseVintfFragmentModuleOnly() {
 		f.validateVintfFragments(ctx)
 	}
-
-	if len(f.properties.Include_files_of) > 0 && !android.InList(f.fsType(ctx), []fsType{compressedCpioType, cpioType}) {
-		ctx.PropertyErrorf("include_files_of", "include_files_of is only supported for cpio and compressed cpio filesystem types.")
-	}
-
-	var rootDir android.OutputPath
 	switch f.fsType(ctx) {
 	case ext4Type, erofsType, f2fsType:
-		f.output, rootDir = f.buildImageUsingBuildImage(ctx)
+		f.output = f.buildImageUsingBuildImage(ctx)
 	case compressedCpioType:
-		f.output, rootDir = f.buildCpioImage(ctx, true)
+		f.output = f.buildCpioImage(ctx, true)
 	case cpioType:
-		f.output, rootDir = f.buildCpioImage(ctx, false)
+		f.output = f.buildCpioImage(ctx, false)
 	default:
 		return
 	}
@@ -448,29 +425,12 @@
 	ctx.InstallFile(f.installDir, f.installFileName(), f.output)
 	ctx.SetOutputFiles([]android.Path{f.output}, "")
 
-	if f.partitionName() == "recovery" {
-		rootDir = rootDir.Join(ctx, "root")
-	}
-
-	rootDirHash := android.PathForModuleOut(ctx, "rootdir-hash.txt")
-	ctx.Build(pctx, android.BuildParams{
-		Rule:     android.WriteDirectoryHash,
-		Output:   rootDirHash,
-		Implicit: f.output,
-		Args: map[string]string{
-			"dir": rootDir.String(),
-		},
-	})
-
 	fileListFile := android.PathForModuleOut(ctx, "fileList")
 	android.WriteFileRule(ctx, fileListFile, f.installedFilesList())
 
 	android.SetProvider(ctx, FilesystemProvider, FilesystemInfo{
-		FileListFile:      fileListFile,
-		Rootdir:           rootDir,
-		DirectoryHashFile: rootDirHash,
+		FileListFile: fileListFile,
 	})
-
 	f.fileListFile = fileListFile
 
 	if proptools.Bool(f.properties.Unchecked_module) {
@@ -616,7 +576,7 @@
 	return f.partitionName()
 }
 
-func (f *filesystem) buildImageUsingBuildImage(ctx android.ModuleContext) (android.Path, android.OutputPath) {
+func (f *filesystem) buildImageUsingBuildImage(ctx android.ModuleContext) android.Path {
 	rootDir := android.PathForModuleOut(ctx, f.rootDirString()).OutputPath
 	rebasedDir := rootDir
 	if f.properties.Base_dir != nil {
@@ -667,7 +627,7 @@
 	// rootDir is not deleted. Might be useful for quick inspection.
 	builder.Build("build_filesystem_image", fmt.Sprintf("Creating filesystem %s", f.BaseModuleName()))
 
-	return output, rootDir
+	return output
 }
 
 func (f *filesystem) buildFileContexts(ctx android.ModuleContext) android.Path {
@@ -829,20 +789,7 @@
 	}
 }
 
-func includeFilesRootDir(ctx android.ModuleContext) (rootDirs android.Paths, hashFiles android.Paths) {
-	ctx.VisitDirectDepsWithTag(interPartitionInstallDependencyTag, func(m android.Module) {
-		if fsProvider, ok := android.OtherModuleProvider(ctx, m, FilesystemProvider); ok {
-			rootDirs = append(rootDirs, fsProvider.Rootdir)
-			hashFiles = append(hashFiles, fsProvider.DirectoryHashFile)
-		} else {
-			ctx.PropertyErrorf("include_files_of", "only filesystem modules can be listed in "+
-				"include_files_of but %s is not a filesystem module", m.Name())
-		}
-	})
-	return rootDirs, hashFiles
-}
-
-func (f *filesystem) buildCpioImage(ctx android.ModuleContext, compressed bool) (android.Path, android.OutputPath) {
+func (f *filesystem) buildCpioImage(ctx android.ModuleContext, compressed bool) android.Path {
 	if proptools.Bool(f.properties.Use_avb) {
 		ctx.PropertyErrorf("use_avb", "signing compresed cpio image using avbtool is not supported."+
 			"Consider adding this to bootimg module and signing the entire boot image.")
@@ -874,18 +821,10 @@
 	f.filesystemBuilder.BuildLinkerConfigFile(ctx, builder, rebasedDir)
 	f.copyFilesToProductOut(ctx, builder, rebasedDir)
 
-	rootDirs, hashFiles := includeFilesRootDir(ctx)
-
 	output := android.PathForModuleOut(ctx, f.installFileName())
 	cmd := builder.Command().
 		BuiltTool("mkbootfs").
 		Text(rootDir.String()) // input directory
-
-	for i := range len(rootDirs) {
-		cmd.Text(rootDirs[i].String())
-	}
-	cmd.Implicits(hashFiles)
-
 	if nodeList := f.properties.Dev_nodes_description_file; nodeList != nil {
 		cmd.FlagWithInput("-n ", android.PathForModuleSrc(ctx, proptools.String(nodeList)))
 	}
@@ -903,7 +842,7 @@
 	// rootDir is not deleted. Might be useful for quick inspection.
 	builder.Build("build_cpio_image", fmt.Sprintf("Creating filesystem %s", f.BaseModuleName()))
 
-	return output, rootDir
+	return output
 }
 
 var validPartitions = []string{