From 94e172e361d61c1d786888bdcd936d18e952a825 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 19 Aug 2026 14:28:43 -0700 Subject: [PATCH 1/6] first pass --- .../restrict-android-engine-intent-flags.md | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 sites/docs/src/content/release/breaking-changes/restrict-android-engine-intent-flags.md diff --git a/sites/docs/src/content/release/breaking-changes/restrict-android-engine-intent-flags.md b/sites/docs/src/content/release/breaking-changes/restrict-android-engine-intent-flags.md new file mode 100644 index 0000000000..8417f10265 --- /dev/null +++ b/sites/docs/src/content/release/breaking-changes/restrict-android-engine-intent-flags.md @@ -0,0 +1,168 @@ +--- +title: Restrict Android engine flags through Intent extras in release mode +description: >- + Flutter Android apps no longer accept engine configuration flags from Intent + extras in release builds. +--- + +{% render "docs/breaking-changes.md" %} + +## Summary + +To protect against `Intent`-based spoofing vulnerabilities in production, +the Flutter Android embedding no longer parses Flutter engine configuration +flags from `Intent` extras in release builds. + +In debug and profile builds, +the embedding continues to accept engine flags from `Intent` extras to preserve +developer velocity and testing workflows. + +For Gradle-based projects, +the Flutter CLI automatically writes command-line configuration flags into +`AndroidManifest.xml` during compilation for release builds. +However, passing configuration flags when running a prebuilt release binary +(`--use-application-binary`) on Android now results in a fatal CLI error +because prebuilt release binaries ignore `Intent` extras. + +## Context + +The Flutter Android embedding previously allowed the Flutter CLI and developers +to supply engine configuration flags through [`Intent`][] extras at runtime. +On Android, `Intent` extras passed to exported activities (such as `MainActivity`) +can be intercepted, spoofed, or manipulated by malicious third-party apps +running on the same device. + +The Android operating system lowers security sandboxing for debuggable builds +to enable debugging tools and administrative access through `adb`. +However, release builds run in untrusted end-user environments where +security enforcement is critical. + +Moving the trust boundary for release builds to a cryptographically sealed +`AndroidManifest.xml` protects production applications from `Intent` +manipulation. +Restricting `Intent` flag parsing only in release mode ensures that +debug and profile modes maintain full developer velocity and compatibility +with testing tools. + +[`Intent`]: https://developer.android.com/reference/android/content/Intent + +## Description of change + +In release builds, the Flutter Android embedding strictly ignores engine +configuration flags passed through `Intent` extras. + +### Flutter Android embedding behavior + +* **Debug and profile builds:** The embedding continues to parse and apply + engine configuration flags passed through `Intent` extras. +* **Release builds:** The embedding ignores all engine configuration flags + passed through `Intent` extras. + +### Flutter CLI behavior + +The Flutter CLI adjusts its launch and build strategy depending on the build +mode and whether you target a prebuilt binary: + +| Build mode | Using `--use-application-binary` | Flutter Android embedding | Flutter CLI behavior | +| :--- | :--- | :--- | :--- | +| **Debug / Profile** | Yes | Reads `Intent` extras | Launches binary through `adb` with `Intent` extras without rebuilding. | +| **Debug / Profile** | No | Reads `Intent` extras | Builds app and launches through `adb` with `Intent` extras. | +| **Release** | Yes | Ignores `Intent` extras | Fails with a fatal error if any configuration flags are provided. | +| **Release** | No | Ignores `Intent` extras | Injects configuration flags into `AndroidManifest.xml` during compilation. | + +Because prebuilt release binaries cannot have their manifests updated +dynamically at runtime, any configuration flags passed to a prebuilt release +APK silently fail to take effect. +The Flutter CLI now produces a fatal error to prevent silent configuration +failures. + +## Migration guide + +:::note +You are **not affected** and do not need to make changes if: +- You build and run standard Gradle apps through the Flutter CLI without + custom `Intent` extras. +- You only run tests and benchmarks in **debug** or **profile** mode. +- You do not pass dynamic engine flags to prebuilt release binaries. +::: + +If your workflow relies on passing engine flags to release builds, +review the following migration strategies: + +### CI/CD and automated tests with prebuilt binaries + +If your automated test pipelines use `--use-application-binary` with `--release` +and pass dynamic configuration flags: + +1. Switch your test and benchmark targets to **profile mode** (`--profile`). + Profile mode retains near-release performance characteristics while + allowing dynamic runtime configuration through `Intent` extras. +1. If your tests must run against a release binary, + compile separate release binaries with the required configuration + statically declared in `AndroidManifest.xml`. + +### Non-Gradle and hermetic build systems + +If you build Flutter Android applications using hermetic build systems +(such as Blaze or Bazel) that do not use Gradle: + +1. Statically declare any necessary engine configuration flags in + `AndroidManifest.xml` before compiling the release APK. +1. For dynamic testing and benchmarking, build targets in **profile mode** + instead of release mode. + +### Declare engine flags in `AndroidManifest.xml` + +To configure engine flags statically for release builds, +add `` elements under the `` or `` tags in +your `android/app/src/main/AndroidManifest.xml` file: + +```xml title="AndroidManifest.xml" highlightLines=6-13 + + + + + + + + + +``` + +## Timeline + +Landed in version: TBD
+In stable release: TBD + +## References + +Design document: + +* [go/flutter-android-secure-intents](http://goto.google.com/flutter-android-secure-intents) + +Relevant issues: + +* [Issue 180686][] + +Relevant pull requests: + +* [PR 190870][] +* [PR 182522][] + +[Issue 180686]: https://github.com/flutter/flutter/issues/180686 +[PR 190870]: https://github.com/flutter/flutter/pull/190870 +[PR 182522]: https://github.com/flutter/flutter/pull/182522 From f19720a4ad46a566739b5ee1472304f0299e9dc9 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 26 Aug 2026 16:50:21 -0700 Subject: [PATCH 2/6] rename --- .../restrict-android-engine-intent-flags.md | 168 ------------------ ...flags-prebuilt-android-release-binaries.md | 161 +++++++++++++++++ 2 files changed, 161 insertions(+), 168 deletions(-) delete mode 100644 sites/docs/src/content/release/breaking-changes/restrict-android-engine-intent-flags.md create mode 100644 sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md diff --git a/sites/docs/src/content/release/breaking-changes/restrict-android-engine-intent-flags.md b/sites/docs/src/content/release/breaking-changes/restrict-android-engine-intent-flags.md deleted file mode 100644 index 8417f10265..0000000000 --- a/sites/docs/src/content/release/breaking-changes/restrict-android-engine-intent-flags.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: Restrict Android engine flags through Intent extras in release mode -description: >- - Flutter Android apps no longer accept engine configuration flags from Intent - extras in release builds. ---- - -{% render "docs/breaking-changes.md" %} - -## Summary - -To protect against `Intent`-based spoofing vulnerabilities in production, -the Flutter Android embedding no longer parses Flutter engine configuration -flags from `Intent` extras in release builds. - -In debug and profile builds, -the embedding continues to accept engine flags from `Intent` extras to preserve -developer velocity and testing workflows. - -For Gradle-based projects, -the Flutter CLI automatically writes command-line configuration flags into -`AndroidManifest.xml` during compilation for release builds. -However, passing configuration flags when running a prebuilt release binary -(`--use-application-binary`) on Android now results in a fatal CLI error -because prebuilt release binaries ignore `Intent` extras. - -## Context - -The Flutter Android embedding previously allowed the Flutter CLI and developers -to supply engine configuration flags through [`Intent`][] extras at runtime. -On Android, `Intent` extras passed to exported activities (such as `MainActivity`) -can be intercepted, spoofed, or manipulated by malicious third-party apps -running on the same device. - -The Android operating system lowers security sandboxing for debuggable builds -to enable debugging tools and administrative access through `adb`. -However, release builds run in untrusted end-user environments where -security enforcement is critical. - -Moving the trust boundary for release builds to a cryptographically sealed -`AndroidManifest.xml` protects production applications from `Intent` -manipulation. -Restricting `Intent` flag parsing only in release mode ensures that -debug and profile modes maintain full developer velocity and compatibility -with testing tools. - -[`Intent`]: https://developer.android.com/reference/android/content/Intent - -## Description of change - -In release builds, the Flutter Android embedding strictly ignores engine -configuration flags passed through `Intent` extras. - -### Flutter Android embedding behavior - -* **Debug and profile builds:** The embedding continues to parse and apply - engine configuration flags passed through `Intent` extras. -* **Release builds:** The embedding ignores all engine configuration flags - passed through `Intent` extras. - -### Flutter CLI behavior - -The Flutter CLI adjusts its launch and build strategy depending on the build -mode and whether you target a prebuilt binary: - -| Build mode | Using `--use-application-binary` | Flutter Android embedding | Flutter CLI behavior | -| :--- | :--- | :--- | :--- | -| **Debug / Profile** | Yes | Reads `Intent` extras | Launches binary through `adb` with `Intent` extras without rebuilding. | -| **Debug / Profile** | No | Reads `Intent` extras | Builds app and launches through `adb` with `Intent` extras. | -| **Release** | Yes | Ignores `Intent` extras | Fails with a fatal error if any configuration flags are provided. | -| **Release** | No | Ignores `Intent` extras | Injects configuration flags into `AndroidManifest.xml` during compilation. | - -Because prebuilt release binaries cannot have their manifests updated -dynamically at runtime, any configuration flags passed to a prebuilt release -APK silently fail to take effect. -The Flutter CLI now produces a fatal error to prevent silent configuration -failures. - -## Migration guide - -:::note -You are **not affected** and do not need to make changes if: -- You build and run standard Gradle apps through the Flutter CLI without - custom `Intent` extras. -- You only run tests and benchmarks in **debug** or **profile** mode. -- You do not pass dynamic engine flags to prebuilt release binaries. -::: - -If your workflow relies on passing engine flags to release builds, -review the following migration strategies: - -### CI/CD and automated tests with prebuilt binaries - -If your automated test pipelines use `--use-application-binary` with `--release` -and pass dynamic configuration flags: - -1. Switch your test and benchmark targets to **profile mode** (`--profile`). - Profile mode retains near-release performance characteristics while - allowing dynamic runtime configuration through `Intent` extras. -1. If your tests must run against a release binary, - compile separate release binaries with the required configuration - statically declared in `AndroidManifest.xml`. - -### Non-Gradle and hermetic build systems - -If you build Flutter Android applications using hermetic build systems -(such as Blaze or Bazel) that do not use Gradle: - -1. Statically declare any necessary engine configuration flags in - `AndroidManifest.xml` before compiling the release APK. -1. For dynamic testing and benchmarking, build targets in **profile mode** - instead of release mode. - -### Declare engine flags in `AndroidManifest.xml` - -To configure engine flags statically for release builds, -add `` elements under the `` or `` tags in -your `android/app/src/main/AndroidManifest.xml` file: - -```xml title="AndroidManifest.xml" highlightLines=6-13 - - - - - - - - - -``` - -## Timeline - -Landed in version: TBD
-In stable release: TBD - -## References - -Design document: - -* [go/flutter-android-secure-intents](http://goto.google.com/flutter-android-secure-intents) - -Relevant issues: - -* [Issue 180686][] - -Relevant pull requests: - -* [PR 190870][] -* [PR 182522][] - -[Issue 180686]: https://github.com/flutter/flutter/issues/180686 -[PR 190870]: https://github.com/flutter/flutter/pull/190870 -[PR 182522]: https://github.com/flutter/flutter/pull/182522 diff --git a/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md b/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md new file mode 100644 index 0000000000..f5c4fa4529 --- /dev/null +++ b/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md @@ -0,0 +1,161 @@ +--- +title: Restrict command-line flags on prebuilt Android release binaries +description: >- + Passing configuration flags to prebuilt Android release binaries with + `--use-application-binary` is no longer supported. +--- + +{% render "docs/breaking-changes.md" %} + +## Summary + +Previously, the Flutter CLI could pass engine configuration flags +(such as `--dart-flags`) to a prebuilt Android release binary +(`--use-application-binary --release`) at launch time using Android +`Intent` extras, which the embedding accepted in all build modes. + +To protect production applications against `Intent`-based spoofing +vulnerabilities, Flutter Android release builds now ignore `Intent` extras +and read engine configuration strictly from the compiled `AndroidManifest.xml`. +Because prebuilt binaries cannot have their manifests dynamically modified +after compilation, the Flutter CLI now produces a fatal error if you pass +configuration flags to a prebuilt release binary (preventing flags from being +silently ignored). + +Standard release builds (where the CLI compiles the app and injects flags into +the manifest) and all debug and profile workflows continue to work +without changes. + +## Context + +The Flutter CLI allows passing flags (such as `--dart-flags` or tracing options) +to configure the Flutter engine when running or driving an application. +Historically, the Flutter Android embedding accepted these flags at runtime +through [`Intent`][] extras. + +However, runtime `Intent` extras on Android can be spoofed or intercepted +by other applications on a user's device. +To harden production applications, Flutter Android release builds now read +configuration strictly from a cryptographically signed `AndroidManifest.xml` +and ignore runtime `Intent` flags. + +For standard release builds, the Flutter CLI automatically injects +command-line flags into `AndroidManifest.xml` during compilation. +When you use a prebuilt release binary with `--use-application-binary`, +the CLI cannot modify the compiled manifest, and the binary ignores +runtime `Intent` flags. +To prevent tests or scripts from running with unnoticed configuration failures, +the CLI now reports a fatal error. + +Debug and profile builds intentionally maintain runtime flag support +to preserve testing velocity and dynamic benchmarking workflows. + +[`Intent`]: https://developer.android.com/reference/android/content/Intent + +## Description of change + +The Flutter CLI enforces the following behavior when running Flutter apps +on Android: + +| Build mode | Using `--use-application-binary` | CLI behavior | Notes | +| :--- | :--- | :--- | :--- | +| **Debug / Profile** | Yes | Passes flags to binary through `adb` | No rebuild required; flags apply at runtime. | +| **Debug / Profile** | No | Builds and passes flags through `adb` | Standard development workflow. | +| **Release** | Yes | **Fatal error** if configuration flags are provided | Prebuilt release binaries cannot be dynamically configured. | +| **Release** | No | Injects flags into `AndroidManifest.xml` during compilation | Standard release build workflow. | + +## Migration guide + +:::note +You are **not affected** and do not need to take action if: +- You build and run standard release apps (`flutter run --release`, + `flutter build apk --release`, `flutter build appbundle`). +- You run tests and benchmarks in **debug** or **profile** mode. +- You use `--use-application-binary` without passing custom engine flags. +::: + +If your CI/CD pipelines, automated scripts, or build systems pass flags to +prebuilt release binaries, use one of the following migration paths: + +### Switch testing and benchmarking to profile mode + +If your automated test pipelines use `--use-application-binary` with `--release` +to dynamically test different engine configurations: + +1. Switch your test target to **profile mode** (`--profile`). + Profile mode mirrors release performance characteristics while retaining + support for dynamic runtime flag configuration without recompilation. + +### Build release binaries with flags directly + +If you must run tests against a release binary: + +1. Run `flutter build` or `flutter run` with your configuration flags + without `--use-application-binary`. + The CLI automatically embeds the flags into the compiled manifest. +1. Alternatively, compile separate release binaries for each required + test configuration. + +### Configure non-Gradle or hermetic build systems + +If you build Flutter Android applications using hermetic build systems +(such as Blaze or Bazel) that separate compilation from execution: + +1. Statically declare any necessary engine flags in + `AndroidManifest.xml` before compiling the release APK. +1. Use **profile mode** for test targets that require dynamic configuration + at launch time. + +### Declare engine flags in `AndroidManifest.xml` + +To configure engine flags statically in release builds, +add `` elements under the `` tag in +your `android/app/src/main/AndroidManifest.xml` file: + +```xml title="AndroidManifest.xml" highlightLines=6-13 + + + + + + + + + +``` + +## Timeline + +Landed in version: TBD
+In stable release: TBD + +## References + +Design document: + +* [go/flutter-android-secure-intents](http://goto.google.com/flutter-android-secure-intents) + +Relevant issues: + +* [Issue 180686][] + +Relevant pull requests: + +* [PR 190870][] + +[Issue 180686]: https://github.com/flutter/flutter/issues/180686 +[PR 190870]: https://github.com/flutter/flutter/pull/190870 From 86557122c480ef545f3e6e4ca7389173c759f758 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 26 Aug 2026 16:58:07 -0700 Subject: [PATCH 3/6] self review --- ...ne-flags-prebuilt-android-release-binaries.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md b/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md index f5c4fa4529..06568377f9 100644 --- a/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md +++ b/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md @@ -19,7 +19,7 @@ vulnerabilities, Flutter Android release builds now ignore `Intent` extras and read engine configuration strictly from the compiled `AndroidManifest.xml`. Because prebuilt binaries cannot have their manifests dynamically modified after compilation, the Flutter CLI now produces a fatal error if you pass -configuration flags to a prebuilt release binary (preventing flags from being +engine configuration flags to a prebuilt release binary (preventing flags from being silently ignored). Standard release builds (where the CLI compiles the app and injects flags into @@ -39,7 +39,7 @@ To harden production applications, Flutter Android release builds now read configuration strictly from a cryptographically signed `AndroidManifest.xml` and ignore runtime `Intent` flags. -For standard release builds, the Flutter CLI automatically injects +For release builds of standard Gradle-based projects, the Flutter CLI automatically injects command-line flags into `AndroidManifest.xml` during compilation. When you use a prebuilt release binary with `--use-application-binary`, the CLI cannot modify the compiled manifest, and the binary ignores @@ -71,7 +71,7 @@ You are **not affected** and do not need to take action if: - You build and run standard release apps (`flutter run --release`, `flutter build apk --release`, `flutter build appbundle`). - You run tests and benchmarks in **debug** or **profile** mode. -- You use `--use-application-binary` without passing custom engine flags. +- You use `--use-application-binary` without passing engine configuration flags. ::: If your CI/CD pipelines, automated scripts, or build systems pass flags to @@ -99,7 +99,7 @@ If you must run tests against a release binary: ### Configure non-Gradle or hermetic build systems If you build Flutter Android applications using hermetic build systems -(such as Blaze or Bazel) that separate compilation from execution: +(such as Bazel) that separate compilation from execution: 1. Statically declare any necessary engine flags in `AndroidManifest.xml` before compiling the release APK. @@ -126,13 +126,7 @@ your `android/app/src/main/AndroidManifest.xml` file: android:name="io.flutter.embedding.android.EnableDartProfiling" android:value="false" /> + ...
From 049854773f55bd24e9b6075e1c408f5cc1a20c4a Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 26 Aug 2026 17:00:44 -0700 Subject: [PATCH 4/6] semantic line breaks --- ...flags-prebuilt-android-release-binaries.md | 89 +++++++++++-------- 1 file changed, 50 insertions(+), 39 deletions(-) diff --git a/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md b/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md index 06568377f9..b0a0341865 100644 --- a/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md +++ b/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md @@ -11,40 +11,48 @@ description: >- Previously, the Flutter CLI could pass engine configuration flags (such as `--dart-flags`) to a prebuilt Android release binary -(`--use-application-binary --release`) at launch time using Android -`Intent` extras, which the embedding accepted in all build modes. - -To protect production applications against `Intent`-based spoofing -vulnerabilities, Flutter Android release builds now ignore `Intent` extras -and read engine configuration strictly from the compiled `AndroidManifest.xml`. -Because prebuilt binaries cannot have their manifests dynamically modified -after compilation, the Flutter CLI now produces a fatal error if you pass -engine configuration flags to a prebuilt release binary (preventing flags from being -silently ignored). - -Standard release builds (where the CLI compiles the app and injects flags into -the manifest) and all debug and profile workflows continue to work -without changes. +(`--use-application-binary --release`) at launch time +using Android `Intent` extras, +which the embedding accepted in all build modes. + +To protect production applications +against `Intent`-based spoofing vulnerabilities, +Flutter Android release builds now ignore `Intent` extras +and read engine configuration strictly +from the compiled `AndroidManifest.xml`. +Because prebuilt binaries cannot have their manifests +dynamically modified after compilation, +the Flutter CLI now produces a fatal error +if you pass engine configuration flags to a prebuilt release binary +(preventing flags from being silently ignored). + +Standard release builds +(where the CLI compiles the app and injects flags into the manifest) +and all debug and profile workflows continue to work without changes. ## Context -The Flutter CLI allows passing flags (such as `--dart-flags` or tracing options) +The Flutter CLI allows passing flags +(such as `--dart-flags` or tracing options) to configure the Flutter engine when running or driving an application. Historically, the Flutter Android embedding accepted these flags at runtime through [`Intent`][] extras. -However, runtime `Intent` extras on Android can be spoofed or intercepted -by other applications on a user's device. -To harden production applications, Flutter Android release builds now read -configuration strictly from a cryptographically signed `AndroidManifest.xml` +However, runtime `Intent` extras on Android +can be spoofed or intercepted by other applications on a user's device. +To harden production applications, +Flutter Android release builds now read configuration strictly +from a cryptographically signed `AndroidManifest.xml` and ignore runtime `Intent` flags. -For release builds of standard Gradle-based projects, the Flutter CLI automatically injects -command-line flags into `AndroidManifest.xml` during compilation. +For release builds of standard Gradle-based projects, +the Flutter CLI automatically injects command-line flags +into `AndroidManifest.xml` during compilation. When you use a prebuilt release binary with `--use-application-binary`, -the CLI cannot modify the compiled manifest, and the binary ignores -runtime `Intent` flags. -To prevent tests or scripts from running with unnoticed configuration failures, +the CLI cannot modify the compiled manifest, +and the binary ignores runtime `Intent` flags. +To prevent tests or scripts from running +with unnoticed configuration failures, the CLI now reports a fatal error. Debug and profile builds intentionally maintain runtime flag support @@ -54,8 +62,8 @@ to preserve testing velocity and dynamic benchmarking workflows. ## Description of change -The Flutter CLI enforces the following behavior when running Flutter apps -on Android: +The Flutter CLI enforces the following behavior +when running Flutter apps on Android: | Build mode | Using `--use-application-binary` | CLI behavior | Notes | | :--- | :--- | :--- | :--- | @@ -71,20 +79,23 @@ You are **not affected** and do not need to take action if: - You build and run standard release apps (`flutter run --release`, `flutter build apk --release`, `flutter build appbundle`). - You run tests and benchmarks in **debug** or **profile** mode. -- You use `--use-application-binary` without passing engine configuration flags. +- You use `--use-application-binary` + without passing engine configuration flags. ::: -If your CI/CD pipelines, automated scripts, or build systems pass flags to -prebuilt release binaries, use one of the following migration paths: +If your CI/CD pipelines, automated scripts, or build systems +pass flags to prebuilt release binaries, +use one of the following migration paths: ### Switch testing and benchmarking to profile mode -If your automated test pipelines use `--use-application-binary` with `--release` -to dynamically test different engine configurations: +If your automated test pipelines use `--use-application-binary` +with `--release` to dynamically test different engine configurations: 1. Switch your test target to **profile mode** (`--profile`). - Profile mode mirrors release performance characteristics while retaining - support for dynamic runtime flag configuration without recompilation. + Profile mode mirrors release performance characteristics + while retaining support for dynamic runtime flag configuration + without recompilation. ### Build release binaries with flags directly @@ -93,18 +104,18 @@ If you must run tests against a release binary: 1. Run `flutter build` or `flutter run` with your configuration flags without `--use-application-binary`. The CLI automatically embeds the flags into the compiled manifest. -1. Alternatively, compile separate release binaries for each required - test configuration. +1. Alternatively, compile separate release binaries + for each required test configuration. ### Configure non-Gradle or hermetic build systems If you build Flutter Android applications using hermetic build systems (such as Bazel) that separate compilation from execution: -1. Statically declare any necessary engine flags in - `AndroidManifest.xml` before compiling the release APK. -1. Use **profile mode** for test targets that require dynamic configuration - at launch time. +1. Statically declare any necessary engine flags in `AndroidManifest.xml` + before compiling the release APK. +1. Use **profile mode** for test targets + that require dynamic configuration at launch time. ### Declare engine flags in `AndroidManifest.xml` From cea72ce02623eac87ea422e9b94b415f1c62afc9 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 26 Aug 2026 17:03:37 -0700 Subject: [PATCH 5/6] add to index file --- sites/docs/src/content/release/breaking-changes/index.md | 2 ++ ...rict-command-line-flags-prebuilt-android-release-binaries.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sites/docs/src/content/release/breaking-changes/index.md b/sites/docs/src/content/release/breaking-changes/index.md index ec95d837bc..3ac83daf24 100644 --- a/sites/docs/src/content/release/breaking-changes/index.md +++ b/sites/docs/src/content/release/breaking-changes/index.md @@ -37,8 +37,10 @@ They're sorted by release and listed in alphabetical order: ### Not yet released to stable * [Added enabled property and made onChanged optional for DropdownButton][] +* [Restrict command-line flags for prebuilt Android release binaries][] [Added enabled property and made onChanged optional for DropdownButton]: /release/breaking-changes/dropdownbutton-enabled-property +[Restrict command-line flags for prebuilt Android release binaries]: /release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md ### Released in Flutter 3.47 diff --git a/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md b/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md index b0a0341865..eee4f6b7b8 100644 --- a/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md +++ b/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md @@ -1,5 +1,5 @@ --- -title: Restrict command-line flags on prebuilt Android release binaries +title: Restrict command-line flags for prebuilt Android release binaries description: >- Passing configuration flags to prebuilt Android release binaries with `--use-application-binary` is no longer supported. From 495188515a1c0f536840ad20671e69459532e436 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Fri, 28 Aug 2026 10:02:52 -0700 Subject: [PATCH 6/6] address gemini review --- ...-command-line-flags-prebuilt-android-release-binaries.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md b/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md index eee4f6b7b8..a4ad39e61c 100644 --- a/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md +++ b/sites/docs/src/content/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries.md @@ -123,7 +123,7 @@ To configure engine flags statically in release builds, add `` elements under the `` tag in your `android/app/src/main/AndroidManifest.xml` file: -```xml title="AndroidManifest.xml" highlightLines=6-13 +```xml title="AndroidManifest.xml" highlightLines=6-12