Skip to content

Instantly share code, notes, and snippets.

@quentin23soleil
Created August 7, 2015 09:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quentin23soleil/339d7278c1c3d59e681e to your computer and use it in GitHub Desktop.
Save quentin23soleil/339d7278c1c3d59e681e to your computer and use it in GitHub Desktop.
Take screenshot with demo mode on Android
#!/bin/bash
adb=your/android/sdk/path/platform-tools/adb
folder=.
$adb shell am broadcast -a com.android.systemui.demo --es command enter
$adb shell am broadcast -a com.android.systemui.demo --es command clock --es hhmm 0520
$adb shell am broadcast -a com.android.systemui.demo --es command battery --es level 100 --es plugged false
$adb shell am broadcast -a com.android.systemui.demo --es command network \
--es mobile show \
--es fully true \
--es level 4 \
--es datatype lte
$adb shell am broadcast -a com.android.systemui.demo --es command network \
--es wifi show \
--es fully true \
--es level 4
$adb shell am broadcast -a com.android.systemui.demo --es command notifications \
--es visible false
$adb shell screencap -p /sdcard/screen.png
$adb pull /sdcard/screen.png $folder/$now.png
$adb shell am broadcast -a com.android.systemui.demo --es command exit%
@quentin23soleil
Copy link
Author

Just replace those 2 vars:
adb is the adb location on your computer
folder is where you want the screenshots to be saved on your computer

@codlab
Copy link

codlab commented Aug 7, 2015

I would had a test on the known adb command from the current PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment