From d36af446f2c9eb36d133b1d25575c495f1654460 Mon Sep 17 00:00:00 2001 From: Nathan Kerr Date: Sat, 14 Nov 2015 11:25:29 -0800 Subject: [PATCH] Change Regex to correctly match against my device. Since we don't care about the port, just allow any characters between the spaces after the device ID and the product. Running Windows 10, running "adb devices -l" with my device attached to the computer gives: FA34MW904146 device product:cm_m7 model:One device:m7 Which wasn't being matched correctly (no info on USB port). --- packages/flutter_tools/lib/src/device.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart index 69b24bca83..30a693a0be 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart @@ -509,7 +509,7 @@ class AndroidDevice extends Device { // 015d172c98400a03 device usb:340787200X product:nakasi model:Nexus_7 device:grouper RegExp deviceRegex1 = new RegExp( - r'^(\S+)\s+device\s+\S+\s+product:(\S+)\s+model:(\S+)\s+device:(\S+)$'); + r'^(\S+)\s+device\s+.*product:(\S+)\s+model:(\S+)\s+device:(\S+)$'); // 0149947A0D01500C device usb:340787200X RegExp deviceRegex2 = new RegExp(r'^(\S+)\s+device\s+\S+$');