如何查看Android权限来自何处? [英] How to see where Android permissions come from?

查看:35
本文介绍了如何查看Android权限来自何处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了Flutter项目,也搜索了插件目录,并试图找出所需的Android权限来自何处.
我只在应用程序的清单文件中找到了默认情况下必需的Internet访问权限:

I searched through my Flutter project, also the plugin directories and tried to find out where the required Android permissions are coming from.
I only found the permission for internet access, which is required by default, in the manifest file of my application:

<uses-permission android:name="android.permission.INTERNET"/>

但是,在安装应用程序时也会列出以下权限:

However, the following permissions are listed as well when installing the application:

  • 查看网络连接
  • 完全网络访问权限
  • 防止设备发自睡觉

这些被视为普通权限,但仍然我想找出它们的来源,因为应用程序不需要这些.

These are considered as normal permissions, but still I would like to find out where they are coming from because the application does not need these, I believe.

推荐答案

您在源代码中看到的清单不是最终APK中的清单.最终的AndroidManifest是通过构建过程构建的,并从不同的来源进行了编译.如果您想查看清单合并的完整报告,可以进入

The manifest you see in your source is not the one that's in the final APK. The final AndroidManifest gets built up through the build process and compiled from different sources. If you'd like to see a full report of the manifest merging you can go into

build/app/outputs/logs

这是一个很长的日志报告,但是您可以阅读所有清单部分的来源.如果您想查看最终清单本身,可以在

This is a very long log report, but you can read where all the manifest parts are coming from. If you'd like to see the final manifest itself this can be found in

build/app/intermediates/manifests/full/release or 
build/app/intermediates/manifests/full/debug

这不会让您知道它的来源,但是您可以查看权限并在build文件夹中进行搜索,您应该找到在某处生成的部分清单,然后可以确切地知道它的来源.

This won't let you know where it's from, but you can look at the permissions and do a search in your build folder and you should find the partial manifest generated somewhere and you can see where exactly it's coming from.

这篇关于如何查看Android权限来自何处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆