diff --git a/android/defs.go b/android/defs.go index 6f4631625..a7ba219a3 100644 --- a/android/defs.go +++ b/android/defs.go @@ -80,9 +80,12 @@ var ( Description: "concatenate licenses $out", }) + // ubuntu 14.04 offcially use dash for /bin/sh, and its builtin echo command + // doesn't support -e option. Therefore we force to use /bin/bash when writing out + // content to file. WriteFile = pctx.AndroidStaticRule("WriteFile", blueprint.RuleParams{ - Command: "echo '$content' > $out", + Command: "/bin/bash -c 'echo -e $$0 > $out' '$content'", Description: "writing file $out", }, "content") diff --git a/python/builder.go b/python/builder.go index 541d2bf02..b823fcb9d 100644 --- a/python/builder.go +++ b/python/builder.go @@ -82,7 +82,7 @@ func registerBuildActionForModuleFileList(ctx android.ModuleContext, Output: fileList, Implicits: files, Args: map[string]string{ - "content": strings.Join(content, "\n"), + "content": strings.Join(content, `\n`), }, })