Skip to content

Setting up debugging using a DevKit and ADB

Dex Cook edited this page Dec 13, 2019 · 2 revisions

The Clover devices supplied in the DevKit are Android-OS-based hardware that can be communicated with using the Android Debug Bridge (ADB) system provided by Google.

You can read device logs in real time in conjunction with debugging Point of Sale applications, install and debug custom activities, and use all the ADB tools for rapid application development and increased visibility. You can use a different computer to debug the device than the POS software host in some network configurations.

Note: Production Clover devices have all ADB and debugging options disabled in hardware for security and compliance reasons. All production custom activities must be installed through the Clover App Market.

Setting Up ADB

Each OS has different setup requirements and prerequisites, so check Google's current instructions. Usually this involves installing the proper JDK and Android development environments, as well as any necessary drivers (such as the one required by Windows).

Debugging Notes

Notes to debug the device in TCP/IP using Android Debug Bridge (adb), especially on a VM where connecting to host and client OS in sequence may be required:

  1. Plug the device into a laptop. Then, as appropriate:
  2. Based on your OS, do one of the following:
    1. On a Mac, select Connect to Mac.
    2. On a PC, you need to verify that your Clover device is not in merchant mode:
      1. Open Device Manager.
      2. In the list, look for a Clover Devices entry. If one exists, continue to the next step. If one does not exist, verify there is Universal Serial Bus devices entry called Android or one whose name starts with C (for example, C300).
      3. Right-click Clover Device Merchant Mode and select Update driver.
      4. On the Update Drivers window, click Browse my computer for driver software.
      5. Click Let me pick from a list of available drivers on my computer.
      6. From the list of drivers, select ADB Device and click Next.
      7. Once the drivers are updated, click Close.
      8. On the System Settings Change window, click Yes.
      9. Once the computer reboots, open Device Manager and verify there is Universal Serial Bus devices entry whose name starts with C (for example, C300).
    3. On Linux, the setup is usually sufficient but check the distro's requirements. This device is set up for debugging using USB.
  3. On the command line, run adb tcpip 5555 on the command line. This enables debugging over the network on port 5555.

NOTE: If you see the message error: more than one device and emulator, you will need to specify the device. To do this:

  1. On the command line, run adb devices. This retrieves a list of available devices similar to the following.

     List of devices attached
     C010UC43040345  device
     C030UQ50550081  device
    
  2. Modify the command from step 2 of the previous section by including the device number.

    Example: adb -s C030UQ50550081 tcpip 5555

    The device disconnects.

  3. Unplug the USB cable.

  4. Run the following command to reconnect to the device (replacing the address with that of your DevKit):

    adb connect 192.168.1.3:5555

    A connected to message appears.

  5. Run adb logcat or connect with the debugger via IP.

    Example: adb devices

    Your results will look like this:

     List of devices attached
     C010UC43040345  device
     192.168.1.3:5555 device
    

Clone this wiki locally