From 5b2cc1ae67e13f871fe8daa75ce9523cb2be3408 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Wed, 2 Dec 2015 11:27:27 -0800 Subject: [PATCH] Make trace --stop fail if the adb pull fails. @chinmaygarde --- packages/flutter_tools/lib/src/device.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart index 48e2f7f9274..f1c3495c6a3 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart @@ -875,8 +875,9 @@ class AndroidDevice extends Device { } if (tracePath != null) { + runCheckedSync(adbCommandForDevice(['root'])); runSync(adbCommandForDevice(['shell', 'run-as', apk.id, 'chmod', '777', tracePath])); - runSync(adbCommandForDevice(['pull', tracePath])); + runCheckedSync(adbCommandForDevice(['pull', tracePath])); runSync(adbCommandForDevice(['shell', 'rm', tracePath])); return path.basename(tracePath); }