Skip to content

Instantly share code, notes, and snippets.

@mr-archano
Forked from tasomaniac/screenrecord.sh
Created April 17, 2016 08:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mr-archano/0d6d7186a3b428955a84021f6cc270c3 to your computer and use it in GitHub Desktop.
Save mr-archano/0d6d7186a3b428955a84021f6cc270c3 to your computer and use it in GitHub Desktop.
Screen Record for Android
#!/bin/sh
set -e
if [ -z "$1" ]; then
shot_path=$(date +%Y-%m-%d-%H-%M-%S).mp4
else
shot_path="$*"
fi
trap ctrl_c INT
trap alldone EXIT
function ctrl_c() {
printf "\n\nDownloading screencast"
sleep 2
adb pull /sdcard/Movies/$shot_path .
}
function alldone() {
adb shell am broadcast -a com.android.systemui.demo -e command exit >/dev/null
printf "\nRecording Finished"
open -R $shot_path
}
function setup() {
echo "Setup"
adb shell settings put global sysui_demo_allowed 1 >/dev/null
adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e datatype lte -e level 4 >/dev/null
adb shell am broadcast -a com.android.systemui.demo -e command battery -e level 100 -e plugged false >/dev/null
adb shell am broadcast -a com.android.systemui.demo -e command network -e wifi show -e level 4 >/dev/null
# Tweak this if you want the clock to changed
adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 0440 >/dev/null
# Remove this if you want notifications to be availalbe
adb shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false >/dev/null
echo "Recording Started."
echo "Press CTRL-C to stop."
}
setup
adb shell screenrecord --bit-rate 6000000 /sdcard/Movies/$shot_path
@BLACKBERRY-54CA
Copy link

Hi mr-archano. My blackberry10 OSV cant download android screen system. Pls send email setting for my blackberry. I want download screen android system

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