All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog. This project currently does not attempt to adhere to Semantic Versioning, but breaking changes are avoided unless absolutely necessary.
- Added GNSS/location metrics collected from
dumpsys location. Reports 14 diagnostic metrics covering fix reliability, time-to-first-fix, position accuracy, signal strength (C/N0), L5 dual-frequency performance, and power consumption. Gated behind the newmetrics.location_enabledSDK setting (enabled by default).
- Added Bluetooth disconnect metrics:
bluetooth.disconnectandbluetooth.disconnect_reasonevent metrics, plus abluetooth.disconnectscounter. These are collected via statsd. - Added thermal zone temperature metrics collected from
/sys/class/thermalvia Dumpster. Metric names follow the patternsysfs_thermal_<zone>_c(current),sysfs_thermal_<zone>_c_max, andsysfs_thermal_<zone>_c_min. This feature is gated behind a new SDK setting.
- Fixed battery metrics being written every few seconds even when unchanged, which could produce excessive metric storage (~500 MB/day on some devices). Battery level, charging state, and cycle count are now deduplicated and only recorded when the value changes. Also fixed charge detection to correctly identify USB and wireless chargers.
- Fixed reboot reason detection on Android 7.1:
ro.boot.bootreasonis now used as a fallback whensys.boot.reasonis not set. - Fixed disk wear SELinux contexts: the sysfs node used to read eMMC lifetime data is now explicitly relabeled, allowing access on BSPs with tighter sysfs rules.
- Fixed OTA activity to include a default category in its intent filter, so it can be launched via action intent without specifying a package name.
- Fixed AOSP 16 test build: ART patches no longer remove a method that is required by the test build.
- Fixed Android 7.1 build failure caused by the dex preopt optimizer being unable to handle Kotlin bytecode. Dex preopt is now disabled for SDK 25.
- Fixed a spurious WTF log produced by the MemfaultStructuredLogd app at startup. Hardware acceleration is now disabled since the app has no UI and no graphics data directory.
- Added missing
property_contextsentries for Android 7 SELinux policy, covering Bort version/config properties and the legacy property-based enable/disable mechanism.
- Added support for Android 16.
- Added
uptime(elapsed realtime since device start) andboot_idto metrics and reports. - Introduces optional uptime-based timestamp adjustment in metric aggregation
and HRT, controlled by the new
useUptimeTimeAdjustmentSDK setting. - SDK API: previous metric recording methods that only accepted a timestamp are deprecated. Updated variants accept both a timestamp and an uptime. Existing call-sites continue to work and will automatically include the current uptime.
- Fixed Logs2Metrics not matching logcat entries with an empty/null tag. System components commonly omit the tag, so empty string and null are now treated equivalently.
- Fixed diskstats block size calculation that caused written-bytes metrics to be over-reported by 8×. Kernel diskstats always uses 512-byte blocks regardless of the hardware sector size.
- Support for Android 7.1.
- Fixed missing bluetooth metrics coming from statsd.
- Updated zjsonpatch.
- Added ability to ignore common WTF patterns. These were chosen across multiple
projects based off of WTF volume and usefulness. Ignoring these will make the
WTFs that do show up more useful. In addition, introduces new SDK settings to
control whether these patterns are used, and to add additional WTF ignore
patterns.
- The default ignored patterns are:
- "No service published for: appwidget at android.app.SystemServiceRegistry.onServiceNotFound.*"
- "EXTRA_USER_HANDLE missing or invalid, value=0.*"
- "Failed to read field SystemLocale.*"
- "BUG: NetworkAgentInfo.*"
- "Attempt to decrement existing alarm count 0 by 1 for uid 1000.*"
- "Removed TIME_TICK alarm.*"
- "requesting nits when no mapping exists.*"
- "Could not open /sys/kernel/tracing/instances/bootreceiver/trace_pipe.*"
- The default ignored patterns are:
- Added Bluetooth quality metrics.
bluetooth.ble_scan_result.counttracks the number of BLE devices found in each scanbluetooth.ble_scan_result.attributiontracks the initiator of the BLE scanbluetooth.device_rssi.(min|mean|max)tracks the Bluetooth RSSI distributionbluetooth.device_rssi.device_id.latesttracks the Bluetooth device reporting the RSSI valuebluetooth.device_tx_power_level.(min|mean|max)tracks the Bluetooth TX power level distributionbluetooth.device_tx_power_level.device_idtracks the Bluetooth device reporting the TX power level valuebluetooth.quality_report.rssi.(min|mean|max)tracks the Bluetooth RSSI distribution reported by the Bluetooth quality report (if available)bluetooth.quality_report.snr.(min|mean|max)tracks the Bluetooth SNR distribution reported by the Bluetooth quality report (if available)bluetooth.quality_report.retransmission_count.(mean|max|sum)tracks the number of retransmissions reported by the Bluetooth quality report (if available).bluetooth.quality_report.reported.latestreports the latest Bluetooth quality report.
- Added heartbeat metrics for any batterystats metrics that were previously only
used in HRT.
- camera
camera_on_ratio
- video
video_on_ratio
- flashlight
flashlight_on_ratio
- bluetooth
bluetooth_on_ratio
- usb_data
usb_data_on_ratio
- wake_lock
wake_lock_on_ratio
- wifi_full_lock
wifi_full_lock_ratio
- long_wake_lock
long_wake_lock_on_ratio
- screen_wake
screen_wake_count
- package_install
package_install_count
- phone_connection
phone_connection_latest
- phone_in_call
phone_in_call_ratio
- phone_state
phone_state_in_ratiophone_state_out_ratiophone_state_em_ratio
- cellular_high_tx_power
cellular_high_tx_power_on_ratio
- nr_state
nr_state_none_rationr_state_restricted_rationr_state_not_restricted_rationr_state_connected_ratio
- camera
- Added support for reporting USB contaminant events.
usb.contaminant_reported.latest
- Updated existing network metrics to generate a heartbeat metric as well.
connectivity.airplane_mode.latestconnectivity.internet.latestconnectivity.validated.latestconnectivity.captive_portal.latestconnectivity.roaming.latestconnectivity.unmetered_temporarily.latest
- Added basic IPv4 and IPv6 connectivity metrics.
connectivity.ip_version.latestwith states "IPv4", "IPv6", "IPv4+IPv6", "?"connectivity.ipv4_status.latestwith states "Internet Available", "Configuration Error", "Not Available"connectivity.ipv6_status.latestwith states "Internet Available", "Local Only", "Not Available"
- Added Wi-Fi RSSI time-based moving average metric. This metric is calculated
from raw values obtained from WifiManager broadcasts using an exponential
moving average.
connectivity.wifi.rssi.moving_avg
- Added Wi-Fi roaming and channel hop counters.
connectivity.wifi.roaming_countincrements when connected to the same configured network but the connected access point changedconnectivity.wifi.channel_hop_countincrements when connected to the same network, but the channel changed
- Added metric to distinguish between 2.4/5/6 GHz Wi-Fi frequency bands for
easier device identification.
connectivity.wifi.frequencyconnectivity.wifi.frequency_band
- Added count of scanned Wi-Fi networks metric from statsd.
connectivity.wifi.scan_network_countconnectivity.wifi.scan_network_count.countconnectivity.wifi.scan_network_count.mean
- Added low memory event reporting when low memory is reported by the System
Server.
memory.low_mem_reported
- Added slow I/O event metrics which contain a 24h count of the slow I/O events
of a given type.
disk.slow_io_(read|write|unmap|sync|unknown)_24h_count
- Added USB device attached/detached event reports. These will be reported when
USB devices are attached or detached and will contain the full list of
connected devices in each category.
usb.devicesusb.accessories
- Added Wi-Fi OUI (Organizationally Unique Identifier) support. The OUI is
queried via the Dumpster service using
dumpsys wifi. Memfault will automatically calculate the manufacturer of the device based off of its OUI.connectivity.wifi.ap_oui
- Added Wi-Fi disconnected session metric. The event contains the disconnect
reason, time connected, last RSSI and link speed as well as channel. These
metrics are available in Android 12+.
wifi_disconnect_sessionwifi.frequency-band-bucketwifi.frequency-bandwifi.failure-code-namewifi.failure-codewifi.last-rssiwifi.last-link-speed
- Added low memory kill event reporting when applications are killed by the
system due to low memory.
memory.lmk_kill_occurred
- Coalesced consecutive logcat "switch to" separators. This should reduce the spam where multiple log lines in a row are just buffer switches.
- Fixed incorrect session end time. The session end will now be recorded when end is called, instead of at the heartbeat collection time.
- Cleaned up continuous logcat "switch to" buffer logs to always append a newline. This avoids the "switch to" lines intermixing with normal output.
- Fixed invalid boot id parsing in Bort Lite. Returns a zero'd UUID instead of "unknown" for the Linux boot id. Also, falls back to "reboot,permissiondenied" instead of "reboot,bort_unknown" for better clarity.
- Fixed potential memory leak in UsageReporter found by LeakCanary.
- Fixed session deadlock when the sessions rate limit is hit.
- Increased rate limit defaults.
- The Sessions rate limit was thought to be 125 every day, but ended up being 125, and then 1 back every day due to the token bucket algorithm.
- Similarly, the mar_file/client server mar file rate limit implied 500 files per hour but ended up being 24 a day once the limit was hit.
- Ignored potential Room database migration failures. Fallback to destructive migration if the database migration fails on downgrade.
- Bumped to reporting library 1.6.0.
- Added support for Gradle testFixtures.
- Changed Android Studio default project. Load the project root in Android
Studio instead of
MemfaultPackages/.MemfaultDumpstateRunner,MemfaultDumpster, andMemfaultStructuredLogdwill now be visible in the IDE. - Updated MAR unspooling to use new
data_upload_start_datedevice config variable to control what data should be uploaded. - Added leakcanary to the Bort, OTA, and Reporter apps to check for leaks.
- Enabled Android lint.
- Deleted
log_buffer_expiredcounter metric. This was too spammy.
- Fixed MetricsIntegrationTest race condition.
- Fixed a bug where bugreports would not always be cleaned up due to incorrect file permissions in the Bort app.
- Refactored the device config handlers into clearer interfaces and implementations.
- Added several more bugreport reply broadcasts (OK_REQUESTED, OK_GENERATING, OK_GENERATED, ERROR_GENERATED_TIMEOUT).
- Added optional constraints on bugreport requests through a multibind interface.
- Added new SDK Setting to upload collected Android Bugreports immediately
outside of the periodic MAR batch task. Added new
trace_idandextra_infofields toBugReportRequests.
- Fixed reporting of the new Wi-Fi metrics to visualize on the device timeline more appropriately. Fixed an error when recording null per second metrics.
- Added some bort_cli.py comments.
- Deleted unused code in Logger.kt.
- Refactored Bugreport Intent logic.
- Added 3 more logs-to-metrics parser types.
sum_matchingcaptures 1 integer, and sums all captured values in the heartbeat.distribution_minmeanmaxcaptures 1 double, and generates a min/mean/max distribution for all captured values in the heartbeat.string_propertycaptures 1 string, and reports the latest value for that string.
- Added tracking of the metered, temporarily unmetered, and roaming network
capabilities in HRT.
- Added a
connectivity.metered.latestheartbeat metric for tracking metered network usage.
- Added a
- Added new disk wear and disk write Device Vital heartbeat metrics. eMMC/UFS
lifetime estimation and version stats are collected from the Health HAL
implementation, falling back to a hardcoded UFS or eMMC filepath if not
implemented. Bytes written each heartbeat is collected by reading the sectors
written value from
/proc/diskstatsfor matching physical devices in/sys/blockmultiplied by the sector size to get a value in bytes.disk_wear.<source>.lifetime_remaining_pct.latestcaptures the lifetime remaining estimation for type A flash in increments of 10%. The source can be one of: "mmc0", "624000.ufshc", or "HealthHAL".disk_wear.<source>.lifetime_b_remaining_pct.latestcaptures the lifetime remaining estimation for type B flash in increments of 10%. The source can be one of: "mmc0", "624000.ufshc", or "HealthHAL".disk_wear.pre_eol.latestcaptures the pre-EOL status of consumed reserved blocks, as "Normal", "Warning", or "Urgent".disk_wear.version.latestcaptures the version as described from the vendor implementation of the Health HAL.disk_wear.vdc.bytes_writtencaptures the bytes written for that heartbeat.
- Added per-app CPU usage metrics. The CPU usage percentage for each heartbeat
is collected by parsing
/proc/<pid>/stat/for system and user time (stime+utime) divided by the total usage (sum of all fields from/proc/stat).- By default, the SDK will only create heartbeat metrics for a defined set of "interesting" processes. Please reach out to customer support to configure this set.
- Otherwise, the top 10 processes exceeding the 50% CPU usage threshold will also be recorded. Please reach out to customer support to configure these thresholds.
- Added new general connectivity metrics reported by NetworkCapabilities.
connectivity.roamingcaptures whether the connected network is roaming. This metric is only available in HRT, on API 28+.connectivity.unmetered_temporarilycaptures whether the connected network was temporarily unmetered. This metric is only available in HRT, on API 30+.connectivity.metered.latestcaptures whether the connected network is metered.
- Added new basic Wi-Fi from the WifiInfo reported by NetworkCapabilities.
connectivity.wifi.frequencycaptures the Wi-Fi frequency of the associated link in MHz.connectivity.wifi.link_speed_mbpscaptures the current link speed of the associated link with the highest RSSI in Mbps.connectivity.wifi.security_typecaptures the security type of the current 802.11 network connection as a human-readable string.connectivity.wifi.standard_versioncaptures connection Wi-Fi standard as a human-readable string.connectivity.wifi.lost_tx_packets_per_secondcaptures the average rate of lost transmitted packets, in units of packets per second.connectivity.wifi.retried_tx_packets_per_secondcaptures the average rate of transmitted retry packets, in units of packets per second.connectivity.wifi.successful_tx_packets_per_secondcaptures the average rate of successfully transmitted unicast packets, in units of packets per second.connectivity.wifi.successful_rx_packets_per_secondcaptures the average rate of received unicast data packets, in units of packets per second.
- Added support for Android 15.
- Added parsers for more HRT batterystats data.
screen_dozecaptures whether the display is dozing in a low power state (link).flashlightcaptures whether the flashlight was turned on.bluetoothcaptures whether Bluetooth was enabled.usb_datacaptures whether a USB connection was established (as reported byandroid.hardware.usb.action.USB_STATE).cellular_high_tx_powercaptures whether the modem spent more of its time at the highest power level versus any other level.nr_statecaptures the service level of the 5G network that's connected (link).
- Updated comments on various batterystats fields. More improvements to come in clarifying the name and use of batterystats metrics!
- Dumped any existing logs when continuous logging starts, to retain logs captured from before a reboot.
- Added control over the maximum age of sampled data, to match the controls over unsampled data.
- Added support for parsing the binary log buffers (events, security, stats) with continuous logs.
- Modified dumpstate to write bugreports to /data/misc/MemfaultBugReports
instead of to Bort's app dir. This is necessary for Android 15 support and CTS
compliance to work around neverallow sepolicy rules. This also allowed
deleting the custom
bort_app_data_fileapp label for the Bort app.
- Added explicit Android System AID mappings for more consistent system UID attribution in tombstone and network stats parsing.
- Added VPN and USB as explicitly defined network types using
connectivity.network. - Fixed a bug in PhoneState where the unknown
???state was reported asnull. - Added exponential backoff for EAGAIN errors in continuous logs. Each write is fsync'd immediately after write to reduce the likelihood of data loss.
- Added missing ignore.cil files for SDKs 32, 33, and 34.
- Stopped running unit tests on release sources.
- Migrated the SDK to communicate over a named domain (*.memfault.test) rather than localhost for local development.
- Removed unneeded mockk init calls.
- Added some tests for unknown fields in device config.
- Refactored the unsampled holding area logic into a single class.
- Differentiated some continuous logging logs for easier debugging.
- Added new per-component total storage metrics. The total storage used
(apps+cache+data+external) by an application can be recorded as a
storage_<package>_bytesmetric. Please feel free to contact us if you would like this enabled for applications in your project. - Added new mechanism to group operational crashes by package. The existing
operational_crashescore metric can be divided intooperational_crashes_<group>metrics, based off of the package names of the crashes. Please feel free to contact us if you would like this enabled for your project. - Added new DropBox count core metrics. The number of DropBox entries processed
each heartbeat, grouped by Issue type, is now recorded as a
drop_box_<type>_countmetric. This makes identifying crashy devices even easier. - Added new
.mean_time_in_statemetric alongside.total_secswhen theTIME_TOTALSaggregation is used withStateTrackers. The existing.total_secsmetric is truncated between heartbeats, so it is only useful as a rough percentage comparison versus other states. The new.mean_time_in_statemetric can be used to track the absolute time spent in a state, even across heartbeats, so its value can be used as an absolute number.
- Returned a
Sessionobject whenstartSessionis called to improve the API usability. - Removed
SYSTEM_BOOTfrom the default list of 'other' collected DropBox Entries. After some field testing, this DropBox Entry was not consistently collected and did not contain useful information. - Silenced tags in continuous logs that did not match the filter spec.
- Fixed a logs-to-metrics bug where it could not parse logcat tags with spaces.
- Fixed a harmless SELinux violation where memfault_structured_app could not access its own data directory.
- Fixed a bug in bort_cli.py's validation-sdk-integration command where it wouldn't check the right location for system_ext sepolicy.
- Fixed a continuous log bug where spaces in the tag would break parsing.
- Migrated off junit5/jupiter back to junit4, at least until it has first party support from the Android team/
- Added minio to the debug network security config for local development.
- Logs to Metrics: Bort can scan all captured log files (including those not uploaded) for patterns, and record metrics based on the results. These can be configured in the dashboard. See documentation.
- New Core Metric for CPU usage (
cpu_usage_pct). - New Core Metrics for memory usage (
memory_pct,memory_pct_max). - New Core Metric for storage usage (
storage_used_pct). - New Core Metrics for network Usage (
connectivity_*). These replace the previousnetwork.*metrics - those will no longer be collected, unless theNetwork Usage: Collect Legacy Metricsis enabled in the dashboard. - New Core Metrics for thermals (
thermal_*). These replace the previoustemp.*metrics - those will no longer be collected, unless theCollect legacy thermal metricsis enabled in the dashboard. - Added a
min_battery_voltagemetric to report the lowest observed voltage. - New metric to capture the battery charge cycle count
(
battery.charge_cycle_count.latest) - this only works on Android 14+. Note that the previous metric added in 4.18.0 did not work. - New metrics (
thermal_status_*) to capture thermal mitigation status. - New HRT metric (
device-powered) capturing device shutdown/startup events.
- Update the target SDK version to 34 (Android 14).
- Updated to the default hardware version (
ro.product.model) and software version (ro.build.version.incremental) to match current defaults for new projects. - Improve battery use attribution (including where usage would have previously
been assigned to
unknown). - Added dashboard controls for
marupload job constraints (battery, charging state). - Modified sepolicy to fix some
memfault_structured_appviolations. - Removed validation of the OTA application ID being configured, if OTA is not
being used (if
TARGET_USES_MFLT_OTAis unset). reporting-lib-kotlinsupports asynchronous usage, when constructing aReportingClient.
- Fixed an issue which caused
COUNTaggregations on non-numeric metric values to always return zero. This was introduced in 4.17.0. - Fixed a bug in the SDK validation tool (
bort_cli.py) which caused it to fail when running on Windows. - Fixed a bug where the software/hardware version and device serial sysprops would not be updated immediately if changed remotely via SDK settings (a reboot may have been required for them to take effect).
MemfaultStructuredLogdAppwill not crash if sepolicy is incorrectly configured.- Always captured metrics for app versions/sysprops, in an edge-case where the software version sysprop changed.
- Updated mockk.
- Removed bort internal log-to-disk functionality (this was not used).
- Removed local storage from
DevicePropertiesStore- forward all internal metrics using public APIs. - Bort no longer writes to the event log.
- Refactored use of WorkManager.
- Updated
ktlintand reformatted some code. - Inject coroutine dispatchers in more places.
- Record internal metrics for WorkManager job timing.
- Fixed a flaky unit test (
DevicePropertiesStoreTest). - Record zero values for per-app battery usage, for designated apps, instead of ignoring them (currently, Bort SDK apps only).
- Fixed Stability Device Vitals: a change to the way metrics are collected in
Bort 4.17.0 meant that
operational_hourswould erroneously be set to zero, resulting in incorrect Stability Vital charts.
- Added new screen on/off battery drain metrics:
battery_screen_on_discharge_duration_ms,battery_screen_on_soc_pct_drop,battery_screen_off_discharge_duration_ms,battery_screen_off_soc_pct_drop. These will replacescreen_off_battery_drain_%/hour/screen_on_battery_drain_%/hourin the future, once they are supported in the Memfault dashboard (to more accurately track battery drain across the fleet).
- Bort has been moved from the
systempartition to thesystem-extpartition. This enables the use of Generic System Images. - The AOSP patches to
product/mainline.mk/mainline_system.mk(Android 11) andproduct/generic_system.mk(Android 12+) have been removed. These were required to whitelist Bort in thesystempartition. These were the only required AOSP patches if using Android 9+, meaning that all remaining AOSP patches are now optional, to enhance Bort functionality (except if using Android 8). - To support this change, we have forked the Bort SDK because of
backwards-incompatible
bpfile changes required to supportsystem-ext. We will continue to support Android 8-10 on the8-10branch, and themasterbranch will support android versions 11+. No other work is required other than making sure to check out the correct branch - the AOSP build will fail if using the wrong branch. - You will need to remove the aforementioned patch, if already applied and committed to your AOSP repo.
- Added the ability for Bort to upload any DropBoxManager tags, without the need
to add specific processing for each in the SDK. This is configurable from the
dashboard - by default we will start collecting
SYSTEM_AUDIT,SYSTEM_BOOT,SYSTEM_FSCK,SYSTEM_RECOVERY_LOG,SYSTEM_RESTARTentries, which can be viewed on the Device Timeline.
Bug fixes in the Bort SDK are now broken out into their own section in this changelog.
- Fixed a bug where Bort would drop reboot events after a factory reset, if
RUNTIME_ENABLE_REQUIRED=trueand Bort was not enabled at the time of boot. Bort will now upload the latest reboot when it is enabled, if not already processed.
- Store the software version alongside a metric report, so that metrics will not be associated with the wrong software version in the case of an OTA update.
- Also, collect metrics immediately after boot, if an OTA update was just installed - reducing the potential for metrics to be assigned to the wrong software version.
- Refactored HRT file generation.
- Switched to using the Room gradle plugin.
- Added support for automatically collecting the phone's IMEI number as a
metric:
phone.imei. - Updates the Stable Hours algorithm. By default, only ANRs, non-WTF app crashes, kernel panics, and tombstones count as "crashes" for the purposes of the algorithm. It is now also possible to exclude these crashes from the algorithm if desired (please reach out to customer support for more information).
- Fixed a bug in the battery per-hour charge and discharge calculations where the wrong denominator was being used.
- Fixed a bug in the SDK where heartbeats after reboots could fail to process.
- Fixed a bug in the SDK where batterystats collection could fail inconsistently.
- Added the device serial and override to the diagnostics content provider.
- Disables metrics handling in more places if Bort is also disabled.
- Added more internal metrics to detect how often the Bort app restarts.
- Cleaned up spurious Bort logs.
- Fixed bug when tracking Bort's own battery usage.
- Battery device vitals are automatically added to
Sessions, to enable seeing how the Session
affected battery life:
battery_discharge_duration_ms,battery_soc_pct_drop. - Added battery charge cycle count metric:
battery.charge_cycle_count- this tracks the total number of charge cycles the battery has been through (if the device supports this and writes it to/sys/class/power_supply/battery/cycle_count). - Added
startSession/finishSessionnative APIs for Sessions - Reboots are now always uploaded, regardless of fleet sampling resolution (previously only uploaded when Debugging resolution is enabled).
- Removed legacy settings endpoint support (this had not been used for ~2
years - replaced by
device-config). - Added rate-limiter for Sessions.
- Catch a
SocketTimeoutExceptionduring settings update, so that it doesn't fail the job. - Changed the jitter for settings update, so that it evenly distributes requests throughout the fleet. Also removed any jitter from the very first settings update on a fresh device.
- Updated gradle to version 8.8 (fixed a build failure we saw internally).
- Changed network security config in the debug variant of the Bort app, for our internal CI configuration.
- Added internal metrics to track the size of Bort's databases.
- Support for the new Session metrics. This
enables Memfault to be used for more product-specific use cases by associating
metrics to product functionality.
- The latest reporting-lib on each platform have been updated to start, end, and record metrics to sessions (reporting-lib 1.5 has been published to Maven with Sessions support).
- Every session will automatically include relevant
sync_successful,sync_failure,memfault_sync_successful,memfault_sync_failure,connectivity_expected_time_msandconnectivity_connected_time_msDevice Vitals metrics.operational_crasheswill also be automatically recorded, even if the value is 0.
- Support for new Daily Heartbeats has been added. This enables support for
daily metric aggregations to supplement or replace Hourly Heartbeats for lower
upload frequency use cases. Please contact us for more information.
- Daily Heartbeats will contain every metric that Hourly Heartbeats do, besides batterystats at the moment.
- The
structuredlogdmetrics database has been replaced by a Room database inside the Bort app. This move allows us to more quickly iterate on improvements to how metrics are persisted. Thestructuredlogdservice now forwards all calls to the Bort app for backwards compatibility. - Bort Lite's serial can be overridden using by sending an
INTENT_ACTION_OVERRIDE_SERIALintent with anINTENT_EXTRA_SERIALstring extra. - DropBox is now queried when Bort starts in Dev Mode.
- A bug was fixed where Device information would be incorrectly cached until Bort restarted.
- Added a
latestInReportoption to theeventAPI inReporting. This will create a heartbeat metric with the latest value. - New Bort diagnostics - to improve diagnosing any SDK integration issues:
- The SDK validation tool is enhanced to check Bort's runtime state (whether Bort is enabled, job execution state, recent failures, etc), and report this in the validation tool output. This will also now report several key compile-time configuration parameters.
- Bort will upload more types of error to the
Integration Hub Processing Log
(
batterystatsparsing errors, file cleanup errors, and job failures).
- Added a new SDK Setting ("Allow OTA downloads based on the Network Type") to allow configuring OTA downloads to never happen on a roaming cellular network. This is unset by default, and will override the existing "Allow OTA downloads on Metered Networks" setting if configured.
- Removed usages of
launchwhen calling coroutines - avoiding any potential dangling work after a job/receiver has completed.
- Added support for V1 metrics to the Bort custom metrics database (this is not used yet, outside of Bort Lite).
- Fixes a bug where a single possibly corrupt MAR file would prevent the upload of all remaining MAR files.
- Adds type information to each MAR filename.
- Updates Gradle, WorkManager, Anvil, Kotlin Serialization, and various AndroidX libraries. Re-organizes the internal Jupiter test setup.
- Fixes a bug where Batterystats would fail to parse Doubles.
- Fixes a bug where the Count aggregation for Events would incorrectly report as a String instead of a Number.
- Improve rounding numbers when parsing battery stats.
- Fix an exception when parsing batterystats files with lines that have trailing commas.
- Bort rate-limiting events are uploaded, to be displayed in the Processing Log.
- Added a
bort-clicommand (generate-keystore) to generate Bort keystores. See documentation.
- Updated
reporting-lib-javato match latest kotlinreporting-libAPIs (addedsync,successOrFailure). - Catch
SecurityExceptiongathering network stats when permission is not granted, so that metric collection task does not fail. - Added more logging around custom OTA logic.
- Update Bort Lite's metrics implementation to match the full SDK in reporting
boolean vales as
0/1. - Added more Bort permission checks to the SDK validation tool.
- Removed SELinux violations from Stability Device Vital calculation.
- Bort will now always report an
allnetwork usage metric, even if there was no usage during the heartbeat. - Added Bluetooth as a possible network usage metric type.
- Capture Bort battery usage as internal heartbeat metrics.
- Fixed some typos in code.
- Refactored how Bort registers scoped services.
- Bort can capture per-app heartbeat metrics for storage/network/battery usage. This is not enabled yet, pending backend changes.
- Added a windows batch script to install Bort Lite.
- Fixed an issue where Android 8 build could fail because of missing
seapp_contexts. - Updated Bort logs when not enabled to be clearer.
- Remove manual SharedPreferences construction.
- Don't add core battery metrics when there is no discharge (including on devices with no battery).
- Enable Dev Mode automatically when installing Bort Lite (and collect metrics immediately).
- Updated to Gradle 8.3, and Kotlin 1.9.21.
- This release contains more features inside the Bort app which rely on the permission whitelist changes made in 4.10.0. This release itself isn't breaking, but the Bort app v4.13.0 will not work with a base Bort SDK prior to 4.10.0 - this will only be an issue if updating the Bort apk separately from the rest of the Bort SDK.
- Removed the default value of the
PROJECT_KEY_SYSPROPproperty inbort.properties. Setting the project key via broadcast would fail, if this is configured (it would reset whenever Bort restarts). Be sure that this property is not configured if you intend to set the project key via broadcast. See documentation.
- Android 14 is supported.
- Bort Lite is supported (several changes below are in support of this). This is
a cut-down version of the Bort SDK for previewing Memfault on any Android
device with
adbaccess. This will be released separately, as a pre-built binary. batterystatsandPackageManageraccess is moved fromUsageReporterto theBortapp. Periodic log collection is also moved to the Bort app on Android versions <= 12, andsyspropcollection is done inside Bort ifMemfaultDumpsteris not available. This enables the forthcoming Bort Lite feature. TheREAD_LOGSandINTERACT_ACROSS_USERSpermissions are removed fromUsageReporter(they were added to Bort in 4.10.0).- Connectivity metrics can now be collected by the
Bortapp, ifUsageReporteris not installed. This is only used for Bort Lite (otherwise,UsageReporteris still used because it is persistent).
- Disabled setting the project key via broadcast if
PROJECT_KEY_SYSPROPis configured. See documentation. - Use
successOrFailureto generate thesync_memfault_successful/sync_memfault_failureCore Metrics. This improves their display on the device timeline. - Fixed the naming of the battery life Core Metrics
(
operational_hours/operational_crashfree_hours) - removing the.sumsuffix. - Fixed an issue where if Dev Mode is toggled (enabled+disabled) on the device,
then
marfiles will fail to upload until the device is rebooted. - Migrated all Package Manager queries to use the java
PackageManagerAPI instead ofdumpsys pm- this is much faster, and removed the possibility fordumpsyslock contention. Also added a caching layer to avoid doing a full query each time this data is needed.
- Adds Custom Metrics database in the Bort app. This is only used for the
unreleased Bort Lite feature (i.e. not for the standard Bort SDK) - this will
be migrated in a future release, to remove the
MemfaultStructuredLogDdatabase. - The
reporting-libCustom Metrics library will attempt to add metrics to the Bort Custom Metrics database using aContentProviderifMemfaultStructuredLogDis not installed. This is a no-op unless using Bort Lite. - Adds a fallback device identifier, for the case where Bort doesn't have permission to get the real device identifier (only for use in Bort Lite).
- Fixed camelCase package naming.
- Cleaned up duplicate network interceptor code in the
debugvariant of the app. - Removed all uses of
runBlockingin unit tests. - Removed unnecessary
IndividualTaskWorkerFactoryinterface. - Added an internal
bort_litemetric to flag when Bort Lite is being used vs the full Bort SDK. - Improved dagger usage in
SystemEventReceiverto inject more classes vs creating them locally.
- Added a OTA validation to the bort_cli.py
- Added a new disk wear metric.
- Improved logging of network requests.
- Improved the way the Bort BoardConfig is loaded to allow it to be added multiple times. This was added to support devices who include a system and vendor boardconfig.
- Improved the sepolicy check in the bort_cli.py
- Moved the custom metrics database into bort. This is not yet used but will allow for future improvements.
- Added
connectivity_connected_time_msandconnectivity_expected_time_msconnectivity metrics. See documentation. - Added support for
Reporting.report().successOrFailure()andReporting.report().sync()- see documentation. Update to the latest version ofreporting-lib(kotlin only) to use these. - Project keys can now be set using a sysprop, in addition to an Intent. See documentation for more details.
- Fixed parsing of application ID in tombstones, where a named process is in use.
- Fixed an issue with Continuous Logging, where the filter-spec was not correctly applied.
- Added internal metrics for Bort network usage.
- Previous AOSP system images with Bort are not backwards compatible with newer versions of the Bort apk, due to new permissions required by Bort that are only granted by a new AOSP build. These permissions were previously granted to UsageReporter. This means that newer versions of the Bort apk cannot run on older system images - they must be released together.
- Added network stats metrics. This tracks the total and per app usages of the Wi-Fi, Ethernet, and cellular interfaces. Please see documentation for more information.
- Added new Crash-Free hours metric. Please see documentation for more information.
- Added new battery charge rate first 80% metric. This measures the rate at which the battery is charging before Android begins trickle charging the battery at a slower rate. This allows for a more accurate understanding of the health of the battery.
- Added new Battery SOC percentage drop metric which will be used to estimate expected battery runtime of the device.
- Added a new Battery State of Health (SoH) metric. This metric measures the current full charge capacity of the battery against the original full charge capacity and reports the value as a percentage of health remaining.
- Fixed a typo in TemperatureMetricCollector. Thank you satur9nine for bringing this to our attention and fixing. PR #4
- Improved detection of battery state (charging or discharging) when gathering battery related metrics.
- Improved the reliability of OTA downloads by refactoring to more modern coroutine best practices.
- Improved Custom Metrics API for native code (C/C++).
- Missing
Eventtype added. - Missing metadata added.
- Removed finishReport method and report name parameters as they were meant for internal use only.
- Support Soong (Blueprint files) build system.
- Removed deprecated Custom Event API.
- Fixed native Reporting API timestamp generation.
- Missing
- Fixed .gitignore to remove build files that were incorrectly being included.
- Updated AGP, Kotlin, and 3rd party libraries to newer versions.
- Refactor the Kotlin Reporting Library to use the Java lib internally to keep a single source of truth for implementation.
- Moved DropBoxManager entry processing from UsageReporter to Bort. This stops waking Bort for every new entry, if Bort already isn't running, and significantly simplifies DropBoxManager entry processing.
- Improved Kotlin formatting by updating ktlint.
- Removed unused ingress URL.
- Added exemplary Java app compiled using Android Make to demonstrate usage of the Java based Reporting lib.
- Introduced a new pure java based reporting library. This is easier to use in apps and services built by Android.mk and Soong build systems.
- Minimize disk writes by StructuredLogd.
- Property metrics are now kept in memory instead of being sent to StructuredLogd
- Don't re-write metric metadata if it is already correct.
- OTA app will now try to stay running (using a JobScheduler job, and optionally
a foreground service) while downloading A/B updates. Set
useForegroundServiceForAbDownloads = trueinAutoInstallRules.ktto use a foreground service. - OTA app will now recover if killed while
UpdateEngineis downloading an A/B update (using a periodic job which runs every 15 minutes). - Made libmflt-structuredlog a Soong module.
- Refactored the OTA app to support more granular control over the download and
install constraints. Download and installation can now be configured
separately from each other. Default network, storage, and battery constraints
are now available alongside any custom logic. See
AutoInstallRules.kt for more
details. The Memfault CLI 0.18.0+ supports
attaching extra information to OTA payloads using the
--extra-metadataoption, which can be used for further customization of the download and install constraints. - Added support for collecting new batterystats summary and per-app usage metrics. We will roll out this feature over the coming weeks - please contact us for more information.
- Added support for collecting SELinux violations without using Android bugreports by parsing logcat directly - please contact us for more information.
- Improved file cleanup deletion logic so that one single large file over the size limit doesn't force other smaller files to be deleted.
- Fixed an issue where UsageReporter couldn't forward data to Bort on Android 13+.
- Fixed an ANR in UsageReporter while collecting temperature metrics.
- Fixed continuous logging SELinux permissions on Android 12.1+.
- Fixed continuous logging alarm on Android 11+.
- Fixed a bug where a state update could be dropped in the OTA app.
- Fixed several Stream leaks in Bort.
- Fixed an issue where HRT files were not being uploaded because the Custom Metrics service configuration was stale.
- Updated to AGP 8.0.1, Kotlin 1.8.21, Kotlin Coroutines 1.7.0, JVM 17.
- Moved package namespaces to the gradle file from the manifest.
- Turned on Kotlin allWarningsAsErrors.
- Turned on Kotlin explicitApi mode.
- Enabled more verbose unit test logging output.
- Added Dagger and Hilt to the OTA app.
- Enabled strict mode for all debug apps.
- Disable the UsageReporter -Receiver classes when Bort is disabled.
- Add missing deprecation annotations to CustomEvent API.
- Report a Bort installation id to track new app install vs existing app where data was cleared.
- Removed (previously deprecated) individual file upload support: MAR is the only supported upload mechanism.
- Bort will resend Config State when not synced with backend.
- Fixed an issue where if SDK settings change, they are not applied immediately, and fleet sampling configuration may not be updated.
- If the project key was changed at runtime, enable resetting it: See Documentation.
- Fixed a FileNotFoundException in Bort processing files to upload.
- Fixed a crash during file cleanup, caused by modified date changing during the cleanup process.
- Limit DropBoxManager queries to a maximum file age of 1 hour after a fresh install of Bort.
- When using Client-Server mode, limit the age and retry count of files waiting to be transferred to the Server device in UsageReporter.
- Fixed a UsageReporter crash when a message is received during service shutdown.
- Added an internal metric for the Bort package name.
- Track any task worker failures.
- Fixed an issue where files could be leaked in UsageReporter, when using Client-Server mode.
- Added remotely-configurable storage limits for UsageReporter/Bort cache folders.
- Added more granular storage limits for fleet sampling devices with disabled aspects.
- Added internal metrics for storage usage/file cleanup.
- Added metric for Fleet Sampling resolutions.
- Bypass all rate-limits in Dev Mode. See Documentation
- Batterystats via HRT
- Bort writes batterystats history directly to the HRT file produced by the metrics service.
- Bort calculates batterystats aggregate metrics to replicate existing backend processing.
- Allow the project key to be changed at runtime via intent broadcast. See Documentation.
- Removed cuttlefish related AOSP patches as they were for internal use only.
- Improved MAR file bundling.
- Fixed a socket error when running in Client/Server mode.
- Fixed a bug that caused MemfaultDumpster to crash.
- Fixed crash when channel closes in UsageReporter.
- Updated Android Build Tools and Libraries.
- Updated AGP to 7.4.1
- Limit max storage age of MAR files to 7 days (down from 30).
- StructuredLogD now forces timestamp linearity for time calculations.
- Fix SELinux violation caused by dumpstate calling
dump()on the memfault_structured service.
- Fixed incorrect HRT typing on internal metrics.
- Added metric for tracking deleted MAR files.
- High-Res Telemetry. Custom Metrics are now shown on timeline in high
resolution, in addition to aggregated values.
See documentation.
- Adds new
eventmetric type. This will replace Custom Events. - Makes aggregations optional for various metric types.
- Changes signature of
aggregationsparameter fromvarargto<List>.
- Adds new
- New built-in connectivity metrics:
connectivity.type,airplane_mode,connectivity.validated,connectivity.captive_portal. See documentation. - Support Fleet Sampling when using client/server mode.
- Fixed the
bort_cli.pypython version check (was using a bad string-basd check). - Continuous Logging mode now works on Android 13.
- Filter
DropBoxManagerintents in UsageReporter - don't wake Bort for unused tags. - Fix Custom Metric
MIN/MAXaggregations. These were using a lexicographical sort, which could result in incorrect results. - Bypass WTF rate-limiting when Dev Mode is enabled.
- Flag log uploads containing a kernel oops.
- Enable
-fstack-protector-allfor MemfaultDumpster to enable easier debugging of crashes. - Fixed an issue in Continuous Logging which could cause a parsing failure in frontend (spelling of "beginning").
- Add collection mode metadata to log uploads.
- Adjust
marfile upload jitter to match batching period.
- Migrates Bort internal metrics to use High-Res Telemetry.
- Fixed an issue where bugreports may fail to be processed by Bort if the Bort OTA app is installed on the device.
- Fixed an issue which could cause batterystats collection to fail after some time-change events.
- Fixed an issue in WTF on-device rate-limiting.
- Continuous Logging Mode is in preview. When enabled, logs will be continuously
collected by the
MemfaultDumpsterservice. This is designed to avoid missing logs because of buffer expiry. See documentation. For devices running Android 8/9/10 a new AOSP patch is required for Continuous mode to work. - On-device scrubbing of tombstone files. See documentation.
- Built-in metrics for Storage have been changed. Bort does not collect
storage.primary.metrics any more - instead collectingstorage.data.metrics - see documentation. - All Bort sepolicy files now have leading/trailing newlines, to avoid bad merges during build.
- Added logging for client/server disconnection events.
- WTFs are rate-limited separately from Java exceptions.
- New runtime integration validation check.
- Fixed a race condition in the OTA app, which could cause a crash when opening the UI.
- Improved how settings are overridden during CI tests.
- Fleet Sampling, including new Memfault Log Collection.
- Support for Android 12L.
- Support for Android 13.
- Adds a Development Mode to Bort, to make the integration and testing experience easier. See documentation.
- C/C++ API for reporting custom metrics (not yet documented).
- OTA app can now be configured to auto-install updates (with no user
intervention) by setting the
OTA_AUTO_INSTALLproperty totrueinbort.properties. In the future, it will be possible to override this in the dashboard. Also adds acustom_canAutoInstallOtaUpdateNowcallback (inautoInstallRules.kt) to customize this logic. See documentation. - Custom log scrubbing rules can be defined in
CustomLogScrubber.kt. See documentation.
- OTA will now automatically reboot after applying an A/B update.
- Adds configurable limits to
marfile size. Multiple bundledmarfiles may now be created if over the limit. - Adds configurable limits for total
marfile storage (by size/age). - Fixed an issue where devices running a Qualcomm QSSI Android 12 build may fail to collect custom metrics.
- The OTA app can now fall back to using default settings if it cannot fetch updated settings from the Bort app.
- Force Bort's OTA settings ContentProvider to be queryable, to work around an issue on some devices where the OTA app could not request settings from the Bort app.
- Updated several libraries/tools used by Bort, including Gradle, AGP, Dagger, etc.
- Improved Bort build speed, and removed many spammy java/kotlin warnings during compilation.
- Fixed an issue where the
marbundling task may not get scheduled (causing no files to get uploaded until the next device reboot) after changing a specific combination of SDK settings. - Made zip compression level configurable.
- Adds an OTA update check task to the Bort CLI:
bort_cli.py ota-check --bort-ota-app-id your.bort.ota.app.id - Fixed an issue where metrics service could not create files on some devices due to encryption state.
- Added a compile-time check to ensure that Bort SELinux policy has been correctly applied.
- The OTA app will now continue to check for updates while waiting to download/install.
- Added internal metrics around
marstorage/usage. - Changed the default API endpoint from
api.memfault.comtodevice.memfault.com(to match remote settings configuration). - Added the device software version to the
device-configserver call. - Bort can optionally fetch device configuration from new
/device-configendpoint.
- Enhanced the
SDK validation tool
to check that the
MemfaultStructuredLogD(Bort's metric collection service) is correctly configured. - In a client/server configuration, Bort SDK settings are now forwarded from the server to the client.
- Added a maximum file storage limit on the client, in client/server mode.
- Updated several tool versions (Gradle, AGP, Dagger, etc).
- Fixed a potential crash in the metric reporting service, when using State Tracker metrics.
- Compiler and sepolicy fixes for Qualcomm/QSSI Android 12 release.
- Fixes an issue in
MemfaultStructuredLogDwhich could cause an error during startup or shutdown when storage is not available.
4.0.0 includes all changes listed for 4.0.0-RC1 below.
See documentation for new Built-In Metrics and Custom Metrics APIs.
- Note: The Bort gradle build now requires JDK 11 (this is a requirement for the latest version of the Android Gradle Plugin).
- Updated several dependencies, including Gradle 3.7.2 and Kotlin 1.6.10.
- Updated patch descriptions.
- Fixed an issue where custom metrics may not be enabled on some devices.
This preview release contains several features which do not yet have full documentation.
- Custom Metrics SDK. See the
ReportingAPIs inreporting-lib, which is also published as an artifact to Maven Central ascom.memfault.bort:reporting-lib:1.0. - Android 12 support.
- Bort supports running in client/server mode, on configurations containing multiple connected devices.
- Bort records storage usage metrics - these are captured automatically.
- Bort records CPU/skin temperature metrics - these are captured automatically.
- Bort can capture selected installed app versions as Device Attributes. This is configurable in the dashboard, on the Data Sources tab.
- Bort can capture selected system properties as Device Attributes. This is configurable in the dashboard, on the Data Sources tab.
- Bort will now only run as the primary user, on devices with multiple users.
- Bort is updated to use the latest version of several tools & libraries
(Gradle, Kotlin, Android Gradle Plugin, etc) and a
compileSdkVersionof 31. - Fixed an SELinux violation when Bort accesses DropBoxManager entries on a recent targetSdkVersion.
- Fixed a race condition which caused a crash when Bort was started by a ContentProvider query.
- Fixed an edge-case in DropBoxManager processing, which could cause an entry to be missed.
BUILD_ID_CODEinbort.propertiesis replaced byBUILD_ID_CODE_OVERRIDE. This is now an override, which is disabled by default - and should only be uncommented if required (SDK updates will always increment the build ID internally, so this will not normally be needed).- The
custom-event-liblibrary has been removed. TheCustomEventAPI is now located in thereporting-liblibrary, which is also now published as an artifact to Maven Central ascom.memfault.bort:reporting-lib:1.0.
- Bort now uses Maven Central instead of JCenter for dependencies.
- Added support for the
mar(Memfault Archive) file format - this enables bundling data into a batched file upload, instead of uploading a separate file for every piece of data. This is not yet enabled by default. - Bort is migrated to use the Dagger dependency injection framework.
- Fix a potential crash after requesting a bugreport via Intent.
- Sepolicy changes to allow Bort+OTA to run on the latest build of Android 11, and with a target SDK version of 30.
- Enable requesting an OTA update check via Intent
(
com.memfault.intent.action.OTA_CHECK_FOR_UPDATES).
- Added ability for bort to log to disk, to aid debugging. This is disabled by default.
- Fix a crash when using A/B OTA updates.
- Disable debug variant.
- Add system properties for Bort SDK/patch versions.
- Improved internal observability.
- Improve rate-limiting behavior after a reboot.
- Fix a rate-limiting issue which sometimes caused regular data collection to be missed.
- Added internal logging for the upstream Bort version code.
- OTA Update Client: Bort now includes a full OTA Update client. See documentation for more information.
- Enable Bort to collect internal logs when custom log scrubbing rules are in place.
- Fix an issue during SDK integration, where Bort sepolicy files can be included multiple times, resulting in build errors.
- Added the ability to collect kernel oops' in Caliper.
- Fix an issue causing a CTS/GMS test failure.
- Fix "Bort enabled" log (previously included incorrect "enabled" value).
- Improve Bort internal logging and metrics.
- Make periodic bugreport rate-limiting remotely controlled. This fixes an issue where some bugreport collection was being rate-limited.
- In 3.6.0, the OTA app had to be configured with an application ID and certificate (even though not being included in the build). This is fixed - OTA app configuration is no longer required when not being used.
- Structured Logging (introduced in 3.5.0) has been renamed to Custom Events.
Any code using the
StructuredLogAPI from thestructured-log-liblibrary (now removed) must be changed to call the equivalent methods in theCustomEventAPI from thecustom-event-liblibrary.
- Fixed Custom Events (formerly: Structured Logs) on devices where
RUNTIME_ENABLE_REQUIRED=false. These devices would fail to upload events. - Fixed SDK validation script (
bort_cli.py --validate-sdk-integration) when running on Windows (this previously reported incorrect failures). - Added new metrics and Custom Events reporting the behavior and impact of the Bort SDK, to enable Memfault to track down any issues that may arise with Bort.
- The SDK patch script now works correctly when cuttlefish emulator directories are missing.
- OTA update client: a new OTA update client is included in this release. This is not yet ready for use (and is not yet documented), and is not included when building. The new OTA update client will be available in a future Bort release.
- Structured logging: this new API enables logging structured events, which appear directly on the device timeline See documentation for more information.
- Android 11 support for the Bort SDK.
- Fixed a problem where BatteryStat-based system metrics stop being collected if
the battery was fully charged and still plugged. To resolve this, patches for
frameworks/basehave been added to the SDK. The commandbort_cli.py patch-aosp --android-release $RELEASEwill need to be run again to apply this new patch. - The bort apk is now backwards-compatible with older SDK versions (from 2.2.4 onwards). This means that the bort app can safely be updated (via Play Store or an MDM tool) without a full system image update. Not all new bort apk features will be available, depending on the bort SDK version installed in the system image.
- Added the ability to configure storage limits (disk space or age) for bugreports stored on the device.
- Populate the "captured timestamp" for DropBox-sourced items.
- Fix a rare issue in the on-device rate limiting system.
- Make HTTP request timeout a configurable parameter.
- Add randomized delay to uploads to distribute fleet-wide requests over time.
- Structured logging: this is an experimental new feature still in development.
- Capture log files, even when empty, to make it clear the SDK is working as expected.
- Fixed 2 bugs in the Dymamic SDK Settings code that 1) caused changes in the polling interval to not get applied until Bort got restarted or disabled/re-enabled 2) caused most periodic collection tasks to restart, upon any change in Dynamic SDK Settings, even if the change was unrelated to the periodic collection tasks.
- Fixed a bug in the logcat capturing code that caused noisy, but harmless logs of a (handled) exception.
- Fixed an issue in the logcat capturing code that caused the start time for the next capture to be not as accurate as it should be, which could lead to missing log lines between captures.
- Fixed a bug that could sometimes cause Bort to crash under rare circumstances, when reconnecting to MemfaultUsageReporter.
- Added a
dontauditsepolicy line to avoid failing a CTS test. Seememfault_dumpster.tefor more information.
- On-device data scrubbing: Caliper traces pertinent to allowed application IDs are uploaded and others are filtered out, on-device. Similarly, Caliper-captured log lines are scrubbed before they are uploaded, based on allowed application IDs and configured text scrubbing rules. The data scrubbing rules can be configured through the Memfault Settings UI. Note that bug reports are still scrubbed server-side. See data scrubbing documentation for more information.
- Hard-coded, 5-second command (i.e. logcat) timeouts have been removed and replaced with remotely configurable timeouts.
- DropBoxEntry tags can be excluded entirely from uploading. The list of tags to exclude can be configured in the Memfault Settings / Data Sources UI.
- Fixed/avoided a problem relevant to Android 8.x, where Bort would occasionally crash due to bugs in the AOSP platform code.
- Improved the gradle build scripting to prevent accidentally replacing the
MemfaultPackages/settings/settings.jsonwith different settings. In case the local file contains settings that differ from what has been configured in the Memfault web service, the build is aborted and a RFC 6902 JSON diff is printed to aid the user, as well as suggestions on how to fix the issue.
- Dynamic SDK Settings: at run-time, Bort will now periodically fetch the SDK
settings from the Memfault web service, making it possible to change the
settings remotely, after shipping. Many settings that were previously
specified as build-time constants in
bort.propertiesmust now be configured in the Memfault web app via your project's Settings page. When building MemfaultBort.apk, the gradle build script will download the settings and place it in a file calledMemfaultPackages/settings/settings.json. This file is used as initial SDK settings and also as fall-back, in case the settings from the web service cannot be used. - A new "Caliper" data source has been added to collect logcat logs when issues occur. By default, logs are collected in hunks of 15 minutes and are uploaded only if issues occurred around that span of time. In the Memfault UI, the logs can be found through the timeline of a device, or under the "Logs" tab of an Issue detail page.
- File uploads are now gzip-compressed prior to uploading to save bandwidth.
- A built-in metric
MemfaultSdkMetric_bort_version_codehas been added that contains Bort's version code.
- Fixed a bug that caused overly aggressive rate limiting under certain conditions.
- All periodic data collection tasks are now also rate limited, to avoid uploading more data than desirable in case those tasks are triggered by repeatedly enabling/disabling of the SDK.
- New built-in metrics have been added that count the number of traces by tag.
The naming format is
drop_box_trace_%s_countwhere%sis filled with the tag, i.e.system_tombstone. - A new built-in metric called
drop_box_traces_drop_counthas been added that counts the number of dropped traces due to rate-limiting.
- Rate limiting: Bort will now also rate limit reboot event uploads.
- A bug has been fixed that caused project keys for newly created projects to fail the gradle build.
- A new option is available to label a bug report that is manually triggered via
the intent-based API (the action
com.memfault.intent.action.REQUEST_BUG_REPORT). When the optional ID is provided, thedumpstate.memfault.requestidsystem property is set to the value provided. Additionally, a BroadcastReceiver can be specified to which the status of the bug report request will be reported by Bort. See https://mflt.io/android-bort-sdk for details.NOTE: in order to use this feature, the AOSP system image has to be updated (merely updating MemfaultBort.apk is not sufficient, because this feature also involved a change in the MemfaultDumpstateRunner system component).
- Added a build-time check that runs as part of the AOSP build, to ensure the MemfaultBort.x509.pem signing certificate matches the signature of MemfaultBort.apk.
- Improved
bort_cli.py's SDK validation by also printing more details about the reason of a failed validation.
- Rate limiting: Bort will now rate limit uploads to the Memfault web service, to avoid faulty devices from uploading too much data.
- Bug fix: avoid uploading empty trace files.
- Fixed a bug that caused
BUG_REPORT_MINIMAL_MODE=trueto only enable minimal mode bug reports to get captured after rebooting but not after enabling the SDK at run-time. - Remove a spammy log message.
- Have you ever wondered how the metrics in your device timelines are trending across your whole fleet? With the 3.0.0 version of Bort, now you can view visualizations of these metrics aggregated across all your devices! See https://mflt.io/fleet-wide-metrics for details.
- The aforementioned "experimental" data source is now ready for prime time! It can be used to collect traces and metrics, with additional data sources coming in future SDK releases. See https://mflt.io/memfault-caliper for details.
- Reboot events were added in an earlier version of the SDK but didn't make it into the changelog. Let's call that a 3.0 feature too! See https://mflt.io/android-reboot-reasons to learn more.
- The
bort_src_gen.pytool used to require Python 3.6 to run, but it is now compatible down to Python 3.4.
- Experimental DropBoxManager API based data source:
- Added uploading of DropBox-sourced ANRs, Java exceptions, WTFs, last kmsg logs and Tombstones with "native backtrace" style dumps.
- Improved DropBox file upload, reusing existing upload worker task that is also used to upload bug reports.
- Experimental DropBoxManager API based data source:
- Refactored parts of the infrastructure in UsageReporter and Bort apps to collect DropBox entries, logcat logs, etc.
- Added infra to collect installed package metadata.
- Added a preliminary uploader for DropBox-sourced tombstones.
- Fixed a bug where the DropBox entry collection process would miss entries after a backwards RTC time change.
- The
bort_cli.pytool now only writes to a validation log file when running the validation command.
- Add a backtrace when sending an error response in IPC between the UsageReporter and Bort apps.
- Any custom configuration of Hardware and Software Versions as well as Device
Serial sources is now automatically retrieved by the SDK from the Memfault
backend during the build process by a gradle task. This means it is no longer
necessary to manually configure the following properties:
ANDROID_HARDWARE_VERSION_KEYANDROID_DEVICE_SERIAL_KEYANDROID_BUILD_VERSION_SOURCEANDROID_BUILD_VERSION_KEY
- Added the option to capture "minimal" bug reports. These collect the data
required for Memfault diagnostics while being roughly 5x smaller and requiring
10x less load on the system. If system load or bandwidth are concerns for your
deployment, we recommend using minimal mode. See
BUG_REPORT_MINIMAL_MODEinbort.properties. - Added options to enable/disable the data sources that Bort uses to collect
traces. By default, only bug reports are used
(
DATA_SOURCE_BUG_REPORTS_ENABLED=true). We are working on adding a new data source that uses Android's DropBoxManager API. This is still experimental and is therefore disabled (DATA_SOURCE_DROP_BOX_ENABLED=false). - Memfault now supports custom configuration of the Hardware and Software
Versions as well as Serial Number sources by specifying which system
properties to read. New SDK properties must be configured to enable this. See
the following properties in
bort.properties:ANDROID_HARDWARE_VERSION_KEYANDROID_DEVICE_SERIAL_KEYANDROID_BUILD_VERSION_SOURCEANDROID_BUILD_VERSION_KEY
- The
bort_cli.pyvalidation command now uses rotating log files and performs additional checks to ensure the bort SDK integrated into the system image is consistent with the APKs installed.
ktlintwas applied to the codebase, resulting in reformatting of many files.- Logcat log fetching has been added to the experimental
DATA_SOURCE_DROP_BOX_ENABLEDfeature
- Remove reliance on
BOARD_PLAT_PRIVATE_SEPOLICY_DIRfor Android 8.1 or older platforms. This makefile variable is supposed to be set to only a single directory on these older platforms and was causing issues when the variable was already used for other purposes than Bort. As a work-around,BOARD_PLAT_PRIVATE_SEPOLICY_DIRis now used only on Android 9 and newer. For older Android versions, Bort's private sepolicy changes are patched directly intosystem/sepolicy. SeeBoardConfig.mkandpatches/android-8/system/sepolicy/git.diff.
- Additional HTTP logging
- Before this release, the Bort application ID and feature name had to be
patched in various files, using the
bort_cli.pytool. With this release,BORT_APPLICATION_IDandBORT_FEATURE_NAMEproperties have been added to thebort.propertiesfile. Files that had to be patched previously, are now generated at build-time, using theBORT_APPLICATION_IDandBORT_FEATURE_NAMEfrom thebort.propertiesfile. - The
bort_cli.pycommandpatch-borthas been changed to only patch thebort.properties'BORT_APPLICATION_IDandBORT_FEATURE_NAMEproperties if they have not already been set.
- The target SDK is now a configurable SDK property (via
bort.properties) - The default target SDK has been lowered 26 from 29 for more consistent behaviour across the supported platforms.
- The min SDK version has been lowered to 26 to support Android 8.
- The folder structure of the SDK has been changed: the
MemfaultBortandMemfaultUsageReporterfolders have been merged into a singleMemfaultPackagesfolder. The two Android Studio projects have been merged into a single project with bothMemfaultBort.apkandMemfaultUsageReporter.apktargets. - To conform to Android conventions, the SDK is now expected to be installed at
<AOSP_ROOT>/vendor/memfault/bortinstead of<AOSP_ROOT>/packages/apps/bort. - The
bort_cli.pycommandpatch-dumpstate-runnerhas been removed. The command is no longer needed. Instead of patching the .cpp source code, a header file is now generated based on theMemfaultPackags/bort.propertiesfile.
- Controlling the Bort SDK, either enabling it or requesting a bug report, now
requires the
com.memfault.bort.permission.CONTROLpermission. This permission may not be used by regular apps. This permission may only be granted to applications signed with the same signing key asMemfaultBort(signature) or applications that are installed as privileged apps on the system image (privileged). See Android protectionLevel for further documentation. - Broadcasts to control the SDK (enabling/disabling, requesting a bug report)
have been consolidated into a single, new receiver
(
com.memfault.bort.receivers.ControlReceiver).
- Log events when the SDK is enabled and disabled.
- There is a new
bort.propertycalledBORT_CONTROL_PERMISSION, used to specify which permission should be used to control the SDK. By default, this is property is set tocom.memfault.bort.permission.CONTROL. - Improved
bort_cli.py'svalidate-sdk-integrationcommand to also check the ownership and sepolicy context of key SDK files.
- Adds
enable-bortandrequest-bug-reportcommands tobort_cli.py.
- Adds fixes for the
validate-sdk-integrationcommand inbort_cli.pywhen being run on Windows.
- Validate your SDK integration with the
validate-sdk-integrationcommand inbort_cli.py.
- The SDK will now work if UserManager.DISALLOW_DEBUGGING_FEATURES is enabled.
- Easily specify V1 and/or V2 APK signing configurations for the MemfaultBort
app using
bort.properties.
- The
bort_cli.pyscript now requires Python 3.6+
- The
versionCodeandversionNameare now set by default by the SDK. If you need to override them or increase theversionCodefor an OTA update, seebort.properties.
- Fixed
bort_cli.pyto patch the custom application ID into the permissions XML. This fixes an issue where the MemfaultBort application was not being granted the expected permissions.
- More debug info in requests to track and debug different SDK behaviour.
- Use the
EventLogAPI to log SDK events. - Update
MemfaultBortdependencies.
- This release adds an intent-based API to enable or disable the SDK at runtime.
- Additionally, there is new requirement that the SDK be explicitly enabled using this API at runtime. This can be disabled via a gradle property,
- There is now also an intent-based API to trigger a one-off bug report.
- Adds the ability to upload bug reports to a user-specified endpoint
- The
storeFileproperty in akeystore.propertiesfile is now expected to be relative to thekeystore.propertiesfile itself, no longer relative tobort/MemfaultBort/app. bort_cli.pytool improvements:- The tool no longer exits with a non-zero code if all patches have already been applied.
bort_cli.pytool improvements:- For the
patch-aospcommand, the--bort-app-idoption has been removed because it is no longer needed. - Check whether patch is applied, before attempting to apply patch.
- Fix log message to correctly reflect whether patches failed to apply.
- For the
- Added the ability to update the Bort app independent of the OS by changing it from a system app to a privileged app.
- Added a configuration option to disable the Bort app from creating and
uploading reports in builds where PII may be present (
userbuilds by default).
- Simplified SDK/OS integration by including
BoardConfig.mkandproduct.mk. - Simplified SDK setup with improvements to the python setup tool.
- New SE policy preserves system
neverallowrules.
- Adds a new system app
MemfaultUsageReporter. This provides an intent-based API for starting theMemfaultDumpstateRunner. While the API is available to all applications with the (privileged)DUMPpermission, the output of the API will always be only delivered directly to the Bort app. - The bort application no longer appears in the launcher by default. To include
it, add an intent filter with the launcher category to an activity in the
AndroidManifest.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>- This SDK update has several breaking changes.
- You must remove the previous required modifications to:
frameworks/baseand replace them with a separately includedcom.memfault.bort.xmlpermissions file.neverallowrules insystem/sepolicyand add a new file typebortbort_app_data_fileto avoid the need to change AOSP's builtin rules.
- Add
BoardConfig.mkandproduct.mkto simplify the integration of the SDK to only twoinclude ...lines. patches/apply-patches.pyis nowbort_cli.pywith subcommands.- The bort app now requires you to provide an application ID as well as a keystore. See the README for details.
- Configuration for the bort app has moved from
MemfaultBort/app/gradle.propertiestoMemfaultBort/bort.properties; you will need to set your Project Key in this new location.
- Added git patch files under
patches/, including a python scriptapply-patches.pyto automate applying the patches. - Added support for Android 9 (alongside Android 10).
- Initial release.