Skip to content

[Android] Restrict engine flags via Intent extras to non-release modes #190461

Closed
2 of 4 issues completed

Description

@camsim99

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 Intent extras 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

  1. self-assigned this
    on Aug 3, 2026
  2. added
    platform-androidAndroid applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    engineflutter/engine related. See also e: labels.
    P1High-priority issues at the top of the work list
    team-androidOwned by Android platform team
    triaged-androidTriaged by Android platform team
    on Aug 3, 2026
  3. github-actions commented on Oct 19, 2026

    @github-actions

    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 -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listengineflutter/engine related. See also e: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions