PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, September 26, 2022

[FIXED] How can I get the dreaded WRITE_SECURE_SETTINGS permission for my android app?

 September 26, 2022     android, gps, permissions     No comments   

Issue

I need to be able to toggle the GPS receiver on and off, and WRITE_SECURE_SETTINGS is required to be able to access secure settings. I've searched around quite a bit, and every answer I saw pretty much said that no app outside of the system/firmware can get that permisssion.

However, that is simply untrue. There are several apps on the market that do exactly what I'm trying to (in regards to GPS), but there are a bunch more that have the WRITE_SECURE_SETTINGS permissions. For example:

Extended Controls

SwitchPro

Profile Flow

So, how can this be done?


Solution

I need to be able to toggle the GPS receiver on and off

For privacy reasons, if nothing else, enabling or disabling any sort of location-tracking needs to be solely in the hands of the user via trusted applications, not at the request of arbitrary third parties.

So, if you wish to enable and disable GPS, create your own firmware that does what you need and load that firmware on whatever devices you wish. Or, contribute your changes to existing firmware mods (e.g., Cyanogen).

WRITE_SECURE_SETTINGS is required to be able to access secure settings

Correct.

I've searched around quite a bit, and every answer I saw pretty much said that no app outside of the system/firmware can get that permisssion.

Correct.

However, that is simply untrue.

No, it's pretty true.

There are several apps on the market that do exactly what I'm trying to (in regards to GPS)

They found a security loophole. I will take steps to help ensure this hole gets fixed.

but there are a bunch more that have the WRITE_SECURE_SETTINGS permissions

No, there are a bunch who ask for them. You can ask for whatever permission you want. What you ask for is what shows up in these listings. What you get is a different story.



Answered By - CommonsWare
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing