-
Notifications
You must be signed in to change notification settings - Fork 0
/
Run.bat
191 lines (137 loc) · 4.39 KB
/
Run.bat
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
@echo off
@SETLOCAL enabledelayedexpansion
set "FASTBOOT=%~dp0..\adb\fastboot.exe"
set "ADB=%~dp0..\adb\adb.exe"
set "Payload-dumper-go=%~dp0..\bin\payload-dumper-go.exe"
echo.
echo Scirpt to automate repitive stuff
echo The flash option flashes the boot and vb images in fastbootd
echo (it reboots automatically if the phone is in fastboot mode)
echo Made by V
echo.
:startMenu
@echo off
cls
rem Flashing AIO Menu Script
echo =================================================
echo Flashing AIO By V
echo =================================================
rem Flash Custom ROM Section
echo == Flash Custom ROM ==
echo [1] Adb sideload [2] Fastboot
rem Flash Images Section
echo -----------------------------------------------
echo == Flash Images ==
echo [7] Vendor Boot [8] Boot [9] Stock ROM
rem Extract Section
echo -----------------------------------------------
echo == Extract ==
echo [3] Vendor Boot [4] Boot
rem Patch Section
echo -----------------------------------------------
echo == Patch Boot ==
echo [5] KSU [6] Magisk
rem Miscellaneous Section
echo -----------------------------------------------
echo == Miscellaneous ==
echo [10] Exit
echo =================================================
echo.
set selection=
set /p selection= Please enter the option number(1-10):
if /i "%selection%"=="1" cls && call :flashADB
if /i "%selection%"=="2" cls && call :flashFastboot
if /i "%selection%"=="3" cls && call :extractVendorBoot
if /i "%selection%"=="4" cls && call :extractBoot
if /i "%selection%"=="5" cls && call :patchKSU
if /i "%selection%"=="6" cls && call :patchMagisk
if /i "%selection%"=="7" cls && call :flashVB
if /i "%selection%"=="8" cls && call :flashB
if /i "%selection%"=="9" cls && call :flashStock
if /i "%selection%"=="10" cls && call :exit
cls
goto :startMenu
::
::
:flashADB
echo This will flash the custom rom using adb sideload
echo You need to click the adb sideload button manually in recovery.
echo Ths script will boot into recovery and start sideloading when adb sideload is turned on.
echo Press any key to continue
pause > nul
call "%~dp0bats/flashADB.cmd"
echo.
echo Press any key to return to the Main menu.
pause > nul
exit /b 0
:flashFastboot
echo This will flash the custom rom using fastboot
echo Press any key to continue
pause > nul
call "%~dp0bats/flashFastboot.cmd"
echo.
echo Press any key to return to the Main menu.
pause > nul
exit /b 0
:extractVendorBoot
echo Press any key to continue
pause > nul
call "%~dp0bats/extractVendorBoot.cmd"
echo.
echo Press any key to return to the Main menu.
pause > nul
exit /b 0
:extractBoot
echo Press any key to continue
pause > nul
call "%~dp0bats/extractBoot.cmd"
echo.
echo Press any key to return to the Main menu.
pause > nul
exit /b 0
:patchKSU
echo If you want to flash the boot image then boot in fastbootd mode.
echo Press any key to continue
pause > nul
call "%~dp0bats/patchKSU.cmd"
echo.
echo Press any key to return to the Main menu.
pause > nul
exit /b 0
:patchMagisk
echo Currently this option flashes magisk zip using adb sideload
echo Press any key to continue
pause > nul
call "%~dp0bats/patchMagisk.cmd"
echo.
echo Press any key to return to the Main menu.
pause > nul
exit /b 0
:flashVB
echo Press any key to continue
pause > nul
call "%~dp0bats/flashVB.cmd"
echo.
echo Press any key to return to the Main menu.
pause > nul
exit /b 0
:flashB
echo Press any key to continue
pause > nul
call "%~dp0bats/flashB.cmd"
echo.
echo Press any key to return to the Main menu.
pause > nul
exit /b 0
:flashStock
echo It will flash stock rom using the commands that are present in flashfile.xml
echo Extract flashing-AIO and stock firmware in the same folder
echo Press any key to continue
pause > nul
call "%~dp0bats/flashStock.cmd"
echo.
echo Press any key to return to the Main menu.
pause > nul
exit /b 0
:exit
exit