即使在明显增加WRITE_SECURE_SETTINGS权限错误权限、明显、错误、WRITE_SECURE_SETTINGS

2023-09-13 01:38:08 作者:舔奶盖的小仙女

我已经在清单中增加了android.permission.WRITE_SECURE_SETTINGS。但我仍得到一个错误信息说 - 要求WRITE_SECURE_SETTINGS

我已经看到了很多关于这个会谈,该设置pvented第三方软件$ P $。

这是我可以加我的应用程序能获得此权限的任何其他方式?

我有看到这个ADB命令,但我不是那么熟悉如何使用该到我的应用程序添加到我的设备,低于命令需要root我的设备才可以使用,因为它未能通过只读文件复制系统?

 亚行重新装入
亚行推app.apk /系统/应用/
 

解决方案

首先,你以前看过,WRITE_SECURE_SETTINGS是不会提供给应用程序!所以你不能使用此权限,无论wheter你是植根或生产的基础之上。

所以,如果你想启用此设置,创建你自己的固件,做什么,你需要和加载任何设备,你希望固件。或者,贡献您更改现有的固件器官功能障碍综合征(如氰)。

一些其他的应用程序使用像反射使用Java来访问功能通过API不暴露技术,你也许可以尝试同样的。

其次,亚行重新装入不工作,是与产品构建,除非手机是植根或固件,使得它在默认情况下。

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?

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/

解决方案

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

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).

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

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