Taking perfect screenshots for Play Store submission is not an easy task for a developer because a normal screenshot can contain a lot of other information which is not necessary such as debug notification icon, battery charging icon and other extra icons on status bar as shown in the image below

Status bar with extra icons

Android M has a nifty feature of demo mode which can help removing extra information on the status bar. According to google -

Demo mode for the status bar allows you to force the status bar into a fixed state, useful for taking screenshots with a consistent status bar state, or testing different status icon permutations. Demo mode is available in recent versions of Android.

Initially demo mode is protected behind the system setting. To enable it, the user has to execute an ADB shell command and then only can execute other commands to change battery level, clock time, network, hide notifications etc on the status bar. After running these commands above screenshot will change to as shown below -

A cleaner status bar

To reduce the effort of typing the same command for every screenshot. I have written a small windows batch script which automatically runs all the commands, capture screenshot and move it from device to PC.

Script running the commands

Batch script is available on github. I would love to see people contributing and adding something which i missed or which should be there.