Android demo mode over ADB
When taking screenshots of Android apps, it is very useful to use demo mode, which removes icons from the status bar, and sets the clock to a set time such as 09:00. This can be enabled from the Developer Options menu. But, it can also be enabled via ADB, which offers the ability to customise the look of the status bar extensively.
Entering and exit demo mode via ADB
First, to allow demo mode to be used, run:
adb shell settings put global sysui_demo_allowed 1
Next, to actually enable demo mode, run:
adb shell am broadcast -a com.android.systemui.demo -e command enter
To exit demo mode, run:
adb shell am broadcast -a com.android.systemui.demo -e command exit
Customising the status bar
Setting the time
Some apps, such as my own Christmas Countdown have screenshots whose content is dependent on the device’s time. So it looks a bit strange when the clock in the status bar doesn’t match what is shown in app. This can be customised via ADB. For example, run this command to set the time to 11:23
.
adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1123
Change connection icons
To show the wifi strength at max, run the command below. The level
can be any value from 0
to 4
.
adb shell am broadcast -a com.android.systemui.demo -e command network -e wifi show -e level 4
This also works for setting the mobile network strength:
adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4
Other customisations
There are many more customisations possible, such as setting the icons for battery, bluetooth and location. For a full list, take a look at the official docs for Android Demo Mode.