> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/psdk-latest/reference-material/how-tos/how-to-get-logs-from-cm5.md).

# How to - Get logs from CM5

This will describe the various ways to get the logs from CM5 devices

## Logging using PC <a href="#logging-using-pc" id="logging-using-pc"></a>

1. Connect the android device to the PC
2. Run the command adb devices in command prompt. You should see the device along with the serial number
3. If you have the device connected and Android Studio is open, then you should see the android logs in logcat screen
4. However if you just want to see the logs without using Android Studio, then run the below command

* adb logcat

1. You can also run multiple instances of this. To save to the file you can run

* adb logcat > t.txt

## Pulling Engage using SysMode <a href="#pulling-engage-using-sysmode" id="pulling-engage-using-sysmode"></a>

1. Go to the SysMode by pressing the sysmode button with the paper clip
2. Select the arrow in the upper left corner.
3. Select the menu Transfer Logs or Transfer Logs (Debug Cable)
4. If Transfer Logs (Debug Cable) is selected then you would need a green / yellow cable and the debug board. A USB drive can be connected to
5. the cable and the logs will be stored on the USB drive
6. If Transfer logs is selected you can pull the logs from Android with following adb command

* adb pull /sdcard/downlod/dumplogs.tgz

## Pulling Logs Via VHQ <a href="#pulling-logs-via-vhq" id="pulling-logs-via-vhq"></a>

1. VHQ provides a way to get the OS logs from the device as part of a diagnostic activity
2. Click on the Device Serial Number which gets to Device Profile page
3. On Device Profile page Schedule Diagnostic Actions Next scroll down and select GET OS Logs click on right arrow ">", and you should see
4. Get OS logs under Selected Action(s)
5. Scroll down select Next Contact Submit
6. Now to check for Get OS logs results click on Device Profile click on Diagnostic Actions tab and look for GET OS Logs job
7. Once Get OS Logs job is completed scroll to the right & click on View Results on the right
8. Once in the results window click on View Results This should download the logs to your PC
9. The log file is in tgz format. Unzip the file, and then unzip AndroidLogs.tgz
10. Once AndroidLogs.tar is unzipped, logcat.log can be found there. Open logcat.log with any text editor to look at the logs.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verifone.com/psdk-latest/reference-material/how-tos/how-to-get-logs-from-cm5.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
