Android Root execute su with parameters

后端 未结 1 1410
南笙
南笙 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)
提交回复
热议问题