New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android 4.2+ seteuid (root) failed with 13 #196
Comments
|
I have the same problem. I'm an inexperienced rooter who installed unofficial CWM recovery on stock Samsung GT-I9295 (Galaxy S 4 Active) JDQ39.I9295XXUAMI2 (Android 4.2.2). I downloaded and installed http://download.clockworkmod.com/superuser/superuser.zip (1.0.2.2). When I start su in adb shell, it returns 1. When I start an app that needs root it doesn't get it. The Superuser UI never pops up. Here are the log entries: D/su (17646): su invoked. Issue #193 seems to be the same, too. |
|
As a workaround I forced installing su daemon and changed su file mode to 755 in update-binary script. Works for now. |
|
FYI new su binary never attempts to use daemon if API level is below 18, so the above workaround no longer works. |
|
The su daemon should only be necessary in 4.2+, but I can backport. |
|
Do you mean 4.3+? Whatever the problem is, the zip doesn't work on my phone. I thought the restriction is through the capability bounding set, but reading /proc/self/status from an app doesn't confirm that: And SELinux is permissive. |
|
Er yes 4.3+ |
|
The Galaxy S4 Active kernel contains an extra bit of lameness that can cause the set*id() syscalls to fail: If you could dump out dmesg, I'd expect to see "Restricted changing UID" messages, but that might not be possible if su is broken (chicken-and-egg). Based on the code shown above, only one of the following conditions must be met in order to call setresuid() to set the real, effective, or saved UID to 0 (assuming you already have the right to do so under the standard Linux security model):
Meeting the latter condition probably involves the least disruption to the current code, so I've prototyped it in my branch. (Not tested on an actual Samsung device - does anyone want to give this a shot?) Other options might include:
|
|
I confirm the dmesg message: I can test if you provide a binary link or when I will have time to experiment with compiling. |
Binaries for rev 699e4a9 of my tree: https://dl.dropboxusercontent.com/u/169702767/su/su-binary-699e4a96.zip |
|
Thank you for all your answers, |
|
The new binaries worked for me as well. Is there an official way to get this fix yet? The archive at http://download.clockworkmod.com/superuser/superuser.zip still does not include these changes, so I had to build my own zip file with the updated binaries in order to get this to work on Galaxy S4 (Canadian) |
|
Will do a rebuild. |
shell@android:/ $ ls -l /system/bin/su
ls -l /system/bin/su
-rwsr-sr-x root root 311900 2013-11-13 14:50 su
shell@android:/ $ su -v
su -v
su invoked.
13 com.koushikdutta.superuser
shell@android:/ $ su
su
su invoked.
stat /data/data/com.koushikdutta.superuser failed with 2: No such file or direct
ory
seteuid (root) failed with 13: Permission denied
How to Solve It?
The text was updated successfully, but these errors were encountered: