Android Shell Run runSuCommandNoScriptWrapper(Context context, String command)

Here you can find the source of runSuCommandNoScriptWrapper(Context context, String command)

Description

run Su Command No Script Wrapper

Declaration

public static int runSuCommandNoScriptWrapper(Context context,
            String command) throws IOException, InterruptedException 

Method Source Code

//package com.java2s;

import java.io.IOException;
import android.content.Context;

public class Main {
    public static int runSuCommandNoScriptWrapper(Context context,
            String command) throws IOException, InterruptedException {
        String[] args = new String[] { "su", "-c", command };
        Process proc = Runtime.getRuntime().exec(args);
        return proc.waitFor();
    }// ww  w  .  ja v  a 2  s.  c om
}

Related

  1. findProcessIdWithPS(String command)
  2. execRootCmd(String cmd)
  3. execRootCmdSilent(String cmd)
  4. runSuCommand(Context context, String command)
  5. runSuCommandAsync(Context context, String command)
  6. getRoot(String loc)
  7. requestRootPermission(String path)
  8. KillProcess()