I created an application but it requires root, please tell me how you can integrate root into my application.

There is a phone that does not have root, how to make my application install apk superSU superUser first and after my application, will root work in this case?

    3 answers 3

    It is impossible. And, in fact, not worth it. And that's why:

    1. Ruth is a serious modification of the system, sometimes there is more than one way to use it. SuperSU and Superuser only manage the root already enabled by other means, they have nothing to do with it.
    2. As a rule, the root is done with the participation of the PC, the opposite - rather the exception.
      For example, in my Asus TF101 there was a hole in the system that allowed you to make a root “on board”, and there was an application for this particular model that does this. And at first I was desperate, because my device had a connection port to my computer.
    3. Route can lead to loss of warranty, easy. For many applications, such a "side effect" is so undesirable that it is not worth installing this application.

      Root is installed differently on all smartphones and this is not always an easy task, so I think not.

      • But I noticed that in most cases it is superSU or sueprUser and I know that there are over 5 thousand models in android, I don’t ask for the perfect way, at least 70% is an option. And the comfort of someone who does not work, let them try through the computer - Andro
      • one
        Well, this is just an application for setting access / denial of root to a specific application. The root itself is obtained as a consequence of, for example, the firmware of the phone. - Andrey Kataev

      no, it will not. To install the root, it is not enough to install the SuperSU application. To install the root almost always requires unlocking the bootloader, sometimes installing a custom kernel, sometimes using a specific hack via ADB. In short, just install the root through the application in most cases will not work

      • And if the su file is added to xbin? - Andro
      • To add something to xbin you need rights to write to xbin. - Vladyslav Matviienko
      • In this case, tell me how to check whether there is root or not. Downloaded RootTools. RootTools.isRootAvailable () there is no result. - Andro
      • @xTIGRx google.com.ua/… - Vladyslav Matviienko