Search code examples
pythonscriptingadblogcat

Script to stop logcat in terminal window


I currently have a python script that launches an iTerm window and runs logcat on an android device. When what I am doing in the script is complete, I want to also have the ability to stop the logcat. I was originally just killing iTerm to stop the log, but this will not work going forward...is there anyway to programatically stop the log? (this is typically done by pressing ctr+c)


Solution

  • adb shell killall -2 logcat would gracefully stop all running logcat processes on the device.