Last active
February 2, 2016 03:13
-
-
Save isao/c742a5e8d76ad653ad89 to your computer and use it in GitHub Desktop.
adb logcat by process name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eu | |
# https://gist.github.com/isao/c742a5e8d76ad653ad89 | |
pid=$(adb shell 'ps' 2>&1 | grep com.ericsson.mediaroom.tv3client | awk '{print $2}') | |
if [[ -z $pid ]] | |
then | |
echo 'No process matching "com.ericsson.mediaroom.tv3client"' | |
exit 1 | |
fi | |
adb logcat -v threadtime | grep " $pid " > "logcat-$(date +%Y%m%d-%H%M).txt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment