@echo off
goto menu



:menu
cls
echo.
echo ADB Quick Utilities
echo.
echo [1]  - Restart ADB
echo [2]  - Restart ADB with remote access
echo [PR] - Reboot the device
echo [PS] - Power down the device
echo.
adb.exe devices
echo.
set /p __choi=:: ||set __choi=none
if %__choi%==1 goto adb-restart
if %__choi%==2 goto adb-restart-remote
if %__choi%==PR goto device-restart
if %__choi%==PS goto device-shutdown
echo.
echo Please make a valid choice.
pause
goto menu

:adb-restart
cls
echo killing adb server
start /wait adb.exe kill-server
echo starting adb server
start /wait adb.exe start-server
echo done
timeout /t 1 /nobreak>nul
goto menu

:adb-restart-remote
cls
call adbrem.bat
goto menu

:device-restart
cls
echo sending reboot command
adb.exe shell reboot
timeout /t 1 /nobreak>nul
goto menu

:device-shutdown
cls
echo sending shutdown command
adb.exe shell reboot -p
timeout /t 1 /nobreak>nul
goto menu




