The screenrecord command is a shell utility for recording the display of devices running Android 4.4 (API level 19) and higher. The utility records screen activity to an MPEG-4 file, which you can then download and use as part of a video presentation. This utility is useful for developers who want to create promotional or training videos without using a separate recording device.
$ adb shell screenrecord /sdcard/demo.mp4
$ adb shell(press Ctrl-C to stop)
shell@ $ screenrecord --verbose /sdcard/demo.mp4
shell@ $ exit
$ adb pull /sdcard/demo.mp4
$ adb shell screenrecord --bit-rate 8000000 --time-limit 30 /sdcard/demo.mp4
There are some known limitations of the screenrecord utility that you should be aware of when using it:
- Some devices may not be able to record at their native display resolution. If you encounter problems with screen recording, try using a lower screen resolution.
- Rotation of the screen during recording is not supported. If the screen does rotate during recording, some of the screen is cut off in the recording.
- Audio is not recorded with the video file.