A small bash script to capture Android device screen as animated GIF
To lower the size of output file quality is pretty low. Additionally script turns on showing touches during recording and restores previous value of it after finish.
Original script taken from lorenzos' gist