Loading README.md +12 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,18 @@ and then in another terminal: dlv connect :1234 ``` If you see an error: ``` Could not attach to pid 593: this could be caused by a kernel security setting, try writing "0" to /proc/sys/kernel/yama/ptrace_scope ``` you can temporarily disable [Yama's ptrace protection](https://www.kernel.org/doc/Documentation/security/Yama.txt) using: ```bash sudo sysctl -w kernel.yama.ptrace_scope=0 ``` ## Contact Email android-building@googlegroups.com (external) for any questions, or see Loading android/config.go +0 −4 Original line number Diff line number Diff line Loading @@ -689,10 +689,6 @@ func (c *config) DevicePrimaryArchType() ArchType { return c.Targets[Android][0].Arch.ArchType } func (c *config) SkipDeviceInstall() bool { return c.EmbeddedInMake() } func (c *config) SkipMegaDeviceInstall(path string) bool { return Bool(c.Mega_device) && strings.HasPrefix(path, filepath.Join(c.buildDir, "target", "product")) Loading android/module.go +11 −1 Original line number Diff line number Diff line Loading @@ -155,6 +155,7 @@ type ModuleContext interface { InstallInData() bool InstallInSanitizerDir() bool InstallInRecovery() bool InstallBypassMake() bool RequiredModuleNames() []string HostRequiredModuleNames() []string Loading Loading @@ -192,6 +193,7 @@ type Module interface { InstallInData() bool InstallInSanitizerDir() bool InstallInRecovery() bool InstallBypassMake() bool SkipInstall() ExportedToMake() bool NoticeFile() OptionalPath Loading Loading @@ -837,6 +839,10 @@ func (m *ModuleBase) InstallInRecovery() bool { return Bool(m.commonProperties.Recovery) } func (m *ModuleBase) InstallBypassMake() bool { return false } func (m *ModuleBase) Owner() string { return String(m.commonProperties.Owner) } Loading Loading @@ -1493,6 +1499,10 @@ func (m *moduleContext) InstallInRecovery() bool { return m.module.InstallInRecovery() } func (m *moduleContext) InstallBypassMake() bool { return m.module.InstallBypassMake() } func (m *moduleContext) skipInstall(fullInstallPath OutputPath) bool { if m.module.base().commonProperties.SkipInstall { return true Loading @@ -1506,7 +1516,7 @@ func (m *moduleContext) skipInstall(fullInstallPath OutputPath) bool { } if m.Device() { if m.Config().SkipDeviceInstall() { if m.Config().EmbeddedInMake() && !m.InstallBypassMake() { return true } Loading android/paths.go +15 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ type ModuleInstallPathContext interface { InstallInData() bool InstallInSanitizerDir() bool InstallInRecovery() bool InstallBypassMake() bool } var _ ModuleInstallPathContext = ModuleContext(nil) Loading Loading @@ -818,6 +819,17 @@ func PathForOutput(ctx PathContext, pathComponents ...string) OutputPath { return OutputPath{basePath{path, ctx.Config(), ""}} } // pathForInstallInMakeDir is used by PathForModuleInstall when the module returns true // for InstallBypassMake to produce an OutputPath that installs to $OUT_DIR instead of // $OUT_DIR/soong. func pathForInstallInMakeDir(ctx PathContext, pathComponents ...string) OutputPath { path, err := validatePath(pathComponents...) if err != nil { reportPathError(ctx, err) } return OutputPath{basePath{"../" + path, ctx.Config(), ""}} } // PathsForOutput returns Paths rooted from buildDir func PathsForOutput(ctx PathContext, paths []string) WritablePaths { ret := make(WritablePaths, len(paths)) Loading Loading @@ -1123,6 +1135,9 @@ func PathForModuleInstall(ctx ModuleInstallPathContext, pathComponents ...string outPaths = append([]string{"debug"}, outPaths...) } outPaths = append(outPaths, pathComponents...) if ctx.InstallBypassMake() && ctx.Config().EmbeddedInMake() { return pathForInstallInMakeDir(ctx, outPaths...) } return PathForOutput(ctx, outPaths...) } Loading android/paths_test.go +4 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,10 @@ func (m moduleInstallPathContextImpl) InstallInRecovery() bool { return m.inRecovery } func (m moduleInstallPathContextImpl) InstallBypassMake() bool { return false } func TestPathForModuleInstall(t *testing.T) { testConfig := TestConfig("", nil) Loading Loading
README.md +12 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,18 @@ and then in another terminal: dlv connect :1234 ``` If you see an error: ``` Could not attach to pid 593: this could be caused by a kernel security setting, try writing "0" to /proc/sys/kernel/yama/ptrace_scope ``` you can temporarily disable [Yama's ptrace protection](https://www.kernel.org/doc/Documentation/security/Yama.txt) using: ```bash sudo sysctl -w kernel.yama.ptrace_scope=0 ``` ## Contact Email android-building@googlegroups.com (external) for any questions, or see Loading
android/config.go +0 −4 Original line number Diff line number Diff line Loading @@ -689,10 +689,6 @@ func (c *config) DevicePrimaryArchType() ArchType { return c.Targets[Android][0].Arch.ArchType } func (c *config) SkipDeviceInstall() bool { return c.EmbeddedInMake() } func (c *config) SkipMegaDeviceInstall(path string) bool { return Bool(c.Mega_device) && strings.HasPrefix(path, filepath.Join(c.buildDir, "target", "product")) Loading
android/module.go +11 −1 Original line number Diff line number Diff line Loading @@ -155,6 +155,7 @@ type ModuleContext interface { InstallInData() bool InstallInSanitizerDir() bool InstallInRecovery() bool InstallBypassMake() bool RequiredModuleNames() []string HostRequiredModuleNames() []string Loading Loading @@ -192,6 +193,7 @@ type Module interface { InstallInData() bool InstallInSanitizerDir() bool InstallInRecovery() bool InstallBypassMake() bool SkipInstall() ExportedToMake() bool NoticeFile() OptionalPath Loading Loading @@ -837,6 +839,10 @@ func (m *ModuleBase) InstallInRecovery() bool { return Bool(m.commonProperties.Recovery) } func (m *ModuleBase) InstallBypassMake() bool { return false } func (m *ModuleBase) Owner() string { return String(m.commonProperties.Owner) } Loading Loading @@ -1493,6 +1499,10 @@ func (m *moduleContext) InstallInRecovery() bool { return m.module.InstallInRecovery() } func (m *moduleContext) InstallBypassMake() bool { return m.module.InstallBypassMake() } func (m *moduleContext) skipInstall(fullInstallPath OutputPath) bool { if m.module.base().commonProperties.SkipInstall { return true Loading @@ -1506,7 +1516,7 @@ func (m *moduleContext) skipInstall(fullInstallPath OutputPath) bool { } if m.Device() { if m.Config().SkipDeviceInstall() { if m.Config().EmbeddedInMake() && !m.InstallBypassMake() { return true } Loading
android/paths.go +15 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ type ModuleInstallPathContext interface { InstallInData() bool InstallInSanitizerDir() bool InstallInRecovery() bool InstallBypassMake() bool } var _ ModuleInstallPathContext = ModuleContext(nil) Loading Loading @@ -818,6 +819,17 @@ func PathForOutput(ctx PathContext, pathComponents ...string) OutputPath { return OutputPath{basePath{path, ctx.Config(), ""}} } // pathForInstallInMakeDir is used by PathForModuleInstall when the module returns true // for InstallBypassMake to produce an OutputPath that installs to $OUT_DIR instead of // $OUT_DIR/soong. func pathForInstallInMakeDir(ctx PathContext, pathComponents ...string) OutputPath { path, err := validatePath(pathComponents...) if err != nil { reportPathError(ctx, err) } return OutputPath{basePath{"../" + path, ctx.Config(), ""}} } // PathsForOutput returns Paths rooted from buildDir func PathsForOutput(ctx PathContext, paths []string) WritablePaths { ret := make(WritablePaths, len(paths)) Loading Loading @@ -1123,6 +1135,9 @@ func PathForModuleInstall(ctx ModuleInstallPathContext, pathComponents ...string outPaths = append([]string{"debug"}, outPaths...) } outPaths = append(outPaths, pathComponents...) if ctx.InstallBypassMake() && ctx.Config().EmbeddedInMake() { return pathForInstallInMakeDir(ctx, outPaths...) } return PathForOutput(ctx, outPaths...) } Loading
android/paths_test.go +4 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,10 @@ func (m moduleInstallPathContextImpl) InstallInRecovery() bool { return m.inRecovery } func (m moduleInstallPathContextImpl) InstallBypassMake() bool { return false } func TestPathForModuleInstall(t *testing.T) { testConfig := TestConfig("", nil) Loading