1

I'm using ADB exec-out screencap -p > temp.png in a batch script, and it outputs a regular .png file whereas the exact same syntax in powershell is giving me a corrupted .png file that is not readable. Any idea how to correct this in powershell?

ADB version 1.0.40, powershell version 1.0

sh7411usa
  • 196
  • 1
  • 13
  • In short: PowerShell has no support for sending raw output from external programs to files; you need to call via `cmd /c`: `cmd /c 'ADB exec-out screencap -p > temp.png'`. See the [linked answer](https://stackoverflow.com/a/59118502/45375) for background information. – mklement0 Mar 15 '20 at 03:41

0 Answers0