Colored logcat script which only shows log entries for a specific application package.
An update to Jeff Sharkey's excellent logcat color script which only shows log entries for processes from a specific application package.
During application development you often want to only display log messages coming from your app. Unfortunately, because the process ID changes every time you deploy to the phone it becomes a challenge to grep for the right thing.
This script solves that problem by filtering by application package. Supply the target package as the sole argument to the python script and enjoy a more convenient development process.
Here is an example of the output when running for the Google Plus app:
Get the script:
OS X: Use Homebrew.
brew install pidcat
If you need to install the latest development version
brew unlink pidcat brew install --HEAD pidcat
Arch Linux : Install the package called
pidcat-gitfrom the AUR.
Others: Download the
pidcat.pyand place it on your PATH.
Make sure that
adbfrom the Android SDK is on your PATH. This script will not work unless this is that case. That means, when you type
adband press enter into your terminal something actually happens.
adband other android tools on your path:
export PATH=$PATH:/platform-tools export PATH=$PATH:/tools
Include these lines in your
Note:should be absolute and not relative.
pidcatrequires at least version 8.30 of
coreutils. Ubuntu 20.04 LTS already ships with it, for 18.04 and below,
coreutilscan be upgraded from the
focalrepo by running the following:
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse' sudo apt-get update sudo apt-get -t focal install coreutils