简体   繁体   English

修改已安装的应用程序权限(Android)

[英]Modifying installed apps permissions (Android)

I want to develop an application for android to: 我想为android开发一个应用程序,以:

  1. List installed applications in the phone. 列出手机中已安装的应用程序。
  2. Show a list of permissions that are granted for each app. 显示为每个应用程序授予的权限列表。
  3. Have the ability to disable any permission granted to a specific app or enable it later on. 可以禁用授予特定应用程序的任何权限,或者稍后再启用它。

Till now I have done the first two points. 到目前为止,我已经完成了前两点。 I searched the web to know how to modify permissions but I couldn't find anything useful. 我在网上搜索了有关如何修改权限的信息,但找不到任何有用的信息。

So can anybody give me a clue on how to implement this ? 那么有人能给我一个关于如何实现这一点的线索吗? Because I think it is doable since there some apps that can modify permissions (eg Permission Manager). 因为我认为这是可行的,因为有些应用程序可以修改权限(例如,权限管理器)。

There are various apps in the Play Store that call themselves Permission Manager so I'm not sure which one you have looked at. Play商店中有许多名为“权限管理器”的应用,因此我不确定您看过哪一款。

At least one of them works by pulling the installed app apart, and reforming it with a changed AndroidManifest file (and since they don't have access to the original private key, a new signature). 其中至少有一个可以通过拆解已安装的应用程序,然后使用更改后的AndroidManifest文件对其进行重塑来工作(并且由于他们无权访问原始私钥,因此需要一个新的签名)。 To run the reformed app you have to uninstall the old one, and install the new one, which has 2 significant downsides 要运行经过改革的应用程序,您必须卸载旧的应用程序,然后安装新的应用程序,该应用程序有两个明显的缺点

  • all the data of the old app is lost 旧应用程序的所有数据均丢失
  • since you now have an effective pirate version of the app, the app will no longer update with new versions from the Play Store. 由于您现在拥有该应用程序的有效盗版版本,因此该应用程序将不再使用Play商店中的新版本进行更新。

Other apps that claim to manage app permissions simply expose the hidden App Ops permission screen in Android 4.3, and Google removed this from the later Android 4.4 update. 其他声称要管理应用程序权限的应用程序仅在Android 4.3中公开了隐藏的App Ops权限屏幕,而Google从后来的Android 4.4更新中删除了此屏幕。

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

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