在Powershell中使用adb的移动屏幕截图

时间:2013-05-17 08:57:59

标签: powershell adb

我正在使用电源shell编程拍摄Android手机的屏幕截图,并在我们使用电源外壳编程构建的PC应用程序的gui中显示...

单击屏幕捕获按钮时..显示sc.png不存在的错误 这意味着adb命令没有捕获屏幕并保存在sd cad ....

$ buttonTakeScreenCapture_Click = {

     .\adb.exe shell screencap -p > sc.png 
.\adb.exe pull /sdcard/sc.png

1 个答案:

答案 0 :(得分:1)

不要使用重定向:

.\adb.exe shell screencap -p /sdcard/sc.png
.\adb.exe pull /sdcard/sc.png