Created
August 7, 2015 09:28
-
-
Save quentin23soleil/339d7278c1c3d59e681e to your computer and use it in GitHub Desktop.
Take screenshot with demo mode on Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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% |
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
Just replace those 2 vars:
adb
is the adb location on your computerfolder
is where you want the screenshots to be saved on your computer