1

I tried to manually root my phone via pushing a proper su binary to /system/bin and /system/xbin. I was able to push them via adb in recovery, which is a root one (idk why). Once inside my phone, I chmodded 755 both of them and typed su --install and su --daemon&. After that, I tried to setenforce 0.

All seemed to work, but when I rebooted, I wasn't rooted. So I returned to recovery, used the "re-root" option and it worked. Why is this?

0

1 Answer 1

0

According to the source code available on GitHub, the recovery performs a whole bunch of operations aside from simply launching the daemon in background, copying the su binary to /system/xbin and changing its permissions. As can be understood by examining this install-su script, what the recovery does, is to initially perform a cleanup operation for root manager apps that may have already been installed.

After that, the operation of copying the relevant files, namely, the su binary (which is called anytime you request root privileges), the 99SuperSUDaemon (which execution depends upon init.d), a customized install-recovery.sh (to force the daemon to be executed on Jelly Bean) and SuperSU.apk (the root manager).

After this phase, the script uses the previously defined functions set_perm (which combines chmod and chown, and serves to define ownership and permissions) and ch_con (which marks the files as system ones). The latter is probably the cause of your manual procedure's malfunction: you didn't change the context of the files you pushed, so they weren't recognized as system files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .