When I execute the following command, it doesn't save anything:
settings put global <KEY> <VALUE>;reboot
I think it's because it does not have enough time to save the value, because it reboots. The following command does save the value:
settings put global <KEY> <VALUE>;sleep 1;reboot
Is there any better way to wait until the command has saved the value?