arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2106.13012cs.SE
收藏

Android应用程序中的权限问题:分类、实践和前进方向

Runtime Permission Issues in Android Apps: Taxonomy, Practices, and Ways Forward

Ying Wang, Yibo Wang, Sinan Wang, Yepang Liu, Chang Xu, Shing-Chi Cheung, Hai Yu, Zhiliang Zhu

摘要:

Android引入了新的权限模型,允许应用在运行时请求权限,而不是在6.0(Marshmallow,API级别23)之后的安装时请求权限。虽然这种运行时权限模型为用户提供了更大的灵活性来控制应用对敏感数据和系统功能的访问,但它也给应用开发带来了新的挑战。首先,由于用户可以在使用应用程序时随时授予或撤销权限,因此开发人员需要确保应用程序在调用任何受权限保护的API之前正确检查并请求所需的权限。其次,Android的权限机制不断发展,并由设备制造商定制。开发人员需要在不同的Android版本和设备型号上全面测试他们的应用程序,以确保在所有情况下都能正确请求权限。不幸的是,这些要求对开发人员来说往往是不切实际的。在实践中,许多Android应用程序都会遇到各种运行时权限问题(ARP问题)。虽然现有的研究已经探讨了ARP问题,但对这些问题的理解仍然是初步的。为了更好地描述ARP问题,我们使用135个讨论ARP问题的Stack Overflow帖子和GitHub上流行的开源Android项目中存档的199个真实ARP问题进行了实证研究。通过分析数据,我们观察到了Android应用中常见的11种ARP问题。此外,我们对从业人员进行了实地调查和深入访谈,以获得行业实践的见解,并了解从业人员对有助于解决ARP问题的工具的需求。我们希望我们的研究结果可以阐明未来的研究,并为从业者提供有用的指导。

英文摘要:

Android introduces a new permission model that allows apps to request permissions at runtime rather than at the installation time since 6.0 (Marshmallow, API level 23). While this runtime permission model provides users with greater flexibility in controlling an app's access to sensitive data and system features, it brings new challenges to app development. First, as users may grant or revoke permissions at any time while they are using an app, developers need to ensure that the app properly checks and requests required permissions before invoking any permission-protected APIs. Second, Android's permission mechanism keeps evolving and getting customized by device manufacturers. Developers are expected to comprehensively test their apps on different Android versions and device models to make sure permissions are properly requested in all situations. Unfortunately, these requirements are often impractical for developers. In practice, many Android apps suffer from various runtime permission issues (ARP issues). While existing studies have explored ARP issues, the understanding of such issues is still preliminary. To better characterize ARP issues, we performed an empirical study using 135 Stack Overflow posts that discuss ARP issues and 199 real ARP issues archived in popular open-source Android projects on GitHub. Via analyzing the data, we observed 11 types of ARP issues that commonly occur in Android apps. Furthermore, we conducted a field survey and in-depth interviews among practitioners, to gain insights from industrial practices and learn practitioners' requirements of tools that can help combat ARP issues. We hope that our findings can shed light on future research and provide useful guidance to practitioners.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑