I want my android apps to believe that Automatic Time Zone is set to ON even though it actually is not. I read that Automatic Time Zone is detected using Settings.Global.AUTO_TIME variable, which returns value 1 if Automatic Time Zone is ON and value 0 if Automatic Time Zone is OFF. This variable is read using the below line

Settings.Global.getInt(getContentResolver(), Settings.Global.AUTO_TIME)

I read that this variable can only be set by a System App. Is there a way to change this variable somehow? Can I write an application that allows me to change this variable? Can this be done by rooting the android device? Is there a way to do this without rooting?


Since the phone is rooted, it would be possible for an Xposed module to achieve this by intercepting the call to Settings.Global.getInt and returning 1 regardless of the real value, but I don't know of a module that does this, so you'd have to write it yourself. You should consult the Xposed documentation to learn how; I'm afraid we can't help with programming problems on this site.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.