Skip to content

Latest commit

 

History

History
1318 lines (1004 loc) · 53.7 KB

CHANGELOG.md

File metadata and controls

1318 lines (1004 loc) · 53.7 KB

Memfault Bort Changelog

v4.17.0 - June 24, 2024

🚀 New Features

  • 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_ms and connectivity_connected_time_ms Device Vitals metrics. operational_crashes will 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.

📈 Improvements

  • The structuredlogd metrics 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. The structuredlogd service 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_SERIAL intent with an INTENT_EXTRA_SERIAL string 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.

v4.16.0 - May 28, 2024

🚀 New Features

  • Added a latestInReport option to the event API in Reporting. 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 (batterystats parsing 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.

📈 Improvements

  • Removed usages of launch when calling coroutines - avoiding any potential dangling work after a job/receiver has completed.

🏠 Internal

  • Added support for V1 metrics to the Bort custom metrics database (this is not used yet, outside of Bort Lite).

v4.15.3 - May 20, 2024

📈 Improvements

  • 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.

v4.15.2 - April 19, 2024

📈 Improvements

  • Improve rounding numbers when parsing battery stats.

v4.15.1 - April 16, 2024

📈 Improvements

  • Fix an exception when parsing batterystats files with lines that have trailing commas.

v4.15.0 - April 12, 2024

🚀 New Features

  • Bort rate-limiting events are uploaded, to be displayed in the Processing Log.
  • Added a bort-cli command (generate-keystore) to generate Bort keystores. See documentation.

📈 Improvements

  • Updated reporting-lib-java to match latest kotlin reporting-lib APIs (added sync, successOrFailure).
  • Catch SecurityException gathering 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 all network usage metric, even if there was no usage during the heartbeat.
  • Added Bluetooth as a possible network usage metric type.

🏠 Internal

  • 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.

v4.14.0 - March 1, 2024

🚀 New Features

  • Added a windows batch script to install Bort Lite.

📈 Improvements

  • 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).

🏠 Internal

  • Updated to Gradle 8.3, and Kotlin 1.9.21.

v4.13.0 - February 7, 2024

💥 Breaking Changes

  • 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_SYSPROP property in bort.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.

🚀 New Features

  • 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 adb access. This will be released separately, as a pre-built binary.
  • batterystats and PackageManager access is moved from UsageReporter to the Bort app. Periodic log collection is also moved to the Bort app on Android versions <= 12, and sysprop collection is done inside Bort if MemfaultDumpster is not available. This enables the forthcoming Bort Lite feature. The READ_LOGS and INTERACT_ACROSS_USERS permissions are removed from UsageReporter (they were added to Bort in 4.10.0).
  • Connectivity metrics can now be collected by the Bort app, if UsageReporter is not installed. This is only used for Bort Lite (otherwise, UsageReporter is still used because it is persistent).

📈 Improvements

  • Disabled setting the project key via broadcast if PROJECT_KEY_SYSPROP is configured. See documentation.
  • Use successOrFailure to generate the sync_memfault_successful/sync_memfault_failure Core 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 .sum suffix.
  • Fixed an issue where if Dev Mode is toggled (enabled+disabled) on the device, then mar files will fail to upload until the device is rebooted.
  • Migrated all Package Manager queries to use the java PackageManager API instead of dumpsys pm - this is much faster, and removed the possibility for dumpsys lock contention. Also added a caching layer to avoid doing a full query each time this data is needed.

🏠 Internal

  • 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 MemfaultStructuredLogD database.
  • The reporting-lib Custom Metrics library will attempt to add metrics to the Bort Custom Metrics database using a ContentProvider if MemfaultStructuredLogD is 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 debug variant of the app.
  • Removed all uses of runBlocking in unit tests.
  • Removed unnecessary IndividualTaskWorkerFactory interface.
  • Added an internal bort_lite metric to flag when Bort Lite is being used vs the full Bort SDK.
  • Improved dagger usage in SystemEventReceiver to inject more classes vs creating them locally.

v4.12.0 - December 28, 2023

🚀 New Features

  • Added a OTA validation to the bort_cli.py
  • Added a new disk wear metric.

📈 Improvements

  • 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.

v4.11.0 - December 5, 2023

🚀 New Features

  • Added connectivity_connected_time_ms and connectivity_expected_time_ms connectivity metrics. See documentation.
  • Added support for Reporting.report().successOrFailure() and Reporting.report().sync() - see documentation. Update to the latest version of reporting-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.

📈 Improvements

  • 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.

🏠 Internal

  • Added internal metrics for Bort network usage.

v4.10.0 - November 15, 2023

💥 Breaking Changes

  • 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.

🚀 New Features

  • 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.

📈 Improvements

  • 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 Event type 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.
  • 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.

🏠 Internal

  • 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.

v4.9.0 - September 5, 2023

🚀 New Features

  • 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.

📈 Improvements

  • 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.

v4.8.1 - July 26, 2023

📈 Improvements

  • OTA app will now try to stay running (using a JobScheduler job, and optionally a foreground service) while downloading A/B updates. Set useForegroundServiceForAbDownloads = true in AutoInstallRules.kt to use a foreground service.
  • OTA app will now recover if killed while UpdateEngine is downloading an A/B update (using a periodic job which runs every 15 minutes).
  • Made libmflt-structuredlog a Soong module.

v4.8.0 - July 17, 2023

🚀 New Features

  • 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-metadata option, 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.

📈 Improvements

  • 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.

🏠 Internal

  • 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.

v4.7.0 - May 9, 2023

📈 Improvements

  • Disable the UsageReporter -Receiver classes when Bort is disabled.
  • Add missing deprecation annotations to CustomEvent API.

🏠 Internal

  • Report a Bort installation id to track new app install vs existing app where data was cleared.

v4.6.0 - April 26th, 2023

🚀 New Features

  • Removed (previously deprecated) individual file upload support: MAR is the only supported upload mechanism.

📈 Improvements

  • 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.

🏠 Internal

  • Added an internal metric for the Bort package name.
  • Track any task worker failures.

v4.5.1 - April 5th, 2023

📈 Improvements

  • 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.

🏠 Internal

  • Added internal metrics for storage usage/file cleanup.

v4.5.0 - March 27th, 2023

🚀 New Features

  • 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.

📈 Improvements

  • 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.

🏠 Internal

  • Fixed incorrect HRT typing on internal metrics.
  • Added metric for tracking deleted MAR files.

v4.4.0 - January 11th, 2023

🚀 New Features

  • High-Res Telemetry. Custom Metrics are now shown on timeline in high resolution, in addition to aggregated values. See documentation.
    • Adds new event metric type. This will replace Custom Events.
    • Makes aggregations optional for various metric types.
    • Changes signature of aggregations parameter from vararg to <List>.
  • New built-in connectivity metrics: connectivity.type, airplane_mode, connectivity.validated, connectivity.captive_portal. See documentation.
  • Support Fleet Sampling when using client/server mode.

📈 Improvements

  • Fixed the bort_cli.py python version check (was using a bad string-basd check).
  • Continuous Logging mode now works on Android 13.
  • Filter DropBoxManager intents in UsageReporter - don't wake Bort for unused tags.
  • Fix Custom Metric MIN/MAX aggregations. 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-all for 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 mar file upload jitter to match batching period.

🏠 Internal

  • Migrates Bort internal metrics to use High-Res Telemetry.

v4.3.2 - November 22nd, 2022

📈 Improvements

  • Fixed an issue where bugreports may fail to be processed by Bort if the Bort OTA app is installed on the device.

v4.3.1 - November 7th, 2022

📈 Improvements

  • Fixed an issue which could cause batterystats collection to fail after some time-change events.
  • Fixed an issue in WTF on-device rate-limiting.

v4.3.0 - October 18th, 2022

🚀 New Features

  • Continuous Logging Mode is in preview. When enabled, logs will be continuously collected by the MemfaultDumpster service. 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.

📈 Improvements

  • Built-in metrics for Storage have been changed. Bort does not collect storage.primary. metrics any more - instead collecting storage.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.

🏠 Internal

  • Improved how settings are overridden during CI tests.

v4.2.0 - September 14th, 2022

🚀 New Features

  • 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_INSTALL property to true in bort.properties. In the future, it will be possible to override this in the dashboard. Also adds a custom_canAutoInstallOtaUpdateNow callback (in autoInstallRules.kt) to customize this logic. See documentation.
  • Custom log scrubbing rules can be defined in CustomLogScrubber.kt. See documentation.

📈 Improvements

  • OTA will now automatically reboot after applying an A/B update.
  • Adds configurable limits to mar file size. Multiple bundled mar files may now be created if over the limit.
  • Adds configurable limits for total mar file 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 mar bundling 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.

🏠 Internal

  • Added internal metrics around mar storage/usage.
  • Changed the default API endpoint from api.memfault.com to device.memfault.com (to match remote settings configuration).
  • Added the device software version to the device-config server call.
  • Bort can optionally fetch device configuration from new /device-config endpoint.

v4.1.0 - April 18, 2022

📈 Improvements

  • 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 MemfaultStructuredLogD which could cause an error during startup or shutdown when storage is not available.

v4.0.0 - February 09, 2021

4.0.0 includes all changes listed for 4.0.0-RC1 below.

See documentation for new Built-In Metrics and Custom Metrics APIs.

📈 Improvements

  • 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.

v4.0.0-RC1 - December 15, 2021

This preview release contains several features which do not yet have full documentation.

🚀 New Features

  • Custom Metrics SDK. See the Reporting APIs in reporting-lib, which is also published as an artifact to Maven Central as com.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.

📈 Improvements

  • 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 compileSdkVersion of 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.

💥 Breaking Changes

  • BUILD_ID_CODE in bort.properties is replaced by BUILD_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-lib library has been removed. The CustomEvent API is now located in the reporting-lib library, which is also now published as an artifact to Maven Central as com.memfault.bort:reporting-lib:1.0.

🏠 Internal

  • 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.

v3.7.3 - October 26, 2021

📈 Improvements

  • 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).

🏠 Internal

  • Added ability for bort to log to disk, to aid debugging. This is disabled by default.

v3.7.2 - October 18, 2021

📈 Improvements

  • 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.

v3.7.1 - September 30, 2021

📈 Improvements

  • Fix a rate-limiting issue which sometimes caused regular data collection to be missed.
  • Added internal logging for the upstream Bort version code.

v3.7.0 - September 15, 2021

🚀 New Features

  • OTA Update Client: Bort now includes a full OTA Update client. See documentation for more information.

📈 Improvements

  • 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.

v3.6.2 - August 17, 2021

📈 Improvements

  • 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.

v3.6.1 - July 21, 2021

📈 Improvements

  • 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.

v3.6.0 - July 9, 2021

💥 Breaking Changes

  • Structured Logging (introduced in 3.5.0) has been renamed to Custom Events. Any code using the StructuredLog API from the structured-log-lib library (now removed) must be changed to call the equivalent methods in the CustomEvent API from the custom-event-lib library.

📈 Improvements

  • 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.

🏠 Internal

  • 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.

v3.5.0 - June 2, 2021

🚀 New Features

  • 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.

📈 Improvements

  • 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/base have been added to the SDK. The command bort_cli.py patch-aosp --android-release $RELEASE will 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.

v3.4.3 - April 27, 2021

📈 Improvements

  • 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.

🏠 Internal

  • Structured logging: this is an experimental new feature still in development.

v3.4.2 - March 17, 2021

📈 Improvements

  • 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.

v3.4.1 - March 11, 2021

📈 Improvements

  • Added a dontaudit sepolicy line to avoid failing a CTS test. See memfault_dumpster.te for more information.

v3.4.0 - March 8, 2021

🚀 New Features

  • 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.

📈 Improvements

  • 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.

v3.3.1 - February 19, 2021

📈 Improvements

  • Improved the gradle build scripting to prevent accidentally replacing the MemfaultPackages/settings/settings.json with 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.

v3.3.0 - February 17, 2021

🚀 New Features

  • 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.properties must 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 called MemfaultPackages/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.

📈 Improvements

  • File uploads are now gzip-compressed prior to uploading to save bandwidth.
  • A built-in metric MemfaultSdkMetric_bort_version_code has been added that contains Bort's version code.

🏠 Internal

  • 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.

v3.2.0 - February 4, 2021

📈 Improvements

  • New built-in metrics have been added that count the number of traces by tag. The naming format is drop_box_trace_%s_count where %s is filled with the tag, i.e. system_tombstone.
  • A new built-in metric called drop_box_traces_drop_count has been added that counts the number of dropped traces due to rate-limiting.

🏠 Internal

  • 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.

v3.1.0 - January 29, 2021

📈 Improvements

  • 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, the dumpstate.memfault.requestid system 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.

🏠 Internal

  • 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.

v3.0.1 - January 4, 2021

🏠 Internal

  • Fixed a bug that caused BUG_REPORT_MINIMAL_MODE=true to 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.

v3.0.0 - December 17, 2020

📈 Improvements

  • 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.

v2.9.1 - December 3, 2020

📈 Improvements

  • The bort_src_gen.py tool used to require Python 3.6 to run, but it is now compatible down to Python 3.4.

v2.9.0 - November 26, 2020

🏠 Internal

  • 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.

v2.8.0 - November 13, 2020

🏠 Internal

  • 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.

v2.7.1 - November 5, 2020

📈 Improvements

  • The bort_cli.py tool now only writes to a validation log file when running the validation command.

🏠 Internal

  • Add a backtrace when sending an error response in IPC between the UsageReporter and Bort apps.

v2.7.0 - October 28, 2020

📈 Improvements

  • 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_KEY
    • ANDROID_DEVICE_SERIAL_KEY
    • ANDROID_BUILD_VERSION_SOURCE
    • ANDROID_BUILD_VERSION_KEY

v2.6.0 - October 27, 2020

📈 Improvements

  • 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_MODE in bort.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_KEY
    • ANDROID_DEVICE_SERIAL_KEY
    • ANDROID_BUILD_VERSION_SOURCE
    • ANDROID_BUILD_VERSION_KEY
  • The bort_cli.py validation 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.

🏠 Internal

  • ktlint was applied to the codebase, resulting in reformatting of many files.
  • Logcat log fetching has been added to the experimental DATA_SOURCE_DROP_BOX_ENABLED feature

v2.5.0 - October 20, 2020

📈 Improvements

  • Remove reliance on BOARD_PLAT_PRIVATE_SEPOLICY_DIR for 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_DIR is now used only on Android 9 and newer. For older Android versions, Bort's private sepolicy changes are patched directly into system/sepolicy. See BoardConfig.mk and patches/android-8/system/sepolicy/git.diff.

v2.4.1 - October 9, 2020

📈 Improvements

  • Additional HTTP logging

v2.4.0 - September 29, 2020

📈 Improvements

  • Before this release, the Bort application ID and feature name had to be patched in various files, using the bort_cli.py tool. With this release, BORT_APPLICATION_ID and BORT_FEATURE_NAME properties have been added to the bort.properties file. Files that had to be patched previously, are now generated at build-time, using the BORT_APPLICATION_ID and BORT_FEATURE_NAME from the bort.properties file.
  • The bort_cli.py command patch-bort has been changed to only patch the bort.properties' BORT_APPLICATION_ID and BORT_FEATURE_NAME properties if they have not already been set.

🏠 Internal

  • 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.

💥 Breaking Changes

  • The folder structure of the SDK has been changed: the MemfaultBort and MemfaultUsageReporter folders have been merged into a single MemfaultPackages folder. The two Android Studio projects have been merged into a single project with both MemfaultBort.apk and MemfaultUsageReporter.apk targets.
  • To conform to Android conventions, the SDK is now expected to be installed at <AOSP_ROOT>/vendor/memfault/bort instead of <AOSP_ROOT>/packages/apps/bort.
  • The bort_cli.py command patch-dumpstate-runner has been removed. The command is no longer needed. Instead of patching the .cpp source code, a header file is now generated based on the MemfaultPackags/bort.properties file.

v2.3.0 - August 20, 2020

💥 Breaking Changes

  • Controlling the Bort SDK, either enabling it or requesting a bug report, now requires the com.memfault.bort.permission.CONTROL permission. This permission may not be used by regular apps. This permission may only be granted to applications signed with the same signing key as MemfaultBort (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).

🏠 Internal

  • Log events when the SDK is enabled and disabled.

📈 Improvements

  • There is a new bort.property called BORT_CONTROL_PERMISSION, used to specify which permission should be used to control the SDK. By default, this is property is set to com.memfault.bort.permission.CONTROL.
  • Improved bort_cli.py's validate-sdk-integration command to also check the ownership and sepolicy context of key SDK files.

v2.2.4 - July 14, 2020

🚀 New Features

  • Adds enable-bort and request-bug-report commands to bort_cli.py.

📈 Improvements

  • Adds fixes for the validate-sdk-integration command in bort_cli.py when being run on Windows.

v2.2.3 - July 8, 2020

🚀 New Features

  • Validate your SDK integration with the validate-sdk-integration command in bort_cli.py.

📈 Improvements

v2.2.2 - June 29, 2020

📈 Improvements

  • Easily specify V1 and/or V2 APK signing configurations for the MemfaultBort app using bort.properties.

🏠 Internal

  • The bort_cli.py script now requires Python 3.6+

v2.2.1 - June 24, 2020

💥 Breaking Changes

  • The versionCode and versionName are now set by default by the SDK. If you need to override them or increase the versionCode for an OTA update, see bort.properties.

📈 Improvements

  • Fixed bort_cli.py to patch the custom application ID into the permissions XML. This fixes an issue where the MemfaultBort application was not being granted the expected permissions.

🏠 Internal

  • More debug info in requests to track and debug different SDK behaviour.
  • Use the EventLog API to log SDK events.
  • Update MemfaultBort dependencies.

v2.2.0 - June 15, 2020

🚀 New Features

  • 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.

v2.1.0 - June 2, 2020

🚀 New Features

  • Adds the ability to upload bug reports to a user-specified endpoint

📈 Improvements

  • The storeFile property in a keystore.properties file is now expected to be relative to the keystore.properties file itself, no longer relative to bort/MemfaultBort/app.
  • bort_cli.py tool improvements:
    • The tool no longer exits with a non-zero code if all patches have already been applied.

v2.0.1 - May 18, 2020

📈 Improvements

  • bort_cli.py tool improvements:
    • For the patch-aosp command, the --bort-app-id option 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.

v2.0.0 - May 14, 2020

🚀 New Features

  • 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 (user builds by default).

📈 Improvements

  • Simplified SDK/OS integration by including BoardConfig.mk and product.mk.
  • Simplified SDK setup with improvements to the python setup tool.
  • New SE policy preserves system neverallow rules.

🏠 Internal

  • Adds a new system app MemfaultUsageReporter. This provides an intent-based API for starting the MemfaultDumpstateRunner. While the API is available to all applications with the (privileged) DUMP permission, 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>

💥 Breaking Changes

  • This SDK update has several breaking changes.
  • You must remove the previous required modifications to:
    • frameworks/base and replace them with a separately included com.memfault.bort.xml permissions file.
    • neverallow rules in system/sepolicy and add a new file type bortbort_app_data_file to avoid the need to change AOSP's builtin rules.
  • Add BoardConfig.mk and product.mk to simplify the integration of the SDK to only two include ... lines.
  • patches/apply-patches.py is now bort_cli.py with 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.properties to MemfaultBort/bort.properties; you will need to set your Project Key in this new location.

v1.1.0 - May 2, 2020

  • Added git patch files under patches/, including a python script apply-patches.py to automate applying the patches.
  • Added support for Android 9 (alongside Android 10).

v1.0.0 - April 29, 2020

  • Initial release.