Since you have a handle to the Process instance, you can use process.destroy() when stopping the service. Logcat processes run independently of your application, so they will continue to work after the Service application stops working if you do not terminate them.
If you just want to clean up the processes on your device while testing the application, you can run adb shell to get a shell prompt on the device, and then use kill <PID> to complete the process.
EDIT
The Process documentation also indicates that you should use ProcessBuilder to configure and start the process:
ProcessBuilder pb = new ProcessBuilder("logcat", "-v", "time", "-s", arg); pb.redirectErrorStream(true); Process process = pb.start(); ...
source share