Android 权限(我们在清单文件中定义)到相应 API 调用/方法之间的映射 [英] Mapping between Android permissions (that we define in the manisfest file ) to corresponding API calls /methods
问题描述
在哪里可以找到 Android 权限(我们在清单文件中定义)到相应 API 调用/方法之间的映射?
例如
GET-ACCOUNTS" 是一种权限类型,它映射到getAccountsByType()、getDeviceId() 和 getLine1Number().
同样我想知道,如果我使用权限Internet,ACCESS_COARSE_LOCATION,ACCESS_WIFI_STATE etc..
那么所有方法/API调用映射到它?
请告诉我在哪里可以找到此信息.下面的链接列出了权限
Where can I find the mapping between Android permissions (that we define in the manisfest file ) to corresponding API calls /methods?
For example
GET-ACCOUNTS" is a permission type which maps to
getAccountsByType(), getDeviceId(), and getLine1Number().
Similarly I want to know, If I use permission Internet,ACCESS_COARSE_LOCATION,ACCESS_WIFI_STATE etc..
Then which all methods/API calls
map to it?
Please let me know where can I find this information. Below link lists the permission http://developer.android.com/reference/android/Manifest.permission.html
But could not find the mapping.
If this is not the right forum to post this , Then please let me know where should I post this?
The mapping is not provided by Google, but two three major research studies have been attempted to recover this information.
The first study was done by Berkeley using a dynamic analysis technique to mine the mapping from Android 2.2. They created an online tool where you can submit your app for some analysis (now offline).
The second study was done by the University of Toronto. They used a static analysis approach to mine the mappings from a few representative versions of Android (2.2.3, 2.3.6, 3.2.2, 4.0.1, and 4.1.1). Note that it appears that PScout is now being actively maintained again by the authors and there are current mappings available.
Both of these tools have some caveats as discussed by the papers and as a result the mappings produced are not perfect, but it is better than nothing.
Update: PScout is no longer being actively maintained. A group in Germany at Saarland University was able make some improvements on PScout and produce published mapping results for Android APIs 16, 17, 18, 19, 21, 22, and 23. The tool source does not appear to be available.
Link: Berkeley Paper (Android Permissions Demystified)
Link: Berkeley Stowaway Tool (tool appears to be permanently offline now, and the authors now recommend using PScout results for analysis)
Link: Toronto Paper (PScout: Analyzing the Android Permission Specification)
Link: Toronto PScout Tool
Link: PScout II on Github
Link: axplorer Permission Mapping Results
Update: Shameless self-promotion of my Android Essentials Toolbox open source Eclipse plugin that can be used to apply the permission mappings in the Atlas visual program analysis framework. Permission mappings are based on PScout and axplorer results and can be applied to Android source or binary projects. A UI is included for browsing the permission mappings (used permissions are highlighted red).
这篇关于Android 权限(我们在清单文件中定义)到相应 API 调用/方法之间的映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!