Getting superuser access through ADB
I've started working on little something, not too much, but I keep getting stuck.
echo Look at your phone, you must grant superuser perms.
adb shell "su -c stop"
if NOT %errorlevel% == 0 goto exit
pause
So, if someone doesn't grant superuser access, it's not going to exit, it just continues, so if he grants it after the command times out, he has to restart the script. How do I write it so it repeats until the device is granted su permissions?