The first thing to do to record the screen of your Android mobile Android device is connected to the computer with the USB cable; if you have the option of USB debugging enabled, a message appears in the notification bar.
From your computer, terminal, stand on the platform-tools folder in your android SDK.
Once you are in the platform-tools directory you must run the following command:
ScreenRecord adb shell <nombre_del_archivo.mp4>
Running this command will start recording everything that is displayed on your terminal screen.
To stop recording, you need only press Control + C from the terminal.
The video will be stored inside the terminal at the path specified in the command ScreenRecord, if you want to save on the PC must run the following command:
adb pull <nombre_del_archivo.mp4>
Notably ScreenRecord save videos in an MPEG-4 file with a maximum of 3 minutes, rotating the screen during recording is not supported and the audio is not recorded.
If you want to see the command options screeenrecord you should only enter the flag-help in the command:
adb shell --help ScreenRecord