ChainsDD/su-binary — Issue #7: Make su work if placed in /data/bin
Author: miracle2k
Created: 2011-12-10 00:08:11+00:00
State: open

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).