androi截屏
来源:互联网 发布:淘宝号被冻结无法登录 编辑:程序博客网 时间:2024/04/30 23:22
转载自;http://blog.csdn.net/wirelessqa/article/details/29187339
查看帮助命令
bixiaopeng@bixiaopeng ~$ adb shell screencap -vscreencap: invalid option -- vusage: 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
这种方法比较麻烦,需要3步:1. 截图保存到sdcard 2.将图片导出 3.删除sdcard中的图片
截图直接保存到电脑
$ adb shell screencap -p | sed 's/\r$//' > screen.png
执行adb shell 将\n转换\r\n, 因此需要用sed删除多余的\r
如果直接当命令用还可以用 alias 包裝装起來:
$ alias and-screencap="adb shell screencap -p | sed 's/\r$//'"$ and-screencap > screen.png
以后就可以方便的用and-screencap > 直接将截图保存到电脑上了
0 0
- androi截屏
- androi
- androi 适配
- Androi blog
- Androi CheckBox
- Androi 开发技巧
- Androi UI Intent
- androi中xliff:g
- androi背景设置
- Androi SQL语句注意事项
- androi 图片自由拼接
- Androi系统设置Table
- androi.mk 分析
- androi java条件编译
- androi surfaceview and camera
- androi 系统优化
- Androi之Canvas drawText
- android - androi…
- 指定的架构名称 "dbo" 不存在,或者您没有使用该名称的权限.
- JAVA线程同步浅析
- 理解红黑树(2)
- SQL分页语句
- android 百度地图API使用教程说明
- androi截屏
- php 解析xml 的四种方法(转)
- android面试题2
- Eclipse安装及环境配置
- Android中关于Volley的使用(五)缓存机制的深入认识
- python paramiko
- P52第29题
- 常用正则表达式
- 第二十二题