本文总结三种用于安卓录屏的解决方案:
adb shell命令screenrecord
MediaRecorder, MediaProjection
MediaProjection , MediaCodec和MediaMuxer
screenrecord命令
screenrecord是一个shell命令,支持Android4.4(API level 19)以上,录制的视频格式为mp4 ,存放到手机sd卡里,默认录制时间为180s
adb shell screenrecord –size 1280*720 –bit-rate 6000000 –time-limit 30 /sdcard/demo
1