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(

相关文章:

  • 2021-04-16
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2022-02-09
  • 2021-07-20
  • 2021-05-19
猜你喜欢
  • 2021-10-22
  • 2021-11-13
  • 2021-04-02
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2021-11-01
相关资源
相似解决方案