本文介绍了亚行屏幕截图:未找到?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的手机植根于2.3.6姜饼。我写这些行来截屏:
My phone runs rooted 2.3.6 Gingerbread. I write these lines to take a screenshot:
adb shell screencap -p /sdcard/screen.png
说权限被拒绝!因此,我添加了 su
,就像这样:
It says permission denied! So I add su
, like this:
adb shell "su -c 'screencap -p /sdcard/screen.png'"
现在,当我运行它时,它说截屏:未找到!
Now when I run it, it says "screenshot: not found!"
推荐答案
您可以使用MonkeyRunner而不是ADB通过创建一个screenshot.py文件来完成此操作以下内容:
You could accomplish this with MonkeyRunner instead of ADB by creating a screenshot.py file with the following content:
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
device = MonkeyRunner.waitForConnection()
result = device.takeSnapshot()
result.writeToFile('<some path>/screenshot.png','png')
并使用命令运行(在Windows上)
and run it with the command (on Windows)
< android sdk path> \ \tools\monkeyrunner.bat<某些路径> \screenshot.py
这篇关于亚行屏幕截图:未找到?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!