1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 14:27:00 +08:00

Add: Added automatic ADB setup

- Only support MEmu, Nox and Bluestacks Hyper-V for while.
This commit is contained in:
whoamikyo
2020-08-26 20:50:53 -03:00
parent 401d2f6135
commit d1f37dd479
4 changed files with 477 additions and 246 deletions

View File

@@ -37,7 +37,7 @@ if exist config\deploy.ini (
for /f "tokens=3 delims= " %%i in ('findstr /i "RealtimeMode" config\deploy.ini') do ( set "RealtimeMode=%%i" )
for /f "tokens=3 delims= " %%i in ('findstr /i "Branch" config\deploy.ini') do ( set "Branch=%%i" )
for /f "tokens=3 delims= " %%i in ('findstr /i "AdbConnect" config\deploy.ini') do ( set "AdbConnect=%%i" )
for /f "tokens=3 delims= " %%i in ('findstr /i "Serial" config\deploy.ini') do ( set "Serial=%%i" )
for /f "tokens=3 delims= " %%i in ('findstr /i "Serial" config\deploy.ini') do ( set "SerialDeploy=%%i" )
for /f "tokens=3 delims= " %%i in ('findstr /i "AdbKillServer" config\deploy.ini') do ( set "KillServer=%%i" )
) else (
call command\LanguageSet.bat
@@ -56,7 +56,7 @@ if "%serial_input%"=="" ( set "serial_input=127.0.0.1:5555" )
%adbBin% connect %serial_input% | find /i "connected to" >nul
echo ====================================================================================================
if errorlevel 1 (
echo The connection was not successful on SERIAL: %Serial%
echo The connection was not successful on SERIAL: %SerialDeploy%
echo == If you use LDplayer, Memu, NoxAppPlayer or MuMuPlayer, you may need replace your emulator ADB.
echo Check our wiki for more info
pause > NUL
@@ -66,10 +66,10 @@ if errorlevel 1 (
call command\Config.bat Serial %serial_input%
call command\ConfigTemplate.bat SerialTemplate %serial_input%
%pyBin% -m uiautomator2 init
echo The connection was Successful on SERIAL: %Serial%
echo The connection was Successful on SERIAL: %SerialDeploy%
)
echo ====================================================================================================
echo Old Serial: %Serial%
echo Old Serial: %SerialDeploy%
echo New Serial: %serial_input%
echo ====================================================================================================
echo Press any to continue...