How to create android apps with root access?

前端 未结 5 1425
一个人的身影
一个人的身影 2020-12-07 21:10

I found out that there\'s so many apps out there which required root access.

How were they able to create those apps? Where did they found all the resource? Is ther

5条回答
  •  不思量自难忘°
    2020-12-07 21:39

    You need su installed in the phone (of course). Details here: http://forum.xda-developers.com/showthread.php?t=682828

    And to use it, is as simple as running su command. Here is a sample I use to reboot the phone programmatically (copied from this answer: Android 2.2: Reboot device programmatically )

    try {
        Runtime.getRuntime().exec("su");
        Runtime.getRuntime().exec("reboot");
    } catch (IOException e) {
    } 
    

提交回复
热议问题