Android - Kill App From Another App (on A Rooted Device)
I have a rooted Android device. At one point I launch a secondary application from my primary application like so: Intent intent = getPackageManager().getLaunchIntentForPackage('co
Solution 1:
Found a solution:
Process suProcess = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(suProcess.getOutputStream());
os.writeBytes("adb shell" + "\n");
os.flush();
os.writeBytes("am force-stop com.xxxxxx" + "\n");
os.flush();
Post a Comment for "Android - Kill App From Another App (on A Rooted Device)"