)]}'
{
  "commit": "629df07148561e4180238d67de92628b77fbaed0",
  "tree": "8f0c6b646aa1cfdf9b38612d1d31316752e55c61",
  "parents": [
    "f0554ff32ab0010daec445e8077b8a8da5b6a82f"
  ],
  "author": {
    "name": "Ben Konyi",
    "email": "bkonyi@google.com",
    "time": "Tue Jul 07 20:15:24 2026 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jul 08 00:15:24 2026 +0000"
  },
  "message": "[flutter_tools] Fix wireless ADB device discovery when serial contains spaces (#187943)\n\n## Description\n\nWhen ADB registers a wireless device, it uses the mDNS service name as\nthe device serial. If there is an mDNS name conflict (e.g. due to\ntoggling wireless debugging off and on quickly), ADB appends a suffix\nlike `\" (2)\"` to the service name, resulting in a serial with a space\n(e.g. `adb-SERIAL (2)._adb-tls-connect._tcp`).\n\nPreviously, the regex used to parse `adb devices -l` output truncated\nthe serial at the first space, leading to corrupted device IDs and\n\"device not found\" errors when the tool tried to communicate with the\ndevice.\n\nThis change updates the regex in `android_device_discovery.dart` to use\nan anchored lazy match that correctly identifies the boundary between\nthe serial and the state, allowing spaces in the serial.\n\nIt explicitly handles the `\"no permissions\"` state (which is the only\nknown state containing a space) and uses a generic match (`\\S+`) for all\nother single-word states.\n\nDetailed comments have been added to the regex to explain this design.\n\n## Related Issues\n\n*   Fixes #187092\n\n## Tests\n\n* Added a new exhaustive test case in\n`android_device_discovery_test.dart` (`AndroidDevices can parse various\nadb device outputs exhaustively`) that verifies various combinations of\nserials (with/without spaces, containing state keywords) and states.\n* Ran all tests in\n`packages/flutter_tools/test/general.shard/android/android_device_discovery_test.dart`\nand they passed.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bb78b0615f99654067e6372171d6264c45206c37",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/lib/src/android/android_device_discovery.dart",
      "new_id": "c5dfc95e9e65eb6da42925d11dcac32c4553501d",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/lib/src/android/android_device_discovery.dart"
    },
    {
      "type": "modify",
      "old_id": "05a88c0c171064ac1ade63d9261d95ff7f05d1e2",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/test/general.shard/android/android_device_discovery_test.dart",
      "new_id": "31d7cbb50216263856f7034067916527fe855fa2",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/test/general.shard/android/android_device_discovery_test.dart"
    }
  ]
}
