1. Home
  2. Windows Tips
  3. Get android device log

How to get Android device log on Windows 10

Mobile devices and the apps that run on them run into trouble. If you develop apps for a mobile platform, you probably already know how to get the device log for Android phones and view what’s causing a crash or bug. If you’re an end-user, though, and you need to get an Android device’s log, you will find that the process is complicated to follow with lots of tools that need to be installed. Here’s a much simpler and just as effective method you can use to get an Android device log.

Get Android device log

In order to get the Android device log you need;

  • A Windows 10 PC that you have admin access on.
  • A data cable that you can use to connect your phone to the PC.
  • The Android device on hand.

Follow each of the steps below in sequence, and you will have your Android device log within a matter of minutes. This will work regardless of which version of Android is running on your phone or which phone you have.

get Android device log1. Enable Developer options

Follow these steps on your Android device.

  1. Open the Settings app.
  2. Go to About Phone.
  3. Look for Build number.
  4. Tap Build number seven times, and Developer options will be enabled.

2. Turn on USB debugging

Follow these steps on your Android device.

  1. Open the Settings app.
  2. Go to System.
  3. Expand Advanced.
  4. Tap Developer Options.
  5. Scroll down to the Debugging section.
  6. Turn on USB Debugging.

3. Download ADB tools for Windows 10

Perform these steps on your Windows 10 system.

  1. Download the ADB and Fastboot tools for Windows 10 (https://redirect.viglink.com/?format=go&jsonp=vglnk_159748438694611&key=375566b60d6830a5cce1fcbb1ebbab5d&libId=kdvgyets0102gais000DAf0bdbw4u&loc=https%3A%2F%2Fwww.addictivetips.com%2Fandroid%2Fdownload-adb-and-fastboot%2F&ccpaConsent=1—&v=1&opt=true&out=https%3A%2F%2Fdl.google.com%2Fandroid%2Frepository%2Fplatform-tools-latest-windows.zip) from this link.
  2. Extract the zipped folder.
  3. Copy the complete path to the Platform-tools folder to your clipboard.

4. Access Android device on Windows 10 with ADB tools

You will need to interact with both your Windows 10 system and Android device in this step.

  1. Open Command Prompt with admin rights.
  2. Use the cd command to move to the Platform-tools folder.
cd path-to-Platform-tools-folder

Example

cd C:\Users\fatiw\Desktop\platform-tools_r30.0.4-windows\platform-tools
  1. Connect your Android device to your Windows 10 PC with the data cable.
  2. Unlock the device and make sure the screen is awake.
  3. On Windows 10, run the following command in the Command Prompt window that is already open.
adb.exe kill-server

If you see the “cannot connect to daemon at tcp:5037: cannot connect to 127.0.0.1:5037: No connection could be made because the target machine actively refused it. (10061)” error, don’t worry and proceed to the next step.

  1. Run the following command in the Command Prompt window.
adb.exe devices
  1. Look at your Android device. You will see a prompt asking for permission to Allow USB debugging. Tap Allow.

  1. Run this command, and the device ID should be accompanied by ‘device.’ Note the device ID down.
adb.exe devices

5. Start logging device events

  1. You’re now ready to start creating a log. Run the following command in the Command Prompt window. Replace the [device id] with the ID obtained in the previous step.
adb.exe logcat -v threadtime [device id] > C:\android-debug.log

Example

adb.exe logcat -v threadtime PT99621AA1A40100564 > C:\android-debug.log
  1. Interact with your Android device and reproduce the bug or crash or whatever activity it is you want to log.
  2. Once you’re done, return to the Command Prompt window, and tap Ctrl+C to end the log.
  3. The log can be accessed from the root of the C drive. The file will be called android-debug.log.

Conclusion

An Android device is fairly easy to debug regardless if you’re using a Windows 10 system or if you’re using Linux or a Mac. Android does not impose a lot of restrictions when it comes to which platform you can develop for it on. If you’re wondering whether or not you need Android Studio, special USB drivers, or an SDK installed to get the log, you don’t, as is evident from the steps above. Make sure you’re able to access your Android phone’s storage from File Explorer, and everything will go smoothly.

1 Comment