mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Run logcat through shell (#21977)
This should fix #18889 which may be related to `adb logcat` not working correctly in non-terminals on some LG devices. See https://github.com/flutter/flutter/issues/18889#issuecomment-422217761.
This commit is contained in:
parent
ccd070a5b4
commit
ff9dc22e44
@ -498,7 +498,7 @@ class AndroidDevice extends Device {
|
||||
/// no available timestamp. The format can be passed to logcat's -T option.
|
||||
String get lastLogcatTimestamp {
|
||||
final String output = runCheckedSync(adbCommandForDevice(<String>[
|
||||
'logcat', '-v', 'time', '-t', '1'
|
||||
'shell', '-x', 'logcat', '-v', 'time', '-t', '1'
|
||||
]));
|
||||
|
||||
final Match timeMatch = _timeRegExp.firstMatch(output);
|
||||
@ -664,7 +664,7 @@ class _AdbLogReader extends DeviceLogReader {
|
||||
|
||||
void _start() {
|
||||
// Start the adb logcat process.
|
||||
final List<String> args = <String>['logcat', '-v', 'time'];
|
||||
final List<String> args = <String>['shell', '-x', 'logcat', '-v', 'time'];
|
||||
final String lastTimestamp = device.lastLogcatTimestamp;
|
||||
if (lastTimestamp != null)
|
||||
_timeOrigin = _adbTimestampToDateTime(lastTimestamp);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user