The greatest struggle for Android developers is adb not filtering output based on the name of the process like the IDE does. There are many hugely complicated attempts to do it using scripts. The lion kingdom decided to do a simpler attempt in C. Funny how writing scripts was what script kiddies did while C was professional. Now, C makes you irrelevant while writing scripts is professional.
https://cdn.hackaday.io/files/1380505906331200/logcat.c
It constantly reads the process table for any process matching the keyword. The keyword is the full package name or a part of it. It then filters the adb logcat output by the process ID. If the program is restarted, it detects the new PID & continues reading. It can exclude the verbose messages or just print info messages. All the output is written to a file.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.