diff --git a/build/soong/policy.go b/build/soong/policy.go
index 3308e2c..2b190e6 100644
--- a/build/soong/policy.go
+++ b/build/soong/policy.go
@@ -83,6 +83,9 @@
 	// Whether to build CTS specific policy or not. Default is false
 	Cts *bool
 
+	// Whether to build recovery specific policy or not. Default is false
+	Target_recovery *bool
+
 	// Whether this module is directly installable to one of the partitions. Default is true
 	Installable *bool
 }
@@ -130,6 +133,10 @@
 	return proptools.Bool(c.properties.Cts)
 }
 
+func (c *policyConf) isTargetRecovery() bool {
+	return proptools.Bool(c.properties.Target_recovery)
+}
+
 func (c *policyConf) withAsan(ctx android.ModuleContext) string {
 	isAsanDevice := android.InList("address", ctx.Config().SanitizeDevice())
 	return strconv.FormatBool(proptools.BoolDefault(c.properties.With_asan, isAsanDevice))
@@ -139,6 +146,9 @@
 	if c.cts() {
 		return "cts"
 	}
+	if c.isTargetRecovery() {
+		return "false"
+	}
 	return strconv.FormatBool(ctx.DeviceConfig().SepolicySplit())
 }
 
@@ -146,6 +156,9 @@
 	if c.cts() {
 		return "cts"
 	}
+	if c.isTargetRecovery() {
+		return "false"
+	}
 	return "true"
 }
 
@@ -153,6 +166,9 @@
 	if c.cts() {
 		return "cts"
 	}
+	if c.isTargetRecovery() {
+		return "false"
+	}
 	return strconv.FormatBool(!ctx.DeviceConfig().BuildBrokenTrebleSyspropNeverallow())
 }
 
@@ -160,6 +176,9 @@
 	if c.cts() {
 		return "cts"
 	}
+	if c.isTargetRecovery() {
+		return "false"
+	}
 	return strconv.FormatBool(!ctx.DeviceConfig().BuildBrokenEnforceSyspropOwner())
 }
 
@@ -206,6 +225,7 @@
 		FlagWithArg("-D target_exclude_build_test=", strconv.FormatBool(proptools.Bool(c.properties.Exclude_build_test))).
 		FlagWithArg("-D target_requires_insecure_execmem_for_swiftshader=", strconv.FormatBool(ctx.DeviceConfig().RequiresInsecureExecmemForSwiftshader())).
 		FlagWithArg("-D target_enforce_debugfs_restriction=", c.enforceDebugfsRestrictions(ctx)).
+		FlagWithArg("-D target_recovery=", strconv.FormatBool(c.isTargetRecovery())).
 		Flag("-s").
 		Inputs(srcs).
 		Text("> ").Output(conf)
@@ -439,6 +459,10 @@
 	return c
 }
 
+func (c *policyBinary) InstallInRoot() bool {
+	return c.InstallInRecovery()
+}
+
 func (c *policyBinary) Installable() bool {
 	return proptools.BoolDefault(c.properties.Installable, true)
 }
@@ -505,7 +529,12 @@
 		c.SkipInstall()
 	}
 
-	c.installPath = android.PathForModuleInstall(ctx, "etc", "selinux")
+	if c.InstallInRecovery() {
+		// install in root
+		c.installPath = android.PathForModuleInstall(ctx)
+	} else {
+		c.installPath = android.PathForModuleInstall(ctx, "etc", "selinux")
+	}
 	c.installSource = out
 	ctx.InstallFile(c.installPath, c.stem(), c.installSource)
 }
