Open 5ulo opened 7 years ago
's|\r\r$||'
instead of 's/\r$//'
The perl method is more safer
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
If you use perl method then you would probably need perl installed on the system which might not be a big deal if I am guessing correctly.
On Android 7
adb shell screencap -p > ~/Desktop/screen.png
Is Screencap Android OS dependent?
Arch Linux (latest updates) Gnome Shell 3.24 Android 7.0
SED methot makes corrupted screenshot files on some linux distros.
adb shell screencap -p | sed 's/\r$//' > screen.png
The file was corruptedThe perl method is more safer
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
On Android 7adb shell screencap -p > ~/Desktop/screen.png