Android examples for Android OS:Shell Command
execute shell command
import java.io.IOException; import android.util.Log; public class Main { private static final String TAG = ""; public static void execute(String command) { try {/* w w w. ja va 2s . c o m*/ Runtime.getRuntime().exec(command); } catch (IOException e) { Log.i(TAG, e.getLocalizedMessage()); } } }