I need to turn on and off the GPS receiver
For privacy reasons, if nothing else, enabling or disabling any location tracking should not be exclusively in the hands of the user through trusted applications, and not at the request of arbitrary third parties.
So, if you want to turn GPS on and off, create your own firmware that will do everything you need and download this firmware on any devices you want. Or make changes to existing firmware modes (for example, Cyanogen).
Accessing secure settings requires WRITE_SECURE_SETTINGS
Correctly.
I searched around quite a bit, and every answer that I saw pretty much said that no application outside the system / firmware can get this edit.
Correctly.
However, this is simply not true.
No, its true.
There are several applications on the market that do exactly what I am trying (regarding GPS)
They found a security loophole. I will take steps to help eliminate this hole.
but there is another group that has WRITE_SECURE_SETTINGS permissions
No, there is a group that asks them. You can request any permission. What you ask for is what appears on these lists. What you get is a completely different story.
CommonsWare
source share