:: this is .bat test
::
::
:: 2015_02_28
:: yangchaofeng
@echo off
echo 欢迎来到BAT!
:: ############################# 显示LEDS 亮度值 #############################
:Display_leds_brightness
echo left_brightness
adb shell cat /sys/class/leds/left/brightness
echo right_brightness
adb shell cat /sys/class/leds/right/brightness
echo right_brightness
adb shell cat /sys/class/leds/lcd-backlight/brightness
GOTO :EOF
:: ############################# 自动重启 #############################
:auto_reboot
echo adb shell sleep 20
adb shell sleep 20
echo adb reboot
adb reboot
GOTO :EOF
:: ############################# 获取系统时间 #############################
:get_system_time
set path="%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%"
echo %path%
::mkdir %path%
::cd ./%path%
GOTO :EOF
:: ########################################### main 函数 ###########################################
set /a num=0
:main_start
echo adb wait-for-device
adb wait-for-device
if 1==0 (
call :Display_leds_brightness
)
if 1==0 (
call :auto_reboot
)
if 1==1 (
call :get_system_time
)
::adb shell sleep 4
set /a num=num+1
echo ################# The times is %num% ##########################
goto main_start
:: ########################################### main 函数 ###########################################
pause
::
::
:: 2015_02_28
:: yangchaofeng
@echo off
echo 欢迎来到BAT!
:: ############################# 显示LEDS 亮度值 #############################
:Display_leds_brightness
echo left_brightness
adb shell cat /sys/class/leds/left/brightness
echo right_brightness
adb shell cat /sys/class/leds/right/brightness
echo right_brightness
adb shell cat /sys/class/leds/lcd-backlight/brightness
GOTO :EOF
:: ############################# 自动重启 #############################
:auto_reboot
echo adb shell sleep 20
adb shell sleep 20
echo adb reboot
adb reboot
GOTO :EOF
:: ############################# 获取系统时间 #############################
:get_system_time
set path="%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%"
echo %path%
::mkdir %path%
::cd ./%path%
GOTO :EOF
:: ########################################### main 函数 ###########################################
set /a num=0
:main_start
echo adb wait-for-device
adb wait-for-device
if 1==0 (
call :Display_leds_brightness
)
if 1==0 (
call :auto_reboot
)
if 1==1 (
call :get_system_time
)
::adb shell sleep 4
set /a num=num+1
echo ################# The times is %num% ##########################
goto main_start
:: ########################################### main 函数 ###########################################
pause