即使在清单中添加了 WRITE_SECURE_SETTINGS 权限错误 [英] WRITE_SECURE_SETTINGS permission error even when added in Manifest

查看:67
本文介绍了即使在清单中添加了 WRITE_SECURE_SETTINGS 权限错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在清单中添加了android.permission.WRITE_SECURE_SETTINGS".但我仍然收到一条错误消息,说 - 需要WRITE_SECURE_SETTINGS".

I have added "android.permission.WRITE_SECURE_SETTINGS" in the Manifest. But still i get an error message saying - required "WRITE_SECURE_SETTINGS".

我已经看到很多关于此的讨论,并且第三方软件禁止此设置.

I have seen a lot of talks about this, and that this setting is prevented for third party software.

我可以通过其他方式添加我的应用程序以获得此权限吗?

It is any other way that i can add my application can gain this permission?

我已经看到这个 adb 命令,但我不太熟悉如何使用它来将我的应用程序添加到我的设备,下面的命令是需要 root 我的设备才能使用它,因为它无法通过只读文件复制系统?

I have see this adb command, but i not so familiar how to use this to add my application to my device, is below command is require root my device before it can be use because it failed to copy by Read-only file system?

adb remount
adb push app.apk /system/app/

推荐答案

首先,正如您之前所读到的,WRITE_SECURE_SETTINGS 可用于应用程序!因此,无论您是在 root 还是生产版本上,都不能使用此权限.

Firstly, as you have read before, WRITE_SECURE_SETTINGS is NOT available to applications! So you cannot use this permission regardless whether you are on rooted or production builds.

因此,如果您希望启用此设置,请创建您自己的固件来满足您的需求,并在您希望的任何设备上加载该固件.或者,将您的更改贡献给现有的固件模块(例如 Cyanogen).

So, if you wish to enable this setting, create your own firmware that does what you need and load that firmware on whatever devices you wish. Or, contribute your changes to existing firmware mods (e.g., Cyanogen).

其他一些应用程序使用诸如 Reflection 之类的技术使用 Java 来访问未通过 API 公开的函数,您可能也可以尝试相同的方法.

Some other applications use techniques like Reflection using Java to gain access to functions not exposed via API, you can probably try the same.

其次,adb remount 不能像生产版本一样工作,除非手机已 root 或固件默认启用它.

Secondly, adb remount does not work as is with production builds unless the phone is rooted or firmware enables it by default.

这篇关于即使在清单中添加了 WRITE_SECURE_SETTINGS 权限错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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