Fix MaskAddresses for toybox sed am: e1ac18930c am: e982a63b86
am: 526336ed3a

Change-Id: Id0b2d00f16f6bcf1730623fc22aa669dcd7f330d
diff --git a/test/aarch64/test-trace-aarch64.cc b/test/aarch64/test-trace-aarch64.cc
index eac16c6..e061e0c 100644
--- a/test/aarch64/test-trace-aarch64.cc
+++ b/test/aarch64/test-trace-aarch64.cc
@@ -2739,21 +2739,14 @@
 
 
 static void MaskAddresses(const char* trace) {
-// Hexadecimal expressions of the form `\xab` do not work out-of-the box with
-// BSD `sed`. So we use ANSI-C quoting to have the regular expressions below
-// work both on Linux and BSD (and macOS).
 #ifdef __APPLE__
-#define MAYBE_ANSI_C_QUOTE "$"
-#define HEX(val) "\\x" #val
 #define ESCAPE(c) "\\\\" #c
   const char* sed_options = "-i \"\" -E";
 #else
-#define MAYBE_ANSI_C_QUOTE
-#define HEX(val) "\\x" #val
 #define ESCAPE(c) "\\" #c
-  const char* sed_options = "--in-place --regexp-extended";
+  const char* sed_options = "-i -E";
 #endif
-#define COLOUR "(" HEX(1b) ESCAPE([) "[01];([0-9][0-9])?m)?"
+#define COLOUR "(." ESCAPE([) "[01];([0-9][0-9])?m)?"
   struct {
     const char* search;
     const char* replace;
@@ -2775,7 +2768,7 @@
   for (size_t i = 0; i < patterns_length; i++) {
     size_t length = snprintf(command,
                              sizeof(command),
-                             "sed %s " MAYBE_ANSI_C_QUOTE "'s/%s/%s/' '%s'",
+                             "sed %s 's/%s/%s/' '%s'",
                              sed_options,
                              patterns[i].search,
                              patterns[i].replace,