With the screen capture widget
The screen capture widget is available on the device display.
By command line
The adb shell screenrecord command records the device screen.
Install and configure the gmsaas CLI. Connect the device to adb via gmsaas. Use the adb shell screenrecord [--time-limit] <DESTINATION> command.
For example, to record your screen to /sdcard/Download/screenrec.mp4: adb shell screenrecord /sdcard/Download/screenrec.mp4
Note The default recording time limit is 180 seconds (3 minutes). This limit can be changed with the --time-limit option. Maximum value is 86400 (24 hours). For example, to record the screen for 5 minutes (300 seconds): adb shell screenrecord --time-limit 300 /sdcard/test5min.mp4