When starts use ps to get process ID
I found sometimes that pidcat don't found the application because the start of application is not on the logcat buffer, It means pidcat don't show anything. I think should be easy, to run adb shell "ps" and search here the package to obtain processID, and with that, always you run pidcat if device is working, pidcat show you the log of the application.
Actually I'm really busy, if not, I should do more or less well. But I don't have time now to add this.
+1 for this! As far as I understand, you use a regex like this:
re.compile(r'^.*: Start proc ([a-zA-Z0-9._:]+) for ([a-z]+ [^:]+): pid=(\d+) uid=(\d+) gids=(.*)$')
to extract the PID. This doesn't work for me, because I don't have a line like this at all in my logcat!
So why not use a simple adb shell ps| grep com.example.package |awk -F' *' '{ print $2 }' to reliably get the pid?
I think such an approach would indeed be an improvement, also for other devices. When an app has been running for quite some time, the "Process ... created" message no longer exists in the logcat buffer.
Especially on devices that spam logcat (the LG G2 is especially horrific), these messages can disappear after just a minute or so.
If pidcat cannot resolve the pid of a process, it would indeed be an improvement to resolve it via adb shell ps as suggested in the comments above.
See also pull request #71.