summaryrefstree
path: root/vendor/etc/usb_update_daemon.sh
blob: ce352f8fc0d98fdb06dcd0e6545816d6f97cac86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/vendor/bin/sh

USB_UPDATE_FLAG="/sys/kernel/usb_update"
log -p e -t USB_UPDATE "start check to reboot to usb update mode"
while true
do
	if [ -e  $USB_UPDATE_FLAG ]; then
		log -p e -t USB_UPDATE "try to reboot to usb update mode"
		setprop sys.powerctl reboot,usbupdate
		sleep 5
	fi
	sleep 1
done