ADB录屏命令介绍

时间:2025-01-28 07:59:48

adb shell screenrecord --help

adb shell screenrecord --time-limit 100 /sdcard/demo.mp4
adb pull /sdcard/demo.mp4 .
adb shell rm /sdcard/

ps -ef|grep screenrecord|grep -v grep|awk '{print $2}'|xargs kill

adb -s 19d919fb shell screenrecord --time-limit 100 /sdcard/demo.mp4

adb -s <udid> shell ...

 

录屏功能
1、开始录屏
adb -s %s shell screenrecord --time-limit %d %s",(deviceId, timeLimit, screenRecordFileName)

2、上传录屏文件

adb -s %s pull %s %s",(deviceId, screenRecordFileName, uploadScreenfile)
3、结束录屏

Ctrl + C

或ps -ef|grep screenrecord|grep -v grep|awk '{print $2}'|xargs kill

4、删除手机录屏文件
adb -s %s shell rm %s",(deviceId, screenRecordFileName)