美文网首页
Android 截图命令 screencap

Android 截图命令 screencap

作者: 暮色尘封 | 来源:发表于2020-11-02 00:09 被阅读0次

帮助命令

bixiaopeng@bixiaopeng ~$ adb shell screencap -v
screencap: invalid option -- v
usage: screencap [-hp] [-d display-id] [FILENAME]
   -h: this message
   -p: save the file as a png.
   -d: specify the display id to capture, default 0.
If FILENAME ends with .png it will be saved as a png.
If FILENAME is not given, the results will be printed to stdout.

截图保存到SD卡里再导出

adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
adb shell rm /sdcard/screen.png

使用screencap命令,可以实现截屏、保存为文件的功能。
所以,我们可以 (1)用screencap截屏并保存;(2)用adb pull把截屏文件复制到本地电脑;(3)把手机上的截屏文件删除。

相关文章

网友评论

      本文标题:Android 截图命令 screencap

      本文链接:https://www.haomeiwen.com/subject/oolpvktx.html