Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #start this script with nohup /data/local/tmp/check_power
- function main(){
- power="$(dumpsys battery|grep "AC powered"|awk '{print $3}')"
- [[ "$power" == "true" ]] || reboot
- sleep 1
- }
- while [ 1 ]
- do
- main
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement