1

I am facing an issue on my rooted device (odroid x with my personnal rom) I have su with userid flag set:

root@android:/ # ls -l /system/xbin/su                                         
-rwsr-sr-x root     root        22372 2013-01-02 15:44 su

From adb, I can see that the device is rooted :

root@android:/ # id
uid=0(root) gid=0(root)
root@android:/ # 

So for sure perform a su works :)

On the android app, I have a simple Java app requesting su : it does not work. Using Android terminal, su is failing due to "permission denied"

Notice that I have an other tablet successfully rooted. I put exactly the same rights to su and call to su from android terminal works.

Could you please tell me what I am missing. I read that correct uid must be set to allow android app (having their own user id) to call it. Is it correct ?

Thanks a lot !

Eloi

g3rv4
  • 19,750
  • 4
  • 36
  • 58
user1837153
  • 61
  • 1
  • 3
  • @MattClark bzzzt! wrong! The OP is asking how to invoke su from within a android app! – t0mm13b Jan 02 '13 at 16:44
  • OP: See [this](http://stackoverflow.com/questions/7295873/how-do-i-request-root-access-in-android), [that](http://stackoverflow.com/questions/4905743/android-how-to-gain-root-access-in-an-android-application) and [this](http://stackoverflow.com/questions/7295873/how-do-i-request-root-access-in-android) – t0mm13b Jan 02 '13 at 16:47
  • 1
    OP: your question explicitly states **On the android app, I have a simple Java app requesting su : it does not work** implying/suggesting that you wrote an app? – t0mm13b Jan 02 '13 at 16:50
  • it doesn't work because the suid is not set for all. It can be called as root (hence without password) only by root and root group. You need to `chmod a+s` or to change the group and place your app in this group – njzk2 Jan 02 '13 at 17:18
  • More than likely the OP has forgotten to put in a permission in the manifest requesting superuser access? – t0mm13b Jan 02 '13 at 17:25

0 Answers0