exec(“su”) permission denied?

99封情书 提交于 2021-02-08 08:27:27

问题


when I use this code

Runtime.getRuntime().exec("su").

and listen to the ErrorStream it gives me back: Permission denied. However SuperUser successfully grants permissions. Any Ideas?


回答1:


You need to add to your AndroidManifest.xml

<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>



回答2:


My ROM was messed up. I had to reinstall it. Adding a permission should NOT help. Edit: SuperUser is now giving warning if you don't define the permission, how ever it will still grant su.



来源:https://stackoverflow.com/questions/11283002/execsu-permission-denied

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!