
set ip=%1
shift
adb disconnect
adb disconnect
adb disconnect
adb connect %ip% && adb root && adb connect %ip%
@echo off

REM Get the current date
set datetime2="echo %DATE:~4,2%%DATE:~7,2%%TIME:~0,2%%TIME:~3,2%%DATE:~10,4%.%TIME:~6,2%"

for /F "tokens=2 delims==" %%G in ('wmic OS Get localdatetime /value') do set "datetime=%%G"

REM Extract individual date and time components
set "year=%datetime:~0,4%"
set "month=%datetime:~4,2%"
set "day=%datetime:~6,2%"
set "hour=%datetime:~8,2%"
REM set /a "hour+=2"
set "minute=%datetime:~10,2%"
set "second=%datetime:~12,2%"

REM Format the date and time
set "formatted_datetime=%month%%day%%hour%%minute%%year%.%second%"

echo %datetime2%
echo %formatted_datetime%
REM adb shell pm uninstall -k --user 0 com.android.bluetooth
REM adb shell setprop persist.sys.timezone "America/Chicago"
REM adb shell date %formatted_datetime%
