Does anybody knows a possibility to add a log entry into the logcat main log?

I need to inject an log line with custom text into this log on arbitrary devices.

The main problem is that I can't just install an own app that does inject the log entries. I need to create the log entry directly on adb.

  • 1
    Use the log commandline tool. Oct 8 '20 at 18:52
  • @IrfanLatif Thanks that looks good. Do you know if log universally available or do I have to expect device that don't support this command?
    – JMax
    Oct 9 '20 at 7:13
  • 1
    log is a toybox applet, available since Android 8: android.googlesource.com/platform/external/toybox/+/…. For older releases you can port the binary. It's very minimalistic. Oct 9 '20 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.