欢迎来到代码驿站!

Android代码

当前位置:首页 > 移动开发 > Android代码

android设置adb自带screenrecord录屏命令

时间:2021-06-09 08:08:08|栏目:Android代码|点击:

android 设置system/bin目录类似linux,该目录下有许多实用命令,类似

adb,sh,top,app_process,chmod,chown,dmesg,reboot,screenrecord等等。

录屏作用:qa测试过程中有的bug需要还原现场,此时用手机拍摄有诸多不便,此时可以利用录屏命令自动完成录屏,然后上传bug视频。

其中screenrecord命令录制视频到内部存储:

录制命令:

adb shell screenrecord --size 1920x480 /storage/sdcard0/demorecord.mp4

时间设置:

adb shell screenrecord --time-limit 100 /storage/sdcard0/demorecord.mp4

停止录制:

Ctrl + C会停止命令,自动停止录制。

参数设置:

$ adb shell screenrecord --help
Usage: screenrecord [options]
Records the device's display to a .mp4 file.
Options:
?Csize WIDTHxHEIGHT 设置屏幕宽高,一般根据自己手机设置,最大支持1920x480。
Set the video size, e.g. “1280x720”. Default is the device's main
display resolution (if supported), 1280x720 if not. For best results,
use a size supported by the AVC encoder.
?Cbit-rate RATE 设置bit率
Set the video bit rate, in megabits per second. Default 4Mbps.
?Ctime-limit TIME 设置录制时间,默认最大时长180秒
Set the maximum recording time, in seconds. Default / maximum is 180.
?Crotate 旋转输出
Rotate the output 90 degrees.
?Cverbose
Display interesting information on stdout.
?Chelp
Show this message.
Recording continues until Ctrl-C is hit or the time limit is reached.

总结

上一篇:如何为RecyclerView添加Header和Footer

栏    目:Android代码

下一篇:android实现简单的乘法计算代码

本文标题:android设置adb自带screenrecord录屏命令

本文地址:http://www.codeinn.net/misctech/138561.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有