Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79d17d32 authored by vincent's avatar vincent
Browse files

update wait-reboot

parent b03cc380
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -31,8 +31,16 @@ then
  exit 10
fi

adb -s ${DEVICE_ID} wait-for-device
if [ $? ==1 ]

#1 On check that device is in recovery mode
adb -s ${DEVICE_ID} get-state 2>&1 | grep "recovery"
if [ $? != 0 ]
then
	exit 101
fi

#Then we wait that it left this state
while adb -s ${DEVICE_ID} get-state
do
	sleep 1
done
+13 −2
Original line number Diff line number Diff line
@@ -28,5 +28,16 @@ set "DEVICE_ID=%1"

if not defined %DEVICE_ID ( exit /b 10)

adb -s %DEVICE_ID% wait-for-device
if %errorlevel%==1  ( exit /b 101 )
adb -s %DEVICE_ID% get-state 2>&1 | grep "recovery"
if errorLevel 1 (exit /b 101)

:wait-leave-recovery
adb -s ${DEVICE_ID} get-state
if %errorLevel% == 0
goto :wait-leave-recovery



call wait-leave-recovery