:: 本脚本由　by Han | 情非得已c，编写
:: 应用于Han.GJZS-Windows版上


@echo OFF
set "PWD=%~dp0"
set "Path0=%Path%"
set "Path=%PWD%bat\exe;%PWD%tools;%Path0%"
set magisk_file=files\Magisk.apk
set magisk_vn=Magisk-23.0.apk
set sd_tmp=/sdcard/Han.666666
set awfd=call bat\fun\awfd.bat
set awfr=call bat\fun\awfr.bat
set awfs=call bat\fun\awfs.bat
set basename=call bat\fun\basename.bat
set CQ=call bat\a2.bat
set dirname=call bat\fun\dirname.bat
set fcq=call bat\fun\fcq.bat
set name=call bat\fun\name.bat
set rdtmp=call bat\fun\rdtmp.bat
set del_suffix=call bat\fun\del_suffix.bat
set suffix=call bat\fun\suffix.bat
set tishi1=call bat\fun\tishi1.bat
set tishi2=call bat\fun\tishi2.bat
set tqbb=call bat\fun\tqbb.bat
set error=echo ！
set t=   ^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*   
set t1="--> 请拖入文件或输入："
set t2="--> 请输入对应的功能数字编号："

cd /D %PWD%
call bat\fun\theme.bat %~n0

echo %t%检测命令环境是否运行正常%t%
for %%i in (adb fastboot) do (
    echo.
    if exist tools\%%i.exe (
        %%i --version || ( %error% %%i命令不可执行 & pause & exit 1 )
    ) else (
        %error% 解都不解压用个鸡儿
        pause
        exit 1
    )
)
    if exist tools\busybox.exe (
        busybox >nul || ( %error% busybox命令不可执行 & pause & exit 1 )
    ) else (
        %error% 解都不解压用个鸡儿
        pause
        exit 1
    )
        echo.
        echo - 正在启动adb服务……
        adb kill-server >nul 2>nul
        adb start-server
        cmd /Q /V:ON /K main
