简单记录,备用

root@froyovps ~$ 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.

注意:

如果文件名以.png结尾时,它将保存为png文件

如果文件名没有给出,则结果被会被输出到stdout

截图保存到SD卡

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

1. 截图保存到sdcard 2.将图片导出 3.删除sdcard中的图片

截图保存到电脑

$ adb shell screencap -p | sed 's/\r$//' > screen.png

执行adb shell 将\n转换\r\n, 因此需要用sed删除多余的\r

 

标签: none

已有 12 条评论

  1. 是安卓的?

  2. 好像很厉害的样子······因为我没看懂····

  3. 过来瞅瞅,学习学习(themebetter更好的主题)

  4. 哈哈,表示从未折腾过安卓呢。

  5. 关注了解一下

  6. :bobo_yiwen: :bobo_yiwen: :bobo_yiwen:

  7. 备用 哇哈哈 博主为了偷懒 真是什么都搞得出来 :bobo_yiwen:

    1. FROYO

      无关头痒的东西随手一记

  8. 在服务器里面进行截图操作?

    1. FROYO

      看看用法

评论已关闭