我想在我的电脑上的特定文件夹中保存创建的屏幕截图.
cmd = 'adb shell screencap -p /sdcard/screen.png'
subprocess.Popen(cmd.split())
time.sleep(5)
cmd ='adb pull /sdcard/screen.png screen.png'
subprocess.Popen(cmd.split())
Run Code Online (Sandbox Code Playgroud)
如果我想在我的工作区中使用图像,这项工作.但如果我想拉另一个文件夹中的截图不起作用.
cmd ='adb pull /sdcard/screen.png C:\Users\xxx\Desktop\prova\screen.png'
subprocess.Popen(cmd.split())
Run Code Online (Sandbox Code Playgroud)
如果我从cmd运行命令我有:Android Debug Bridge版本1.0.31
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <specific device> - directs command to the device or emulator with the given …Run Code Online (Sandbox Code Playgroud)