LG debugging/logcat fixed (#58670)

This commit is contained in:
duzenko
2020-06-15 19:35:07 +03:00
committed by GitHub
parent c21b3233e4
commit c79de78237
4 changed files with 23 additions and 5 deletions

View File

@@ -1024,7 +1024,11 @@ class AdbLogReader extends DeviceLogReader {
}(await device.apiVersion);
// Start the adb logcat process and filter the most recent logs since `lastTimestamp`.
// Some devices (notably LG) will only output logcat via shell
// https://github.com/flutter/flutter/issues/51853
final List<String> args = <String>[
'shell',
'-x',
'logcat',
'-v',
'time',
@@ -1034,9 +1038,9 @@ class AdbLogReader extends DeviceLogReader {
'flutter',
] else if (apiVersion != null && apiVersion >= kLollipopVersionCode) ...<String>[
// Otherwise, filter for logs appearing past the present.
// Empty `-T` means the timestamp of the logcat command invocation.
// '-T 0` means the timestamp of the logcat command invocation.
'-T',
device.lastLogcatTimestamp ?? '',
if (device.lastLogcatTimestamp != null) '\'${device.lastLogcatTimestamp}\'' else '0',
],
];
final Process process = await processManager.start(device.adbCommandForDevice(args));