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