3

Are there other files besides su that need to be installed to gain root access on an Android device? I know that installing a "superuser" app isn't strictly necessary but merely important from a security perspective.

What I want to know is whether simply transferring a working su binary to a device is enough to "root" an Android device. By "working" su binary, I mean having su installed at the proper location and blessed with the proper permissions.

Note: I'm not asking about the means (e.g. some esoteric security hole, adb, a bogus *ab backup file, or a recovery zip) but the goal, the absolute minimum number of file(s) that need to be transferred to root an Android device.

2

2 Answers 2

2

Copying a working su binary does not make the device rooted!

The method of rooting depends on supporting files, for instance:

  • a shell script
  • a binary that exploits
  • possibly, another script to copy over the superuser app...

Also, it is entirely dependent on whether your handset can be rooted or not depending on kernel, android version, manufacture/make of handset.

With Jellybean 4.3, it is now much harder to exploit and security has been clamped down more, this caused headaches for the creator of Chainfire's superuser app in order to work around the extra security put in place by default. It will be a matter of time now, when trying to exploit and gain root will become harder!

0

The absolute minimum is exactly a su executable. It grants root access to whoever calls it. But this su should not be taken from an existing rooting software. Without its corresponding root manager it won't work alone. Actually you can grab the su source code from a Linux distro and mod it, then compile it by yourself and it'll work.

That's not practical because everyone can gain root access without any restrictions. You don't want a malicious app to do so. So a practical minimum is 2 files: su and Superuser.apk. The latter manages permission grants and rejections. I've tested this with SuperSU. Just copying the APK and one binary made it work.

1
  • 1
    su source code from a Linux distro won't work on Android JB+, a privileged daemon (daemonsu or magiskd) is required to be running in background which proxies (over UNIX socket) requests from apps when they execute dummy su. Commented Feb 29, 2020 at 13:45

You must log in to answer this question.

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