Reset Search



KB40336 - How to gather logs from an Android device for development review?

« Go Back


Last Modified Date2/16/2017 6:30 PM
This article provides step by step instructions how to gather logs from an Android device.
Problem or Goal
End user may be unable to send log due to the Pulse Secure / Pulse Workspace app can not complete the provisioning process.
Some vendors may not install or configure Android for Work on a device.  If this is the case, when the Pulse Secure / Pulse Workspace app will fail to successfully provision the device.  We use Google APIs to leverage the Android for Work architecture.  If those API calls fail, we will display error messages such as :
Enrollment is not enabled for this device
Provisioning is not supported on this device

Currently, there is no way to gather any logs from our client when this scenario occurs.  In that event, we will need to gather the logcat output from the device.

PC Preparation

  1. Download and install the Android Developer SDK from
  2. Scroll down to the bottom and locate the section labeled Get just the command line tools 
  3. Select the platform you wish to use.
  1. Once the installation is completed, you will need to launch the “SDK Manager” in the “Android SDK Tools” program group.  You will need to install a few components.
  2. Select the following components to install.
  3. Under Tools, select Android SDK Tools > Android SDK Platform-Tools
  1. Under Extras, select Google USB Driver.
  1. Once the device is recognized and the SDK is installed, open a command prompt and run the following commands.
cd \
md temp


Device Preparation

  1. Enable the Developer Options on the device.
  2. ​On the Android device, open the Settings app.
  3. Scroll down to the bottom of the page and locate the About tablet or About Phone section and tap on it. 
  1. Scroll down to the bottom and locate the Build number section and tap on it seven times. 
  2. You will see a message indicated that you have activated the Developer options.
  1. Go back one screen and locate the Developer options menu option.
  2. Open the page.  Ensure the feature is On at the top of the page.
  3. Locate USB debugging and activate the feature. 

Log Gathering

cd C:\Program Files (x86)\Android\android-sdk\platform-tools

Note: This is on a Windows 10 x64 machine.  The path may be different depending on the version of the operating system.  Search for adb.exe to locate the file.  You will need to change to that directory to run the application.

Depending on the operating system, you may need to install specific device drivers for the Android device.  If the PC does not recognize the device and does not install the missing drivers, this will need to be resolved before proceeding.  Consult the device manufacturer’s documentation how to resolve this issue.
  1. Run the following command below:
adb devices
  1. This will list the connected device and confirm that adb can see the following device. If no device is listed, verify that the operating system is seeing the device correctly.  Open Device Manager to determine if it is installed correctly.
  2. Once the device is accessible from adb, run the following command:
adb logcat > c:\temp\logcat.txt
  1. Let the command run; do not break out of it until you have reproduced the issue.
For example, install Pulse Secure, then register the device and get it to the point of failure. Once that has been done, return to the command prompt and hit <CTRL> C to exit the adb application. A copy the file will exist in C:\temp and send this file to Pulse Secure Support for further evaluation.
Related Links
Attachment 1 
Created ByCraig Brauckmiller



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255