#!/bin/sh

progdir=$(dirname "$0")
mount -o remount,rw /misc

if [ -f /misc/enableADB ]; then
	rm /misc/enableADB
	$progdir/adb/printstr "       ADB 已关闭       "
else
	touch /misc/enableADB
	$progdir/adb/printstr "       ADB 已开启        "
fi
sync
sleep 2
mount -o remount,ro /misc
$progdir/adb/printstr "    正在关机...    "
sleep 2
poweroff -f
while true
do
	sleep 5
done
