Support recovery and recovery_available
`recovery: true` installs a module to the recovery partition.
`recovery_available: true` makes a module to be available to other
`recovery:true` or `recovery_available: true` modules.
These to are very similar to vendor, vendor_available properties, except
for the target partition.
Bug: 67916654
Bug: 64960723
Test: m -j, toybox_recovery is installed to the recovery/root/sbin
Change-Id: Iaebe0593de16c69fa70de251a61f4d018a251509
diff --git a/android/paths.go b/android/paths.go
index 91dd9a6..8cc3182 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -47,6 +47,7 @@
InstallInData() bool
InstallInSanitizerDir() bool
+ InstallInRecovery() bool
}
var _ ModuleInstallPathContext = ModuleContext(nil)
@@ -948,6 +949,8 @@
var partition string
if ctx.InstallInData() {
partition = "data"
+ } else if ctx.InstallInRecovery() {
+ partition = "recovery/root"
} else if ctx.SocSpecific() {
partition = ctx.DeviceConfig().VendorPath()
} else if ctx.DeviceSpecific() {