For those of you who work in a Windows environment, this batch script works for me.
It is expected until the ADB daemon is started, then it starts polling the sys.boot_completed property and waits for a value of 1.
It is not as elegant as a single line, but I have a script specified in my PATH environment variable, so it can be called directly.
adb wait-for-device :CheckAgain set value= for /f "delims=" %%a in ('adb shell getprop sys.boot_completed') do @set value=%%a IF NOT "%value%" == "1" ( timeout /t 2 /nobreak >NUL goto CheckAgain )
source share