Ubuntu Touch comes with a command line utility called mirscreencast which dumps screen frames to a file.
The idea here is to stream UT display to a listening computer over the network or directly trough adb so that we can either watch it live or record it to a file.

NB: timeout here is used in order to kill process properly on device ( here 120 seconds ). Otherwise process still continuing even if killed on computer.
You can reduce or increase frame per second with``–cap-interval`` (1 = 60fps, 2=30fps, …) and size of frames 384640 means width=384 height=640