Tente com
i=1
while ! 'adb connect 192.168.1.102:5555 >/dev/null 2>&1' ; do
echo "Attempt $i) adb: Failed to connect!"
i=$(( i + 1 ))
echo " I will try again in 5 seconds"
sleep 5
done
echo "adb: Connection successful!"
O loop deve sair se adb
"sucessos" ou se você pressionar Ctrl + C .