Support system/vendor for devices without a vendor partition
Test: lunch aosp_arm-eng; m -j vulkan.default
Change-Id: I91eabf98f53c455ec4ade95215f11a6f89631747
diff --git a/android/config.go b/android/config.go
index 4a59bad..8f531cc 100644
--- a/android/config.go
+++ b/android/config.go
@@ -443,6 +443,13 @@
return arches
}
+func (c *deviceConfig) VendorPath() string {
+ if c.config.ProductVariables.VendorPath != nil {
+ return *c.config.ProductVariables.VendorPath
+ }
+ return "vendor"
+}
+
func (c *deviceConfig) VndkVersion() string {
if c.config.ProductVariables.DeviceVndkVersion == nil {
return ""
diff --git a/android/paths.go b/android/paths.go
index 1a6125a..e76e1fe 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -631,7 +631,7 @@
if ctx.Device() {
partition := "system"
if ctx.Proprietary() {
- partition = "vendor"
+ partition = ctx.DeviceConfig().VendorPath()
}
if ctx.InstallInData() {
partition = "data"
diff --git a/android/variable.go b/android/variable.go
index 3436a75..1ee6c9b 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -113,6 +113,8 @@
UseGoma *bool `json:",omitempty"`
Debuggable *bool `json:",omitempty"`
+ VendorPath *string `json:",omitempty"`
+
ClangTidy *bool `json:",omitempty"`
TidyChecks *string `json:",omitempty"`