Closed miracle2k closed 12 years ago
Looks like /data/bin/su isn't suid executable. Is /data mounted with nosuid option? (If that the case, invoking /data/bin/su - from unprivileged account shouldn't work too.)
Ah stupid. Yes, you're right, /data is mounted with nosuid.
The ICS emulator makes it hard to install su, in particular if you want it to be permanent. I need to manually start the emulator via the command line with -partition-size 300 to be able to write to /system, and of course, that state is lost when shutting down.
It would therefore be nice to place the executable in /data/bin/su, but for some reason, this doesn't work:
$ /data/bin/su $ logcat E/su ( 1405): sudb - Opening database E/ ( 1405): Couldn't open database: unable to open database file E/su ( 1405): sudb - Could not open database, prompt user E/su ( 1405): bind failed with 13: Permission denied W/su ( 1405): request rejected (10001->0 /system/bin/sh)
$ ls -l /data/bin -rwsr-sr-x root root 22228 2011-12-05 02:17 su
The same su binary in /system/bin works just fine:
$ ls -la /system/bin/su -rwsr-sr-x root root 22228 2011-12-05 02:17 su
Using su 3.0.3 (Superuser.apk 3.0.7).