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?

  • On trying settings put global KEY VALUE; settings get global KEY commands on my OPO, the get command returns the edited value.The changes are even reflected in the Settings app. I'm not sure why the value isn't being saved before the reboot. If this doesn't work for you, I don't see a better way to hack the problem. – EvilTak Jun 25 '16 at 14:31
  • 1
    @EvilTak That actually did work for me. I think the "settings get" command waits for it to finish, so this will work: settings put global enable_freeform_support 1; settings get global enable_freeform_support; reboot. – Thomas Vos Jun 25 '16 at 15:09
  • You may want to try settings put <NAMESPACE> <KEY> <VALUE> && reboot. It worked for me, with the value screen_brightness under the system namespace. – Grimoire Jun 25 '16 at 17:35
  • @DeathMaskSalesman That didn't work for me. See my previous comment for a solution. – Thomas Vos Jun 25 '16 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.