Add remaining filesystem modules to target_files.zip

Non filesystem modules like prebuilt_kernel_modules (for *_dlkm images)
and boot images will be added in a followup CL.

Bug: 385383524
Test: m out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_device/android_common/target_files.zip
Change-Id: I5ea76d5c870cce6a77932040d0577453d16efa6a
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 19e93ae..666aa68 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -95,12 +95,22 @@
 	builder := android.NewRuleBuilder(pctx, ctx)
 	builder.Command().Textf("rm -rf %s", targetFilesDir.String())
 	builder.Command().Textf("mkdir -p %s", targetFilesDir.String())
-	if a.partitionProps.Vendor_partition_name != nil {
-		fsInfo := a.getFilesystemInfo(ctx, *a.partitionProps.Vendor_partition_name)
-		builder.Command().Textf("mkdir -p %s/VENDOR", targetFilesDir.String())
+	partitionToSubdir := map[*string]string{
+		a.partitionProps.System_partition_name:     "SYSTEM",
+		a.partitionProps.System_ext_partition_name: "SYSTEM_EXT",
+		a.partitionProps.Product_partition_name:    "PRODUCT",
+		a.partitionProps.Vendor_partition_name:     "VENDOR",
+		a.partitionProps.Odm_partition_name:        "ODM",
+	}
+	for partition, subdir := range partitionToSubdir {
+		if partition == nil {
+			continue
+		}
+		fsInfo := a.getFilesystemInfo(ctx, *partition)
+		builder.Command().Textf("mkdir -p %s/%s", targetFilesDir.String(), subdir)
 		builder.Command().
 			BuiltTool("acp").
-			Textf("-rd %s/. %s/VENDOR", fsInfo.RootDir, targetFilesDir).
+			Textf("-rd %s/. %s/%s", fsInfo.RootDir, targetFilesDir, subdir).
 			Implicit(fsInfo.Output) // so that the staging dir is built
 	}
 	builder.Command().