已解决Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

Posted up up!

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了已解决Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS相关的知识,希望对你有一定的参考价值。

用我自己的三星note10可以运行appium,换了台红米K30运行时就报错了。。。

以下是appiumServer报错信息

[W3C] Encountered internal error running command: Error executing adbExec. Original error: 'Command '/Library/android-sdk-macosx/platform-tools/adb -P 5037 -s 172.30.242.136\\:5556 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy'' exited with code 255'; Stderr: 'Security exception: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
[W3C] 
[W3C] java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

解决方法
设置-开发者选项中开启USB调试(安全设置),需要插SIM卡我的三星手机是没有这项设置的
在这里插入图片描述

以上是关于已解决Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS的主要内容,如果未能解决你的问题,请参考以下文章

Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

使用GAPID报错Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

使用GAPID报错Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

Android Permission Denial:这需要 android.permission.INTERACT_ACROSS_USERS_FULL

即使将 <uses-permission> 用于 SET_ALARM,也会获得 Permission Denial?

Permission Denial:开放提供者 Android Studio