When using Esri products for the Android mobile platform and the application crashes, the generated log files (logcat) can be retrieved to perform diagnostics and troubleshooting. However, as not all of these products have Developer mode enabled by default, the log files can only be retrieved using the Android SDK Platform-Tools.
Note: Some Esri apps offer troubleshooting logs that can be obtained from the app that can help with troubleshooting errors (see the screenshots below from Field Maps as an example). This article explains the workflow to export device logs, not logs specifically from a certain app.
The following workflow can be performed for non-rooted Android devices to extract the log files. However, prior to reproducing the error to generate and extract the log file, Developer mode must be activated on the Android device. A computer is required to perform the extraction.
Warning: This workflow involves using Android SDK Platform-Tools and is not supported by Esri.
Note: On some Android devices, the Build Number option can be accessed via Settings > About phone > Software information.
Note: 4MB is sufficient for storing the logs. However, this can be increased as needed.
adb logcat -v threadtime -d > C:\AndroidLog\logcat.txt
Note: If the command failed with an error like this: "adb : The term 'adb' is not recognized as the name of a cmdlet, function, script file, or operable program.", try running the same command with ".\adb" instead of "adb", as follows.
.\adb logcat -v threadtime -d > C:\AndroidLog\logcat.txt
Note: When the export process is started, you may get a prompt on your phone to allow USB debugging. You must click OK to allow debugging.
Note: For more information on understanding the log file, refer to Reading Bug Reports.