Tuesday 15 January 2013

java - How force close another application -


I need to force any other application without autorrect.

I try the next step, the application will stop but after a few seconds the application will start (I think this system has any application for security):

 < Code> // try 1 try {method forceStopPackage; ActivityManager Activity Manager = ((Activity Manager) contextService.getSystemService (context.ACTIVITY_SERVICE)); ForceStopPackage = activityManager.getClass (). GetDeclaredMethod ("forceStopPackage", String.class); ForceStopPackage.setAccessible (true); ForceStopPackage.invoke (activity manager, sApplicationPackageName); } Hold (Exception E) {} / 2 Try Local Process = Null Process; DataOutputStream localDataOutputStreamKill = Faucet; DataInputStream localDataInputStreamKill = null; {LocalProcessKill = Runtime.getRuntime (). Try Exec ("su"); LocalDataOutputStreamKill = New DataOutputStream (localProcessKill.getOutputStream ()); LocalDataInputStreamKill = New DataInputStream (localProcessKill.getInputStream ()); If (Local data auto-transcriptkil! = Null) & amp; amp; amp; (LocalDataInputStreamkil! = Null)) {LocalDataOutputTreamKill.lightbites ("kill -9" + Process Info.pid + "\ n"); LocalDataOutputStreamKill.flush (); LocalDataOutputStreamKill.writeBytes ("Exit \ n"); LocalDataOutputStreamKill.flush (); // local process .weight (); }} Hold (exception E) {} / try 3 try {activityManager.killBackgroundProcesses (processInfo.processName); } Hold (exception e) {} / try 4 try {android.os.Process.sendSignal (processInfo.pid, android.os.Process.SIGNAL_KILL); } Hold (exception e) {}   

but killed the suicide application. Please get any thoughts about how to stop any other application without restarting me.

You have root permissions, so you can try the ADB command to stop the app: < / P>

  ADB Shell AMP-Stop Epigack    

No comments:

Post a Comment