Install flattened/unflattend apexes for GSI
GSI targets are supposed to have both 'flattened' and 'unflattened'
APEXes. By adding 'flattened' APEX as REQUIRED moduled for 'unflattened'
APEX, both will be installed togetther.
This is done by a new variable PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES,
which is set only for GSI targets.
Bug: 137802149
Test: lunch aosp_arm64-userdebug && m
resulting apex images under /system/apex
and flattened apexes under /system/system_ext/apex
Change-Id: I336e2674e427b358542e0045b2a49dfa3d84095b
diff --git a/apex/apex.go b/apex/apex.go
index 289175b..4efba03 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -905,6 +905,10 @@
} else {
a.suffix = ""
a.primaryApexType = true
+
+ if ctx.Config().InstallExtraFlattenedApexes() {
+ a.externalDeps = append(a.externalDeps, a.Name()+flattenedSuffix)
+ }
}
case zipApex:
if proptools.String(a.properties.Payload_type) == "zip" {