How to generate Android device logs using ADB method? 

Description

In some instances, MDM support technicians might need the logs of the managed devices to understand the issue better and resolve the issues quickly.  If the issue at hand pertains to MDM App, the logs can be directly collected from the app as explained in this document. But if there is an issue at the device level, you need to generate ADB logs. To generate Android debug logs using computer follow the steps given below

Steps

  1. On the managed device, open the Settings app.
  2. Navigate to About Phone -> Build Number. Click on it 6 to 7 times, upon which You are now a developer is shown.
  3. Now, navigate back to Settings -> Developer Options and select the option Enable USB debugging.
  4. Again, navigate back to Settings ->Security. Enable Install from unknown sources.
  5. Connect the device to a computer through USB.
  6. On the computer, download the ADB Zip file from this link and unzip its contents.
  7. Once the contents in makedeviceowner.zip are extracted, open makedeviceowner folder.
  8. Now, open Command Prompt in the expanded folder and execute the command adb devices, which will show you the connected devices.
  9. Then execute adb logcat > file.txt command. This will generate the ADB logs and the logs will be saved to the file.txt file.
  10. You can now share the file.txt file to MDM Support team.