This guide will help you collect logs from your Android phone using your computer.
You can use these logs to help fix problems or share them with support teams.
- Android phone
- USB cable to connect your phone to your computer
- Windows PC, Mac, or Linux computer
- Android Platform Tools (ADB) installed on your computer
- Open the Settings app on your phone.
- Scroll down and tap About Phone.
- Find Build Number (sometimes under "Software Information").
- Tap Build Number 7 times quickly.
- You will see a message:
"You are now a developer!"
- Go back to the main Settings screen.
- Tap Developer Options (usually at the bottom or under "System").
- Find USB Debugging and turn it ON.
- If asked, tap OK to confirm.
- Use a USB cable to connect your phone to your computer.
- If your phone asks for permission to allow USB debugging, tap Allow.
-
Windows:
PressWindows + R, typecmd, and press Enter. -
Mac or Linux:
Open the Terminal app.
- In the command window, type:
adb devices - Press Enter.
- You should see a list of devices.
If you see your device’s serial number, you’re connected!
- In the same command window, type:
adb logcat > file.txt - Press Enter.
- Your phone is now sending logs to a file called file.txt.
- On your phone, do the thing that causes the problem (for example, open the app that crashes).
- Try to make the issue happen while the log is being captured.
- Go back to the command window.
- Press
Ctrl + Con your keyboard to stop the logging.
- Look for the file.txt file in the folder where you ran the command.
- Send this file to your support team or developer.
-
Device not showing in Step 5?
- Make sure your USB cable supports data transfer.
- Confirm you allowed USB debugging on your phone.
- Try another USB port or cable if needed.
-
Keep the log file small:
- Start capturing logs just before you reproduce the problem, and stop right after.
-
Logcat runs in real-time:
- The log collection will continue until you stop it with
Ctrl + C[2][1].
- The log collection will continue until you stop it with
For a visual walkthrough, see the video and screenshot below:
You’re done! If you have questions, ask your support team for help.
