Prepared by Roman Mazur, Head of Android/Java Unit at Stanfy for speaking at GDG DevFest 2015 in Lviv, Ukraine.
Android provides a set of not really well documented command line tools that are mainly used by system engineers for debugging and testing purposes. Available after entering 'adb shell', these tools can give you a lot of details about what is happening in the system and help with automation.