AOSP SDK Architecture
The purpose of the Memfault Android SDK [source] is to make it really easy to collect detailed diagnostics from your entire Android device, from low-level or hardware issues to high-level application crashes, and upload them automatically to Memfault.
Components
At a high level, the process of capturing and uploading diagnostics data involves the following components that work together.
The Bort app
The Bort app is a configurable, updatable app that controls the SDK's behavior and contains the SDK's business logic.
When the Bort app has collected diagnostics data, it will enqueue it for upload, which will take place when the relevant constraints are met.
For security reasons, the Bort app is a privileged app. This means that it must be included in your devices' system image, but it can be updated via over-the-air app updates. While over-the-air updates of the Bort app are not required, they allow for easy SDK behaviour changes and updates to incorporate new functionality.
The UsageReporter app (com.memfault.usagereporter)
The UsageReporter app is a lightweight companion system application that provides a mechanism for the Bort app to collect diagnostics information where a persistently running application is required.
The Dumpster native service
The MemfaultDumpster native service is a more privileged binder service designed to reduce the permission level of the Bort and UsageReporter apps.
MemfaultDumpster is currently used to access system properties, provide the optional continuous logging functionality over periodic logging, retrieve procstats, and retrieve storage_info.