%rdtmp%
set name2=miflash_unlock-5.5.224.55
set filename=tmp\%name2%.zip
set url=http://miuirom.xiaomi.com/rom/u1106245679/5.5.224.55/%name2%.zip
set exec=tools\%name2%\miflash_unlock.exe


echo - 检测文件……
if not exist %exec% (
    rd /S /Q tools\miflash_unlock-* >nul 2>nul
    md tools\%name2%
    echo - 未检测到文件，开始下载%name2%.zip%
    wget --no-check-certificate -O %filename% %url%
    if not exist %filename% ( abort 下载异常 )
    echo - 解压%filename%
    busybox unzip -oq %filename% -d tools\%name2% && del /Q %filename%
        if not exist %exec% (
            dir %name2%
            abort 解压异常
        )
)



echo - 请选择您的设备状态
echo.
set gn=
echo - 1.系统/rec/TWRP模式下        已在FASTBOOT模式下请输入任意回直接回车即可
echo.
echo.
set /p gn=%t2%
    if "%gn%"=="1" (
        call bat\a1.bat
        call bat\a3.bat
        echo.
    )
        call bat\f1.bat
        start %exec%
