Android的棉花糖,"危险"保护级别和系统部件/应用程序 [英] Android Marshmallow, "dangerous" protection level and system components/apps

查看:307
本文介绍了Android的棉花糖,"危险"保护级别和系统部件/应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了将要PR-安装(作为一个系统应用程序)上的固件的应用程序。

I'm developing an application that going to be pr-installed (as a system app) on the firmware.

这是迄今为止关于系统之间的关系的文件应用,新的权限模型,和保护级别 - 我不明白什么时候系统应用的需求(如果有的话),要求用户权限。

from the documentation so far about the relation between system apps, new permissions model, and the protection levels - I don't understand exactly when system app needs (if at all) to request user permission.

我的问题,开始时,我尝试使用<一个href="http://developer.android.com/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE"><$c$c>WRITE_EXTERNAL_STORAGE允许。从文档,我可以看到它标记为危险的许可。

My problems starts when I try to use the WRITE_EXTERNAL_STORAGE permission. from the documentation I can see that it marked as "dangerous" permission.

- 做危险的权限自动系统的应用程序授予

当我使用<一个href="http://developer.android.com/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE"><$c$c>WRITE_EXTERNAL_STORAGE权限(作为一个系统应用程序),我得到安全例外,我不知道它是否意味着即使艰难我的应用程序安装作为一个系统应用程序 - 危险的权限,必须由用户请求。

when I use WRITE_EXTERNAL_STORAGE permission (as a system app) I'm getting security exception, and I don't know if it's mean that even tough my app installed as a system app - "dangerous" permissions must be requested by the user..

还有一点要提:
检查应用程序的行为作为一个系统的应用程序,我安装我的应用程序的关系5 APK上的 SYS-私法目录(该设备是植根)运行SDK preVIEW 3.这是当我越来越attep使用方法时,安全异常,需要外部存储权限。

another point to mention:
to check the app behavior as a system app, I'm installing my application APK on the sys-priv directory (the device is rooted) of a nexus 5 running SDK preview 3. this is when I'm getting the security exception when attep to use methods requires the external storage permission..

推荐答案

引用的为第二M preVIEW 的发行说明:

系统中包含的图像应用程序不再自动授予危险的权限。所有的应用程序应检查并请求权限在运行。

Apps included in the system image are no longer granted dangerous permissions automatically. All apps should check for and request permissions at runtime.

这符合什么我记得看到当我第一次使用的最后6.0 preVIEW固件&mdash上的Nexus 5的股票相机应用(?);它也要求运行许可。

That fits with what I recall seeing when I first used the stock Camera app on a Nexus 5 with the final(?) 6.0 preview firmware — it too asked for the runtime permission.

所以,AFAIK,系统应用程序都要求运行时的权限,因为这样做非系统的应用程序。

So, AFAIK, system apps have to ask for runtime permissions, as do non-system apps.

这篇关于Android的棉花糖,&QUOT;危险&QUOT;保护级别和系统部件/应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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