Tutorial How to get logs from your Android device

AndnixSH

PMT Elite Modder
Staff member
Modding-Team
Logcat is the Android logging system provides a mechanism for collecting and viewing system debug output. Logs from various applications and portions of the system are collected in a series of circular buffers.

Non-rooted device:

Matlog/Laughing Logger app (Recommended):

Download Matlog or Laughing Logger app for Android and install it

No PC method (Android 11 and above & Wi-Fi required)
Note: Some devices running Android 11 and above don't have Wireless Debugging. If you don't have Wireless Debugging, and don't have Wi-Fi, then you need PC

Download aShellYou app: Releases · DP-Hridayan/aShellYou

Follow the tutorial how to Connect Self Device: Wireless Debugging Setup

If you have problem connecting, use Shizuku method instead

After connecting, tap the ADB via Wireless Debugging or Local ADB card, select the connected device, and run one of the commands

Laughing Logger:
Code:
adb shell pm grant org.laughing.logger android.permission.READ_LOGS

Matlog:
Code:
adb shell pm grant com.pluscubed.matloglibre android.permission.READ_LOGS

If it says "Process exited with code: 0", it means it is running successfully

Screenshot_20250621-220343.png


PC method
Note: You need a basic knowledge of CMD/Terminal

To enable USB debugging on an Android device, you first need to activate Developer options by tapping the Build number in the "About phone" section of the settings multiple times. Then, navigate to Developer options and enable USB debugging.
After enabling USB debugging, it will allow Android Studio and other SDK tools to recognize your device when connected via USB on your computer. Allow the device to be trusted when asked.

Download standalone SDK Platform Tools for Windows/Mac/Linux: SDK Platform Tools release notes | Android Developers

Open CMD/Terminal.

Navigate to platform tools directory using "cd" command

Copy and paste this command into CMD/Terminal

Laughing Logger:
Code:
./adb shell pm grant org.laughing.logger android.permission.READ_LOGS

Matlog:
Code:
./adb shell pm grant com.pluscubed.matloglibre android.permission.READ_LOGS

1658422735965.png


See more about ADB: Android Debug Bridge (adb) | Android Developers

Recording logs
After giving the app permisson to read logs, you can now record logs. During recording, make sure to replicate a bug or crash to catch the useful logs for diagnosis

Laughing Logger file location:
  • Android 11 and above: /storage/emulated/0/Android/media/org.laughing.logger/Laughing Logger/saved_logs/
  • Android 10 and below: /storage/emulated/0/Laughing Logger/saved_logs/
Matlog file location:
  • Android 11 and above: /storage/emulated/0/Documents/matlog/savedlogs
  • Android 10 and below: /storage/emulated/0/matlog/savedlogs
1658423087137.png

Android Studio:
Note: Android Studio might be complicated to setup, but the logcat interface is easier to use

To enable USB debugging on an Android device, you first need to activate Developer options by tapping the Build number in the "About phone" section of the settings multiple times. Then, navigate to Developer options and enable USB debugging.
After enabling USB debugging, it will allow Android Studio and other SDK tools to recognize your device when connected via USB on your computer. Allow the device to be trusted when asked.

Download Android Studio for Windows/Mac/Linux: Download Android Studio & App Tools - Android Developers

Install Android Studio: Install Android Studio | Android Developers

After installation, open Android Studio and create a new project.

At the bottom of toolbar, open the logcat. Your device should be detected, and will constantly sending logs.

1658417819502.png


To save logs, simply select all (CTRL + A), copy (CTRL + C) and paste (CTRL + V) onto text editor, and save as text file.

Video tutorial:

ADB command line (Advanced):
Download standalone SDK Platform Tools for Windows/Mac/Linux: SDK Platform Tools release notes | Android Developers

Open CMD/Terminal

Change directory to platform tools directory using "cd" command

Type

Code:
./adb logcat > (path)

or on current directory

Code:
./adb logcat > log.txt

If you have more than one device connected, list your devices

Code:
./adb devices

And use -s flag

Code:
./adb -s (device name) logcat > (path)

Nothing will appear on the prompt but it is actually running, it is because the output are saving to disk directly. To stop logging, simply close the window

1658423006447.png


See more about adb logcat:

Video tutorial:


Rooted device/emulator/virtual machine:
Download Matlog or Laughing Logger app for Android and install it

Launch the app and grant root permission

Now you can record logs

Laughing Logger file location:
  • Android 11 and above: /storage/emulated/0/Android/media/org.laughing.logger/Laughing Logger/saved_logs/
  • Android 10 and below: /storage/emulated/0/Laughing Logger/saved_logs/
Matlog file location:
  • Android 11 and above: /storage/emulated/0/Documents/matlog/savedlogs
  • Android 10 and below: /storage/emulated/0/matlog/savedlogs
1658423087137.png
 
Last edited:
Back
Top Bottom