My device is rooted but my android app does not have root access (libsuperuser)

I am trying to build an application based on libsuperuser. My device is rooted but I have two problems:

1) After to export my apk, for some reason it is asking for certificate. I need to export signing the app which does not make sense for a rooted device. Why do I need to sign if the device is rooted ?

2) When I run the app, I checked if the app has root privileges calling Shell.SU.available() available in the libsuperuser which returns "false". It means the app is does not root privileges and I cannot run commands like "chmod".

3) If I try to call the shell commands using libsuperuser API adding "su" as prefix in the log message I see that the current app user (which is not root) does not have "su" privileges.

PS: I know Eclipse is deprecated but this project was build on Eclipse and I had some problems importing to Android Studio.. that's why I am using Eclipse at moment. Any help is very welcome!


您是否在AndroidManifest.xml添加了权限?

<uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
链接地址: http://www.djcxy.com/p/24618.html

上一篇: Android多用户支持(4.2中新增)对服务器端数据模型的影响(例如android

下一篇: 我的设备已根植,但我的Android应用程序没有root权限(libsuperuser)