-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrboot.bat
More file actions
101 lines (94 loc) · 1.53 KB
/
rboot.bat
File metadata and controls
101 lines (94 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
@echo off
title Reboot Menu
color 5f
:RBOOT
cls
ECHO 1 - Normal Reboot.
ECHO 2 - Reboot to recovery.
ECHO 3 - Reboot to fastboot mode.
ECHO 4 - Power off the device.
ECHO 5 - Go to main menu.
ECHO.
SET /P M=Type your choice then press ENTER:
IF %M%==1 GOTO NBOOT
IF %M%==2 GOTO RRBOOT
IF %M%==3 GOTO FBOOT
IF %M%==4 GOTO POFF
IF %M%==5 GOTO MENU
GOTO RBOOT
:NBOOT
cls
ECHO Press ENTER if you want to reboot normally.
ECHO.
PAUSE
ECHO Rebooting...
ECHO.
adb reboot
if errorlevel 1 (
echo There's something wrong.
PAUSE
goto err
)
PAUSE
adb kill-server
GOTO RBOOT
:RRBOOT
cls
ECHO Press ENTER if you want to reboot in recovery.
ECHO.
PAUSE
ECHO Rebooting in recovery....
ECHO.
adb reboot recovery
if errorlevel 1 (
echo There's something wrong.
PAUSE
goto err
)
PAUSE
adb kill-server
GOTO RBOOT
:FBOOT
cls
ECHO Press ENTER if you want to reboot in fastboot/bootloader mode, i.e. when blue led lights up.
ECHO.
PAUSE
ECHO Rebooting in fastboot mode.
ECHO.
adb reboot-bootloader
if errorlevel 1 (
echo There's something wrong.
PAUSE
goto err
)
PAUSE
adb kill-server
GOTO RBOOT
:POFF
cls
ECHO Press ENTER to power off your device.
ECHO.
PAUSE
ECHO Turning off.
ECHO.
adb shell reboot -p
if errorlevel 1 (
echo There's something wrong.
PAUSE
goto err
)
PAUSE
adb kill-server
GOTO RBOOT
:err
cls
echo.
echo ___________________________________________________________________________
echo.
echo Failed. Press Any key to exit.
echo ___________________________________________________________________________
echo.
pause
exit
:MENU
call GRT.bat