Dist Soong built target_files.zip in Soong only builds

Test: presubmits
Bug: 385383524
Change-Id: Id89e2df5ef721756b5fd4d631cfb4f17eaf48392
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index a2181c1..a251942 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -120,6 +120,7 @@
 	rootDirForFsConfig          string
 	rootDirForFsConfigTimestamp android.Path
 	apkCertsInfo                android.Path
+	targetFilesZip              android.Path
 }
 
 func AndroidDeviceFactory() android.Module {
@@ -401,6 +402,9 @@
 				ctx.DistForGoalWithFilename("dist_files", a.miscInfo, "super_misc_info.txt")
 			}
 		}
+		if a.targetFilesZip != nil {
+			ctx.DistForGoalWithFilename("target-files-package", a.targetFilesZip, namePrefix+insertBeforeExtension(a.targetFilesZip.Base(), "-FILE_NAME_TAG_PLACEHOLDER"))
+		}
 
 	}
 }
@@ -590,6 +594,7 @@
 	a.copyImagesToTargetZip(ctx, builder, targetFilesDir)
 	a.copyMetadataToTargetZip(ctx, builder, targetFilesDir, allInstalledModules)
 
+	a.targetFilesZip = targetFilesZip
 	builder.Command().
 		BuiltTool("soong_zip").
 		Text("-d").