更新1.2版本
- 增加 支持解包Recovery
- 增加 支持打包Recovery
- 增加 支持刷入Recovery
- 增加 重启至Fastboot模式
- 修复Bug
下载地址:TWRP+Recovery.zip
更新1.1版本
- 新增 读取手机型号与TWRP版本
- 新增 TWRP备份是默认文件名
- 新增 拖入即可恢复备份文件
- Batch 优化
更新1.0版本
- 汉化
- 优化
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 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
@echo off color 0A mode con:cols=120 lines=35 title TWRP+Recovery-Tool v1.2 :menu call :home set "twrp=" set "model=" set "compress=" set "filename=" set "filename2=" echo. ================ MENU (菜单)================= echo. echo A. Unpack Recovery A.(解包Recovery) echo B. Repack Recovery B.(打包Recovery) echo C. Flash Recovery C.(刷人Recovery) echo. echo 1. Complete Backup 1.(完整的备份) echo 2. Backup System Only 2.(只备份系统) echo 3. Backup Data Only 3.(只备份数据) echo 4. Backup Boot Only 4.(只备份引导) echo 5. Backup From Phone GUI 5.(手机选择备份) echo 6. Restore backup 6.(恢复备份文件) echo. echo 7. Boot Into fastboot 7.(启动刷机模式) echo 8. Boot Into Recovery 8.(启动恢复模式) echo 9. Reboot System 9.(重新启动系统) echo. (adb shell getprop ro.twrp.version > $ )>nul 2>nul set /p twrp=<$ (adb shell getprop ro.product.model > $ )>nul 2>nul set /p model=<$ set "model=%model: =%" del /s /q $ >nul 2>nul echo %model%|find /i "=" >nul && set "model=" if "%model%"=="" ( echo Current device ^(当前设备^): null ^(空^) ) else ( echo Current device ^(当前设备^): %model%) if "%twrp%"=="" ( echo TWRP version ^(当前版本^): Unknown ^(未知^) ) else ( echo TWRP version ^(当前版本^): %twrp%) if not "%~nx1" == "" ( echo Recovered files ^(恢复文件^):%~nx1 pause adb restore %~nx1) set /p choice= Choose your option (你的选择): if '%choice%'=='a' goto unpack if '%choice%'=='b' goto repack if '%choice%'=='c' goto flash if '%choice%'=='1' goto full if '%choice%'=='2' goto system if '%choice%'=='3' goto data if '%choice%'=='4' goto boot if '%choice%'=='5' goto gui if '%choice%'=='6' goto rest if '%choice%'=='7' goto fastboot if '%choice%'=='8' goto recovery if '%choice%'=='9' goto reboot goto menu _________________________________________________________________________________ :full cls call :home call :input adb backup %filename2%·full.ab --twrp system cache data boot %compress% echo. pause goto menu _________________________________________________________________________________ :system cls call :home call :input adb backup %filename2%·system.ab --twrp system %compress% echo. pause goto menu _________________________________________________________________________________ :data cls call :home call :input adb backup %filename2%·data.ab --twrp data %compress% echo. pause goto menu _________________________________________________________________________________ :boot cls call :home call :input adb backup %filename2%·boot.ab --twrp boot %compress% echo. pause goto menu _________________________________________________________________________________ :gui cls call :home call :input echo. echo Check your phone for the options. echo 查看您的手机的选项. echo. adb backup %filename2%·custom.ab --twrp echo. pause goto menu _________________________________________________________________________________ :rest cls call :home echo. echo Make sure that the backup file is in the same location as this tool. echo 确保备份文件与此工具在同一位置. echo. echo Make sure that the phone is already the "Recovery" interface. echo 确保手机已经是 "Recovery" 界面. echo. echo Drag the backup file to the tool icon ,and enter the recovery phase without input. echo 将备份文件拖动到工具图标,即可免去输入进入恢复阶段. echo. echo. set /p filename= Name of the backup file(备份文件的名字): IF /i "%filename%"=="" goto menu adb restore %filename% echo. pause goto menu _________________________________________________________________________________ :fastboot cls call :home echo. echo Booting into fastboot... echo 重新启动到刷机模式… echo. adb reboot bootloader echo. pause goto menu _________________________________________________________________________________ :recovery cls call :home echo. echo Booting into recovery... echo 重新启动到恢复模式… echo. adb reboot recovery echo. pause goto menu _________________________________________________________________________________ :reboot cls call :home echo. echo Rebooting your device... echo 重新启动您的设备… echo. adb reboot echo. pause goto menu _________________________________________________________________________________ :input echo. for /f %%i in ( 'powershell -c "Get-Date -uformat "%%y%%m%%d·%%H%%M""' ) do ( set "DT=%%i") echo Default File name (默认文件名): %DT%·%model%·xxx.ab echo. set /p filename= Backup File Name (备份文件名): if NOT "%filename%"=="" ( set "filename2=-f %filename%" ) else ( set "filename2=-f %DT%·%model%") echo. echo Default compression (默认压缩!):是 set /p compress= Compress?(yes/no) (是否压缩?): IF /i "%compress%"=="" set compress=--compress IF /i "%compress%"=="1" set compress=--compress IF /i "%compress%"=="y" set compress=--compress IF /i "%compress%"=="是" set compress=--compress IF /i "%compress%"=="yes" set compress=--compress IF /i "%compress%"=="no" set compress= IF /i "%compress%"=="否" set compress= IF /i "%compress%"=="0" set compress= IF /i "%compress%"=="n" set compress= echo. goto :eof _________________________________________________________________________________ :unpack cls echo. if not exist recovery.img ( echo. echo There is no recovery.img file, and now returns to the main menu echo ^(未发现recovery.img文件,即将返回主菜单^) ping 127.0.0.1 -n 2 >nul goto menu ) else ( rd /s /q recovery) echo unpack recovery.img...... echo (正在解包recovery.img......) md recovery copy recovery.img recovery\boot.img>nul cd recovery ..\bootimg.exe --unpack-bootimg del boot-old.img del boot.img cd .. echo. pause goto menu _________________________________________________________________________________ :repack cls echo. if not exist recovery ( echo. echo There is no recovery folder, and now returns to the main menu echo ^(未发现recovery文件夹,即将返回主菜单^) ping 127.0.0.1 -n 2 >NUL goto menu) echo repack recovery.img...... echo (正在打包recovery.img......) xcopy /e/I/h/r/y/s "recovery" "recovery_bak">nul cd recovery ..\bootimg.exe --repack-bootimg cd .. move recovery\boot-new.img .\recovery-new.img>nul rd /s /q recovery ren recovery_bak recovery echo. pause goto menu _________________________________________________________________________________ :flash CLS color 0C mode con cols=62 lines=30 echo ============================================================ echo. echo 按下面所述步骤进入fastboot模式: echo. echo. 1.首先需要确定手机无BL锁,或已经先解BL锁(BootLoader) echo. echo 2.其次确保手机有一定电量,即将刷入 recovery-new.img echo. echo. 3.同时按住音量下和开机键不放直到显示米兔画面后才松手 echo. echo. 4.完成上述步骤,将手机连接到电脑,按任意键继续刷人 REC echo. echo. echo ============================================================ pause >nul CLS echo ============================================================ echo. echo 是否看见类似如下提示: echo. echo xxxxx fastboot echo. echo 如果看到提示,证明手机与电脑连接正常,按任意键正式开始刷入 echo. echo 否则请关闭此窗口,并检查驱动是否正确安装,手机是否正确连接 echo. echo 刷入 Recovery 时,请一定保证 手机 和 电脑 的连接正常 ! echo. echo ============================================================ echo. echo. fastboot.exe devices pause >nul CLS echo ============================================================ echo. echo 是否看见类似如下提示: echo. echo sending 'recovery' (15502 KB)... echo OKAY [ 0.500s] echo writing 'recovery'... echo OKAY [ 0.560s] echo finished. total time: 2.455s echo. echo 如果看到以上提示,按任意键正式开始导入! echo 如果看到以下提示,关闭此窗口,检查连接! echo. echo ^< waiting for device ^> echo. echo. echo ============================================================ echo. echo. fastboot.exe flash recovery recovery-new.img pause >nul CLS echo ============================================================ echo. echo. echo 是否看见类似如下提示: echo. echo. downloading 'boot.img'... echo. OKAY [ 0.838s] echo. booting... echo. OKAY [ 0.025s] echo. finished. total time: 0.864s echo. echo 如果看到以上提示,证明刷入成功,按任意键重启! echo. echo 此时千万不要关闭此窗口,关闭后将恢复官方Recovery echo. echo. echo ============================================================ echo. echo. fastboot.exe boot recovery-new.img pause >nul CLS echo ============================================================ echo. echo. echo 恭喜你成功刷入了Recovery!! echo. echo 耐心稍等片刻,手机会自动重启,按任意键关闭此窗口 echo. echo. echo ============================================================ echo. echo. pause goto menu _________________________________________________________________________________ :home CLS echo. echo # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # echo # # echo # # echo # TWRP+Recovery-Tool # echo # # echo # # echo # by ZhangZsky # echo # # echo # http:^/^/snote.cn^/twrp-backup-tool^/ # echo # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # echo. |
发表回复