Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44731845 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Enforce adb_keys to be installed in product partition" into main

parents 8d50217c 06689b18
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -36,6 +36,11 @@ func AdbKeysModuleFactory() android.Module {

func (m *AdbKeysModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
	productVariables := ctx.Config().ProductVariables()

	if !m.ProductSpecific() {
		ctx.ModuleErrorf("adb_keys module type must set product_specific to true")
	}

	if !(android.Bool(productVariables.Debuggable) && len(android.String(productVariables.AdbKeys)) > 0) {
		m.SkipInstall()
		return
@@ -48,7 +53,7 @@ func (m *AdbKeysModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
		Output: m.outputPath,
		Input:  input.Path(),
	})
	m.installPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().ProductPath(), "etc/security")
	m.installPath = android.PathForModuleInstall(ctx, "etc/security")
	ctx.InstallFile(m.installPath, "adb_keys", m.outputPath)
}