Android Root execute su with parameters

后端 未结 1 1419
南笙
南笙 2021-01-28 05:32

I ve got a problem, executing su with parameters (containing blank space?!). My Command.java looks like this:

public class Command
{
    Process process;

public         


        
1条回答
  •  不思量自难忘°
    2021-01-28 06:18

    I think the way to pass arguments to the su command would be to use a string array:

    Runtime.getRuntime().exec(new String[]{"su","-c", "ls /data/data/"});
    

    0 讨论(0)
提交回复
热议问题