@@ -6,10 +6,14 @@ What do you want to do?
6
6
1. Flash Recovery
7
7
2. Flash VBMETA
8
8
3. Use adb Sideload
9
- 4. Check adb devices
10
- 5. Check fastboot devices
11
- 6. Reboot to System
12
- 7. Flash MIUI Stock ROM (Fastboot)
9
+ 4. Use adb Sideload and Reboot to recovery
10
+ 5. Check adb devices
11
+ 6. Check fastboot devices
12
+ 7. Reboot to System
13
+ 8. Reboot to Recovery
14
+ 9. Reboot to Bootloader
15
+ 10. Reboot to Fastboot
16
+ 11. Flash MIUI Stock ROM (Fastboot)
13
17
(Press Any key to Exit or input your choice.)
14
18
\033[0m" ;
15
19
@@ -108,24 +112,67 @@ case $flasher in
108
112
109
113
;;
110
114
" 4" )
115
+
116
+ echo -e " \033[0;32m Please enter the file name of your custom rom. \033[0m" ;
117
+ read -p " Enter the zip file name: " romname
118
+
119
+ if [ ! -f " $romname " ]; then
120
+ echo -e " \033[0;31m > $romname file is not found \033[0m" ;
121
+ echo -e " \033[0;31m \033[3m Please ensure that '$romname ' file exist and try again. Have a good day! \033[0m" ;
122
+ exit 1;
123
+ fi
124
+ if [ ! -f " ./platform-tools/adb" ]; then
125
+ echo -e " \033[0;31m > adb file is not found \033[0m" ;
126
+ echo -e " \033[0;31m \033[3m Please ensure that 'adb' file exist and try again. Have a good day! \033[0m" ;
127
+ exit 1;
128
+ fi
129
+ ./platform-tools/adb sideload $romname
130
+
131
+ if [ $? -eq 0 ]; then
132
+ echo -e " \033[0;32m Sideload operation completed. Rebooting to Recovery \033[0m" ;
133
+ ./platform-tools/adb reboot recovery
134
+ fi
135
+
136
+ source ./flash.sh
137
+
138
+ ;;
139
+ " 5" )
111
140
echo -e " \033[0;32m adb device list: \033[0m"
112
141
./platform-tools/adb devices
113
142
114
143
source ./flash.sh
115
144
;;
116
- " 5 " )
145
+ " 6 " )
117
146
echo -e " \033[0;32m fastboot device list: \033[0m"
118
147
./platform-tools/fastboot devices
119
148
120
149
source ./flash.sh
121
150
;;
122
- " 6 " )
151
+ " 7 " )
123
152
echo -e " \033[0;32m Rebooting your device to system! Have a good day! \033[0m" ;
124
153
./platform-tools/fastboot reboot
125
154
126
155
source ./flash.sh
127
156
;;
128
- " 7" )
157
+ " 8" )
158
+ echo -e " \033[0;32m Rebooting your device to Recovery! \033[0m" ;
159
+ ./platform-tools/fastboot reboot recovery
160
+
161
+ source ./flash.sh
162
+ ;;
163
+ " 9" )
164
+ echo -e " \033[0;32m Rebooting your device to Bootloader! \033[0m" ;
165
+ ./platform-tools/fastboot reboot bootloader
166
+
167
+ source ./flash.sh
168
+ ;;
169
+ " 10" )
170
+ echo -e " \033[0;32m Rebooting your device to Fastboot! \033[0m" ;
171
+ ./platform-tools/fastboot reboot fastboot
172
+
173
+ source ./flash.sh
174
+ ;;
175
+ " 11" )
129
176
echo -e " \033[0;32m Great Choice! Heading up to Stock ROM Flash system! \033[0m" ;
130
177
source ./flash-stock-rom.sh;
131
178
;;
0 commit comments