啊衰动漫,作是一种主义,女子别动队 薛敏
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:
–size 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.
–bit-rate rate 设置bit率
set the video bit rate, in megabits per second. default 4mbps.
–time-limit time 设置录制时间,默认最大时长180秒
set the maximum recording time, in seconds. default / maximum is 180.
–rotate 旋转输出
rotate the output 90 degrees.
–verbose
display interesting information on stdout.
–help
show this message.
recording continues until ctrl-c is hit or the time limit is reached.
总结
以上所述是小编给大家介绍的android设置adb自带screenrecord录屏命令,希望对大家有所帮助
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Android studio开发小型对话机器人app(实例代码)
Android通过Java sdk的方式接入OpenCv的方法
Android 通过cmake的方式接入opencv的方法步骤
Android Studio finish()方法的使用与解决app点击“返回”(直接退出)
Android 进度条 ProgressBar的实现代码(隐藏、出现、加载进度)
网友评论