adb屏幕截屏

import subprocess

#执行结果使用管道输出,对于参数是字符串,需要指定shell=True
process = subprocess.Popen('adb shell screencap -p',shell=True, stdout=subprocess.PIPE)
binary_screenshot = process.stdout.read()
f = open('she.png', 'wb')
f.write(binary_screenshot)
f.close(
posted @ 2019-06-03 19:13  东方不败--Never  阅读(427)  评论(0编辑  收藏  举报