adb shell をWindowsで使うと"\r\r\n"("LFLFCR")になる
Windowsで以下のようなadb shellの結果を保存すると
改行コードが"\r\r\n(0x0D,0x0D,0x0A[CRCRLF])になる。
adb shell dumpsys > aaa.txt
0x0D,0x0D,0x0A
[\r\n]の[\n]を[\r\n]に変えるので、[\r\r\n]になるようだ。
以下のように置換の処理を間に入れると、消える。
>adb shell dumpsys activity | sed -e 's/\r\r\n/\r\n/g' > aaa.txt