Continuous monitor adb log

I got a new issue:
Why can’t the following adb log print command print in real time under archlinux? adb logcat | grep -E "CMM - "
I suppose this comand can print the realtime android adb log which grep my keywords,
but in fatc, I find out it can’t print out anything,
so what’s wrong with this?
I’m sure this adb + pipline command is ok

Well I’ve just tried running that command (minus the “adb”) in a shell on my Android device and it gives no output there either. So my guess is that this isn’t Manjaro-related.

Please refrain from spamming. This has nothing to do with manjaro or the update - open a new topic for your android problems.

I don’t think that adb logcat is outputting continuosly (in real time), but you may know otherwise.

But it can itself filter the log content in various ways.

man adb
and
adb logcat --help

but:
first you need to specify a connected device
without a connected device … it won’t work

two explanations/examples here:

Strumento a riga di comando Logcat  |  Android Studio  |  Android Developers

https://stackoverflow.com/questions/3707880/using-adb-logcat-with-a-real-phone-and-not-the-emulator

I’m sure I connected my android dev phone, and which is oem unlock and rooted,
When I in windows(10 or 11), I use cmder(which is an opensource terminal like konsle), I type that adb command, and which will print out real-time log in console,
So I want to know what’s the different with this?
Os problem or android only support this for windows?
adb logcat | grep -E “keywords_mylog”

ps: so If I need to recreate a new topic about this, so which category it is belong to?

Linux != Windows

Did you add your user to adbusers group?

this will print the log just fine - I just tested it
it is continuos / real time - messages are added as the come

The problem is with the command you pipe it into.

The program (logcat) has it’s own filtering capabilities.
See the links in the last post perhaps.

ps:
and another one:

https://medium.com/@hissain.khan/filtering-android-adb-logcat-efficiently-in-bash-command-line-4992fb1acd61

grep can be tricky

use -e instead of -E
adb logcat | grep -e “keywords_mylog”

if you are looking for a keyword in the output

man grep :nerd_face: