Android examples for App:App Running
disable App from Shell
//package com.java2s; import java.io.DataOutputStream; import java.io.IOException; public class Main { public static void disableApp(String packageName) { Process p;// w w w . j ava2 s.c o m try { p = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream(p.getOutputStream()); os.writeBytes("pm disable \"" + packageName + "\"\n"); os.writeBytes("exit\n"); os.flush(); } catch (IOException e) { e.printStackTrace(); } } }