user2775914
user2775914

Reputation: 193

Android: how to get system rights officialy

I need to Turn ON/OFF Mobile data programmatically. For this issue I need to use MODIFY_PHONE_STATE permission. As we know in latest Android versions it's not possible for non-rooted phones unless the app has system rights.

I know that exists some workaround how to sign the app as system app. But as I understand it's not possible to publish such app at the Play Store.

My question is the next - is it possible to get system rights officially? If it is possible which way I have to go to get them?

Upvotes: 0

Views: 98

Answers (2)

Sid
Sid

Reputation: 14896

MODIFY_PHONE_STATE is a system-only permission so there's no way to get that permission unless you root your phone.

Upvotes: 0

Gabe Sechan
Gabe Sechan

Reputation: 93561

THe only way to get them is a rooted device, or to build the device image yourself. The idea of system permissions is that only apps which are trusted by the creator of the system (the OEM) can request them. You can also get them by rooting the device, because of how they're granted (its based on the directory the app is installed in, which can be accessed if you have root). But there is no way to do it without root or without creating your own OS image.

Upvotes: 1

Related Questions