Android device logs are very helpful with troubleshooting apps. Here are the steps to gather Android logs using ADB. ADB stands for Android Debug Bridge. It is a tool you can use that allows you to connect an Android device over a USB cable to your computer. With this connection you can uninstall apps, issue shell commands to your device, install apps, and do more with your device. For more information on this look at this and view this resource.
Have these set up before using ADB
- Install Android SDK from http://developer.android.com/sdk/index.html. Make sure platform-tools is included (http://developer.android.com/sdk/installing/adding-packages.html).
- Install USB driver for the phone (http://developer.sonymobile.com/wportal/devworld/search-downloads/driver)
- Enable Developer Options on the Android Device
- Go to Settings --> Developer Options -->Enable USB Debugging --> Allow USB Debugging
6. Connect USB cable to the phone
7. Connect USB cable to the phone and go to the Android SDK directory
(for example C:\Program Files\Android\android-sdk\platform-tools).
8. Type adb shell
9. Type logcat (ref: http://developer.android.com/tools/help/logcat.html)
10. Collect the log while trying to connect to the gateway and browse
11. Type adb devices
12. Note the device ID, or copy it to the clipboard, then run: adb logcat -v threadtime [device ID] > /tmp/android-debug.log
Obtaining Device Logs With Android Studio
- Connect your Android device to your computer over USB cable
- Open Android Studio
- Click Android Monitor
- Highlight the text and Click Print to be able to export this log.
6. Click Print and then you can define the name for the log file you will be saving.
Device logs are very helpful when troubleshooting with apps and can help you fix the app very quickly. Here is a link with more information on obtaining logs from Logcat with Android Studio.
Thanks for visiting the Appdome knowledge base! We hope Appdome is living up to our mission of simplifying your mobile integrations. If you don't already have an account, you can sign up for free. Happy Fusing!