How to capture Logs

How to capture Logs

ManshuTyagi

Copied from xda-developers Feb , 2020

Before moving forward, make sure you have enabled insecure ADB on your device.
Insecure ADB can be enabled simply by flashing a ZIP file through Custom Recovery.

Insecure Logcat Flasher by USA-RedDragon


Decide what kind of log do you want.

Generally you just need the logcat.

logcat

logcat is a command-line tool which dumps a log of system messages. It contains stack traces when the device throws an error. This is the type of log which is most usually asked for an issue. It can be collected either by using ADB or some app of your choice.

Collect logs using ADB:

adb logcat > logcat.log

You can view the complete list of options available in ADB command line, on

Google's official page for logcat.

dmesg

dmesg command dumps a log of drivers messages buffer of the kernel. This is useful to debug the issues which are most likely related to the device or its sources itself. You will need root access to collect or view dmesg on Android.

adb shell su -c dmesg > dmesg.log

This will export a complete log.

It is important to note that logs must be collected while the issue is happening or just happened. Logs after the issue disappeared, collected after rebooting into a different or new environment are useless.


Taking Logs on Mobile:


Collect dmesg on mobile:

Open a terminal app, and enter:

su -c dmesg > dmesg.log

This will export a complete log.

OR

Install syslog app.

Give it super user (root) permissions and grab logs.


Report Page