$ echo $(adb shell getprop service.adb.root)
1
$ while [[ $(adb shell getprop service.adb.root) != "1" ]]; do echo -n .; done
.........^C
[[ "1" != "1" ]] should be false and the while loop should not run. But, it runs forever. What's the reason and the fix?
I am trying to write a loop that will wait until the adbd daemon on the connected Android device restarts as root.
echo $(adb shell getprop service.adb.root) | cat -vteadb shell getprop service.adb.root | cat -vtewhile [[ $(adb shell getprop service.adb.root 2> /dev/null) != $'1\r' ]]; do echo -n .; done