简体   繁体   English

Android系统应用程序权限

[英]Android System App Permissions

I'm busy trying to add some functions to an app to do things like toggle airplane mode, or change APN settings etc. For this I need permissions like "write_secure_settings" and "write_apn_settings", which are only allowed for system apps. 我正忙于尝试向应用程序添加一些功能,以执行诸如切换飞行模式或更改APN设置等操作。为此,我需要“ write_secure_settings”和“ write_apn_settings”等权限,这些权限仅适用于系统应用程序。 Just for some background, this won't be added to the play store. 仅出于某些背景,不会将其添加到Play商店。 It will be used on company devices where the users don't have access to change certain settings, but we do want to allow others. 它会用在用户无权更改某些设置的公司设备上,但我们确实希望允许其他设置。

As I understand, this was changed for security reasons, and from searching here, people don't even want to discuss it, because it can't be done anymore. 据我了解,这是出于安全原因而更改的,从这里开始搜索,人们甚至不想讨论它,因为它不再能做。 But if this is the case, how is possible that people are still using this in normal user apps? 但是,如果是这种情况,人们怎么可能仍在普通用户应用程序中使用它呢? If you search the play store, there are lots of apps offering these functions. 如果您搜索Play商店,则有很多提供这些功能的应用程序。 I've downloaded a few and I can do the exact same thing that I'm not allowed to do if I write my own app. 我已经下载了一些软件,并且可以做我自己编写的应用程序所不能做的完全相同的事情。 How are they doing it then? 那他们怎么样?

I'll appreciate any help regarding this. 我将不胜感激。

Unfortunately, it appears that it is not possible anymore. 不幸的是,似乎不可能了。 The only ways to do this, seems to be outlined by installing your app as a "system app". 这样做的唯一方法似乎是通过将您的应用程序安装为“系统应用程序”来概述的。 Since this will be an internally used program, that should not be a problem for your company, however, the devices must be rooted. 由于这将是一个内部使用的程序,因此对您的公司来说应该不是问题,但是,设备必须植根。

Have a look at this guide on "Installing any app as a system app": 请参阅有关“将任何应用程序安装为系统应用程序”的指南:

http://www.addictivetips.com/mobile/how-to-install-any-app-as-system-app-on-android/ http://www.addictivetips.com/mobile/how-to-install-any-app-as-system-app-on-android/

I hope this helps you find the answer you seek on way or another. 我希望这可以帮助您找到在途中寻求的答案。

Happy coding. 快乐的编码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM