Read ADB screencap raw image using python September 16, 2020 cmd = 'adb exec-out screencap' pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) img_bytes = pipe.stdout.read() img = np.array(Image.frombuffer('RGBA', (960, 540), img_bytes[12:], 'raw', 'RGBX', 0, 1)) References https://stackoverflow.com/questions/22034959/what-format-does-adb-screencap-sdcard-screenshot-raw-produce-without-p-f Related