Device logs are used for troubleshooting apps. Whenever you have issues with an app, it’s features, or the built-in 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
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.
Appdome is a mobile integration platform you can use to enable extended logs in Android apps.
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 to see if your account can enable Extended Logs on app builds.
- While Fusing/Building an app you can enable Extended Logs at the bottom of the page.
- Under Troubleshooting, enable Extended Logs for the Build.
- You can enable the ability to email or upload logs to Appdome support with a tap in the app within Extended Logs.
Gathering Android Device Logs Using ADB
- Connect a USB cable to the mobile device.
- Here’s a resource that guides one through installing ADB on Mac, Windows, or Linux.
- Open CLI (Terminal on a Mac) (Start –> Run –> CMD on Windows).
- 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 plus your device is LG:
- The device name can be gained by entering “adb devices.” This command will also tell you if the device is connected to the computer.
- Run: adb -s <device name> shell -t “logcat”Here’s a link to a video on extracting extended logs from Android apps.
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.