Skip to content

[Android] open --relaunch com.android.settings fails: "process remained running after close" #4482

Open

Description

@informramiz

Environment: agent-device 0.21.36, macOS (Apple silicon). Android 17 emulator (Google APIs, arm64), Settings app; iOS 27.2 Simulator (iPhone 18 Pro). Found while benchmarking agent-device against an adb/AXe stack: https://codebyramiz.com/blog/mobile-mcp-agent-device/

Steps: agent-device open com.android.settings --platform android --serial emulator-5556 --session bench --relaunch --foreground

Expected: Settings is force-stopped and relaunched.

Actual:

Error (COMMAND_FAILED): Android app com.android.settings process remained running after close

Without --relaunch the same open works (1.2 s).

Note: Settings is a persistent/system process on recent Android images and can come back right after am force-stop. Treating "relaunched with a new pid" as success, or falling back to am start -S, might cover it.

Activity

  1. thymikee commented on Nov 13, 2026

    @thymikee
    Member

    Triage: bug; actionable without more input from you. The relaunch close fence currently rejects a package Android starts again after the original processes exit. #4498 handles that case while retaining the foreground and original-process exit checks; plain close keeps its existing contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions