1

I see this answer from 2013, but now there are options for High Accuracy, Battery Saving, and Device Only. Also, there was no command for disabling location.

  • 1
    Regarding the question you linked to in the post. I'm not sure about disabling location services but I would imagine that you could just leave both gps and network out of the command. As for the various location modes, I would imagine gps would represent Device Only, network would be Battery Saving and gps and network would be High Accuracy. – LJD200 Jul 11 '15 at 16:54
  • Should my comment be an answer? The thing is it's kind of me working stuff out. I'm not entirely sure... – LJD200 Jul 11 '15 at 16:55
  • @LJD200 You were close, good guess! I can make my answer on this page a Wiki, if you happen to have any issue with it. :) Just ping me. – Firelord Jul 11 '15 at 19:42
  • @Firelord No issues at all. This is a fantastic answer. Just out of interest, what would happen if you ran the command with a combination that isn't listed such as gps and wifi but without network? – LJD200 Jul 11 '15 at 20:34
  • @LJD200 Glad you liked it, and good query for the gps,wifi -- it will simply activate "device only", the reason is mentioned in my original answer. Google's location service primarily needs network as a parameter to activate, so if it is not passed then "high accuracy" and "battery saving" would be out of the question. // And passing only wifi would not activate any option on its own. – Firelord Jul 11 '15 at 21:01
4

You may check-out my updated answer dealing with the question in entirety, or consider the following info:

  • High accuracy: gps,wifi,network or gps,network (if you don't want Wi-Fi enabled)
  • Battery saving: wifi,network or network only
  • Device only: gps

E.g:

adb shell settings put secure location_providers_allowed gps,wifi,network

To disable Location mode

adb shell settings put secure location_providers_allowed ' '
  • 1
    This used to work on Android 5, but it doesn't anymore on Android 6. With or without root the setting does not change and stays the same as is configured on the system. It probably has something to do with location_providers_allowed being deprecated (developer.android.com/reference/android/provider/…). – gw0 Nov 4 '15 at 7:43
  • @gw0 My phone has not received Android M update yet, so I am afraid I can't offer any help at the moment. – Firelord Nov 4 '15 at 11:24

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.