权限拒绝:这需要 android.permission.INTERACT_ACROSS_USERS_FULL [英] Permission Denial: this requires android.permission.INTERACT_ACROSS_USERS_FULL

查看:135
本文介绍了权限拒绝:这需要 android.permission.INTERACT_ACROSS_USERS_FULL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Android 中遇到了 sqlite db 问题.但是当我在互联网上进行快速研究时,我怀疑问题与sqlite无关,而是与系统用户有关.我的应用程序未被识别为访问数据库功能的授权用户.我试图在堆栈溢出中应用可能的建议解决方案,但没有一个有什么不同.这是我每次尝试使用 db 功能时都面临的 LogCat.

I am having an issue with sqlite db in Android. But as I made a quick research on the internet, I suspect that the problem is not related to sqlite but system user. My app is not recognized as authorized user to access db functionalities. I tried to apply possible suggested solutions in stack overflow but none of them made a difference. This is the LogCat I am facing every time I attempt to use db functionality.

12-14 02:35:17.721    2953-3355/? E/DatabaseUtils﹕ Writing exception to parcel
java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:13082)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2038)
at com.android.providers.settings.SettingsProvider.callFromPackage(SettingsProvider.java:577)
at android.content.ContentProvider$Transport.call(ContentProvider.java:279)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:273)
at android.os.Binder.execTransact(Binder.java:388)
at dalvik.system.NativeStart.run(Native Method)

我尝试添加权限

android.permission.INTERACT_ACROSS_USERS_FULL

但还是没有声音.奇怪的是,当我尝试添加 INTERNET 权限时,Android Studio 0.3(我使用的 ide)建议我可以选择可能的权限.但是当涉及到 INTERACT_ACROSS_USERS_FULL 权限时,它的行为就像不知道这个权限一样.我的测试设备是运行在 4.3 上的三星 S4.

but still no sound. The strange thing is when I try to add INTERNET permission Android Studio 0.3 (ide I use) suggests me possible permissions I can choose. But when it comes to INTERACT_ACROSS_USERS_FULL permission it behaves like it has no idea about this permission. My test device is Samsung S4 running on 4.3.

我认为我不是唯一一个尝试在 android 上使用 db 的人.所以有一个解决方案.

I assume that I am not the only one who tries to use db on android. So there is a solution.

我如何才能真正为我的应用程序添加 INTERACT_ACROSS_USERS_FULL 权限?

How can I really add INTERACT_ACROSS_USERS_FULL permission to my application?

推荐答案

根据这个答案:android.permission.INTERACT_ACROSS_USERS_FULL 是签名级别的权限.您的应用将无法使用它,除非它与系统具有相同的签名.

According to this answer: android.permission.INTERACT_ACROSS_USERS_FULL is a signature level permission. Your app will not be able to use it until and unless it has the same signature as the system.

除非您是创建者或系统构建者,或者与他们合作以便他们愿意用他们的证书签署您的 apk,否则这不是您可以实现的.换句话说,这对大多数开发者来说是禁止的.

Which is not something you can achieve unless you either are the creator or the system build, or collaborating with them such that they are willing to sign your apk with their certificate. In other words, this is off limits for most developers.

这篇关于权限拒绝:这需要 android.permission.INTERACT_ACROSS_USERS_FULL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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