Last active
February 14, 2016 22:22
-
-
Save dhylands/6253999 to your computer and use it in GitHub Desktop.
Sets the "Disable ADB Timer" to zero, which disables the timer.
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 | |
# Disables the adb timeout | |
set -e | |
ADB=${ADB:-adb} | |
$ADB wait-for-device | |
B2G_PREF_DIR=/system/b2g/defaults/pref | |
TMP_DIR=/tmp/adb-timeout-prefs | |
rm -rf $TMP_DIR | |
mkdir $TMP_DIR | |
cat >$TMP_DIR/adb-timeout.js <<EOF | |
pref("b2g.adb.timeout-hours", 0); | |
EOF | |
$ADB root | |
$ADB wait-for-device | |
$ADB remount | |
$ADB push $TMP_DIR/adb-timeout.js $B2G_PREF_DIR/adb-timeout.js | |
$ADB shell "stop b2g; start b2g" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment