Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Context;

import java.io.IOException;

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();
    }
}