Repository navigation
Description
Note
This issue revises the original proposal, #180686. While that proposal planned to completely remove the ability to pass engine shell arguments via Intent extras, development constraints caused us to shift gears. Full proposal can be found in go/flutter-android-secure-intents.
In #180686, we targeted complete removal of the ability to set engine flags via Intent extras to secure applications from dynamic parameter injection vectors (like spoofing --aot-shared-library-name for example). However, eliminating this pathway entirely breaks hermetic build systems and critical local testing workflows where developers deploy prebuilt binaries and dynamically modify flags via command line. Because the Android OS intentionally lowers security sandboxing for debuggable builds anyway, blocking local Intent flags in debug/profile environments does not provide real-world security.
Instead, we will establish a build-mode-specific trust boundary: Release builds will treat production application boundaries as immutable and ignore/strip engine shell flag parsing from Intent extras, while debug and profile builds will prioritize velocity and preserve the ability to accept engine shell arguments via Intent.
Task list for implementing the restriction:
- Update the CLI to inject engine configuration flags into the manifest during Gradle compilation for release builds
- Implement a fatal CLI check when developers attempt to run a prebuilt release APK with command line engine flags (those flags will now be ignored)
- Completely strip engine flag parsing from
Intentextras in release builds (only retaining the logic in debug and profile modes) - Document the Flutter CLI's new behavior and provide migration guidelines for non-Gradle users to declare flags statically in their release manifests pre-compilation
After this is complete, FlutterShellArgs should be deleted after one stable release with the changes: #193256
Activity
--enable-software-renderingviaIntent#179274[Android] Inject command line flags into manifest in release mode whe…
[Android] Inject `route` into manifest when specified on the command …
FlutterEngineFlags#182852[Android] Add breaking change docs for setting flags via the CLI in r…
[Android] Add breaking change docs for setting flags via the CLI in r…
Intent.get*Extracalls toIntentUtils#192076FlutterShellArgs#193256[Android] Updating breaking change page on restricting engine config …
[Android] Update the CLI to reject passing engine configuration flags…
[Android] Refactor Intent-driven engine flags into a variant-specific…
github-actions commentedon Oct 19, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[Android] Refactor Intent-driven engine flags into a variant-specific…