Device logs are used for troubleshooting apps. When you have issues with an app, it’s features, or an SDK these logs can help find the root cause of the issue.
This Knowledge Base article provides step-by-step instructions for gathering Android device logs using ADB while troubleshooting on Appdome.
We hope you find this knowledge base useful and enjoy using Appdome!
Gathering Android Device Logs using ADB on Appdome
Appdome is a mobile integration platform you can use to enable extended logs in Android apps.
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.
Using Appdome, there are no development or coding prerequisites. For example, there is no Appdome SDK, libraries, or plug-ins to implement.
Prerequisites for using ADB
In order to use ADB, you’ll need:
- Android SDK. Make sure that platform-tools have included ADB in this package.
- USB driver for the phone
- Android app that has enabled extended logs
To facilitate the usage of ADB, you need to allow USB debugging on your device:
- Enable Developer Options on the Android Device. Navigate to Settings > About Phone > scroll to the bottom > tap Build number seven (7) times. You’ll get a short pop-up in the lower area of your display saying that you’re now a developer
- Navigate to Settings > Advanced > Developer options, check ‘USB debugging’ and click OK on the prompt
- When the device is connected to the computer, you should be prompted to “Allow USB debugging.” If so, check the Box to “Always allow from this computer“
- Click OK
If you do not see the message appear on your mobile device, disconnect and reconnect the USB cable
How to Enable Built Apps with Extended Logs on Appdome
- Check with Appdome support that your account can enable Extended Logs
- While Fusing an app, under Security and Management you can enable Extended Logs
- Under Troubleshooting, enable Extended Logs for the Build
Gathering Android Device Logs Using ADB
- Connect USB cable to the phone
- Navigate using the terminal to the Android SDK directory (for example C:\Program Files\Android\android-sdk\platform-tools)
- Type adb logcat
- Reproduce the problem. This will create logs you want to examine.
- If you want to save the output to file, run: adb logcat > /some-folder/android-debug.log
Note! In case your adb version is 1.0.40 and above, and your device is LG:
- Get the device name from “adb devices”
- Run: adb -s <device name> shell -t “logcat”
How to Obtain Device Logs Using Android Studio
- Connect your Android device to your computer over the USB cable
- Open Android Studio
- Click Logcat
- Choose No Filters in the bar on the top right. You will see the Android device logs being gathered
- Highlight the wanted log messages and press Command + C
- Open a text editor and paste all data
- Save this log file as a .log
How Do I Learn More?
Check out this blog for more information about obtaining logs from Logcat using Android Studio.
If you have any questions, please send them our way at firstname.lastname@example.org or via the chat window on the Appdome platform.