Last active
July 31, 2016 19:34
-
-
Save dotdoom/03586597c00a2ca8312325eb373ed910 to your computer and use it in GitHub Desktop.
Revisions
-
dotdoom revised this gist
Jul 31, 2016 . 1 changed file with 8 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,18 @@ #!/usr/bin/env bash sleep 5 if /sbin/ifconfig usb0 &>/dev/null; then # usb0 is present - we are in slave mode, this script won't work. exit fi led() { local brightness=0 [ "$1" -eq 0 ] && brightness=1 echo "$brightness" >/sys/class/leds/LED/brightness } /sbin/modprobe -r ledtrig_heartbeat while :; do @@ -18,4 +23,4 @@ while :; do led 0 sleep 2 fi done -
dotdoom revised this gist
Jul 29, 2016 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,15 @@ #!/usr/bin/env bash led() { local brightness=0 [ "$1" -eq 0 ] && brightness=1 echo "$brightness" >/sys/class/leds/LED/brightness } # Give a chance to connect something else. sleep 60 /sbin/modprobe -r ledtrig_heartbeat while :; do if adb tcpip 5554 &>/dev/null; then led 1 @@ -12,4 +18,4 @@ while :; do led 0 sleep 2 fi done -
dotdoom created this gist
Jul 20, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/usr/bin/env bash led() { echo "$@" >/sys/class/leds/red_led/brightness } while :; do if adb tcpip 5554 &>/dev/null; then led 1 sleep 10 else led 0 sleep 2 fi done