Goal

This document outlines the steps required to integrate the Memfault SDK into an Android system.

<aside> 👉 Easy access links to important pages in your Memfault project:

Step 1: Integrating the Memfault Bort SDK

The Full Android SDK integration guide can be found here. This involves:

  1. Creating an Android project: be sure to consider which properties to use for hardware and software versioning; these cannot be changed after the project is created (we can always create new projects in the future, with different properties).
  2. Integrating the Bort SDK into the AOSP build: all steps in this section are required for the SDK to function fully. Once these steps are complete, you can build an AOSP image with Memfault included.
    1. Be sure to include the correct project key (from the Android project we just created).
    2. “OTA” (Memfault’s Over the Air Firmware Update system) steps can be skipped, including Creating a keystore for the OTA app can be skipped and Building the OTA update client apk

✅ Verification

Once the integration is complete, and a new AOSP image has been built and flashed onto a device, there are 2 verification steps to check that the SDK is functioning as expected.

First, if RUNTIME_ENABLE_REQUIRED=true was configured in bort.properties, we need to enable the Bort SDK after starting up the device.

  1. Validate the integration using the Bort CLI: this will check that the integration is correctly configured, and that Bort is running correctly. If there are any failures using this tool, please contact us.
  2. Verify that Bort is uploading data to the Memfault dashboard, by enabling Developer Mode, then triggering a Metrics collection. This will show all of the Built-In metrics that the SDK collects.
    1. You can find the device in Memfault from the Devices List (being sure to select the Android project that we created earlier).
    2. The Processing Log will show all data uploaded by the SDK.

Additional Resources

In addition to this guide, we recommend the following resources:

Do not hesitate to reach out to our team if you have any questions!