Android 通过adb对屏幕截屏和录屏

一、通过adb进行screencap截屏
1、保存图片
adb shell screencap -p /sdcard/01.png
2、导出图片,保存到电脑
adb pull /sdcard/01.png
3、删除保存的图片
adb shell rm /sdcard/01.png
二、通过adb进行screenrecord录屏
1、保存视频,命令如下:
adb adb shell screenrecord /sdcard/test.mp4
~结束:ctrl+c
~限制录制时间为N秒: -time-limit N
~设定屏幕分辨率:adb shell screenrecord --size 800*480 /sdcard/test.mp4
~设定视频比特率:adb shell screenrecord --bit-rate 2000000 /sdcard/test.mp4
2、获取视频文件,保存到电脑
adb pull /sdcard/test.mp4

猜你喜欢

转载自blog.csdn.net/weixin_43526191/article/details/89397314