diff --git a/android/androidmk.go b/android/androidmk.go index 8f9f3bcd2..aeb0aa521 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -224,6 +224,9 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b if len(amod.commonProperties.Init_rc) > 0 { fmt.Fprintln(w, "LOCAL_INIT_RC := ", strings.Join(amod.commonProperties.Init_rc, " ")) } + if amod.commonProperties.Proprietary { + fmt.Fprintln(w, "LOCAL_PROPRIETARY_MODULE := true") + } } if host { diff --git a/android/config.go b/android/config.go index 4a59bade8..8f531ccd4 100644 --- a/android/config.go +++ b/android/config.go @@ -443,6 +443,13 @@ func (c *deviceConfig) Arches() []Arch { 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 1a6125a3e..e76e1fe61 100644 --- a/android/paths.go +++ b/android/paths.go @@ -631,7 +631,7 @@ func PathForModuleInstall(ctx ModuleContext, paths ...string) OutputPath { 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 3436a75e2..1ee6c9bba 100644 --- a/android/variable.go +++ b/android/variable.go @@ -113,6 +113,8 @@ type productVariables struct { UseGoma *bool `json:",omitempty"` Debuggable *bool `json:",omitempty"` + VendorPath *string `json:",omitempty"` + ClangTidy *bool `json:",omitempty"` TidyChecks *string `json:",omitempty"` diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index 5d9f1b41c..72ececbfc 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go @@ -78,6 +78,7 @@ var standardProperties = map[string]struct { "LOCAL_PACK_MODULE_RELOCATIONS": {"pack_relocations", bpparser.BoolType}, "LOCAL_TIDY": {"tidy", bpparser.BoolType}, "LOCAL_USE_VNDK": {"use_vndk", bpparser.BoolType}, + "LOCAL_PROPRIETARY_MODULE": {"proprietary", bpparser.BoolType}, "LOCAL_EXPORT_PACKAGE_RESOURCES": {"export_package_resources", bpparser.BoolType}, }