as the first, my environment:

Samsung S7, LineageOS 14.1, which is Android 7.2.1.

I'm using tasker to set GPS On and Off in this way:


settings put secure location_providers_allowed +gps,network,wifi

GPS Off:

settings put secure location_providers_allowed -gps,network,wifi

Both script are running as root.

Somethink happend (maybe during I tested this scripts) and now I can't switch my GPS Off (in Settings menu), and when I list my settings in this way:

settings list secure

I can see this:


It is very long line with cyclic contents.

Please, is there a way to reset this setting (perhaps another than factory reset of phone)?

Thanks in advance.


You should be able to change it to blank by executing

settings put secure location_providers_allowed ' '

If that doesn't work, directly modify the file settings_secure.xml located at /data/system/users/0/. Look for the line containing location_providers_allowed and edit the value for it.


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.