Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c79de782
Unverified
Commit
c79de782
authored
Jun 15, 2020
by
duzenko
Committed by
GitHub
Jun 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LG debugging/logcat fixed (#58670)
parent
c21b3233
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
5 deletions
+23
-5
android_device.dart
packages/flutter_tools/lib/src/android/android_device.dart
+6
-2
adb_log_reader_test.dart
...tools/test/general.shard/android/adb_log_reader_test.dart
+13
-1
android_device_start_test.dart
...test/general.shard/android/android_device_start_test.dart
+2
-0
android_device_test.dart
...tools/test/general.shard/android/android_device_test.dart
+2
-2
No files found.
packages/flutter_tools/lib/src/android/android_device.dart
View file @
c79de782
...
@@ -1024,7 +1024,11 @@ class AdbLogReader extends DeviceLogReader {
...
@@ -1024,7 +1024,11 @@ class AdbLogReader extends DeviceLogReader {
}(
await
device
.
apiVersion
);
}(
await
device
.
apiVersion
);
// Start the adb logcat process and filter the most recent logs since `lastTimestamp`.
// 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
>[
final
List
<
String
>
args
=
<
String
>[
'shell'
,
'-x'
,
'logcat'
,
'logcat'
,
'-v'
,
'-v'
,
'time'
,
'time'
,
...
@@ -1034,9 +1038,9 @@ class AdbLogReader extends DeviceLogReader {
...
@@ -1034,9 +1038,9 @@ class AdbLogReader extends DeviceLogReader {
'flutter'
,
'flutter'
,
]
else
if
(
apiVersion
!=
null
&&
apiVersion
>=
kLollipopVersionCode
)
...<
String
>[
]
else
if
(
apiVersion
!=
null
&&
apiVersion
>=
kLollipopVersionCode
)
...<
String
>[
// Otherwise, filter for logs appearing past the present.
// 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'
,
'-T'
,
device
.
lastLogcatTimestamp
??
'
'
,
if
(
device
.
lastLogcatTimestamp
!=
null
)
'
\'
${device.lastLogcatTimestamp}
\'
'
else
'0
'
,
],
],
];
];
final
Process
process
=
await
processManager
.
start
(
device
.
adbCommandForDevice
(
args
));
final
Process
process
=
await
processManager
.
start
(
device
.
adbCommandForDevice
(
args
));
...
...
packages/flutter_tools/test/general.shard/android/adb_log_reader_test.dart
View file @
c79de782
...
@@ -26,11 +26,13 @@ void main() {
...
@@ -26,11 +26,13 @@ void main() {
'adb'
,
'adb'
,
'-s'
,
'-s'
,
'1234'
,
'1234'
,
'shell'
,
'-x'
,
'logcat'
,
'logcat'
,
'-v'
,
'-v'
,
'time'
,
'time'
,
'-T'
,
'-T'
,
kLastLogcatTimestamp
,
'
\'
$kLastLogcatTimestamp
\'
'
,
],
],
)
)
]);
]);
...
@@ -49,6 +51,8 @@ void main() {
...
@@ -49,6 +51,8 @@ void main() {
'adb'
,
'adb'
,
'-s'
,
'-s'
,
'1234'
,
'1234'
,
'shell'
,
'-x'
,
'logcat'
,
'logcat'
,
'-v'
,
'-v'
,
'time'
,
'time'
,
...
@@ -70,6 +74,8 @@ void main() {
...
@@ -70,6 +74,8 @@ void main() {
'adb'
,
'adb'
,
'-s'
,
'-s'
,
'1234'
,
'1234'
,
'shell'
,
'-x'
,
'logcat'
,
'logcat'
,
'-v'
,
'-v'
,
'time'
,
'time'
,
...
@@ -91,6 +97,8 @@ void main() {
...
@@ -91,6 +97,8 @@ void main() {
'adb'
,
'adb'
,
'-s'
,
'-s'
,
'1234'
,
'1234'
,
'shell'
,
'-x'
,
'logcat'
,
'logcat'
,
'-v'
,
'-v'
,
'time'
,
'time'
,
...
@@ -115,6 +123,8 @@ void main() {
...
@@ -115,6 +123,8 @@ void main() {
'adb'
,
'adb'
,
'-s'
,
'-s'
,
'1234'
,
'1234'
,
'shell'
,
'-x'
,
'logcat'
,
'logcat'
,
'-v'
,
'-v'
,
'time'
,
'time'
,
...
@@ -141,6 +151,8 @@ void main() {
...
@@ -141,6 +151,8 @@ void main() {
'adb'
,
'adb'
,
'-s'
,
'-s'
,
'1234'
,
'1234'
,
'shell'
,
'-x'
,
'logcat'
,
'logcat'
,
'-v'
,
'-v'
,
'time'
,
'time'
,
...
...
packages/flutter_tools/test/general.shard/android/android_device_start_test.dart
View file @
c79de782
...
@@ -217,6 +217,8 @@ void main() {
...
@@ -217,6 +217,8 @@ void main() {
'adb'
,
'adb'
,
'-s'
,
'-s'
,
'1234'
,
'1234'
,
'shell'
,
'-x'
,
'logcat'
,
'logcat'
,
'-v'
,
'-v'
,
'time'
,
'time'
,
...
...
packages/flutter_tools/test/general.shard/android/android_device_test.dart
View file @
c79de782
...
@@ -370,10 +370,10 @@ flutter:
...
@@ -370,10 +370,10 @@ flutter:
exitCode:
1
,
exitCode:
1
,
),
),
const
FakeCommand
(
const
FakeCommand
(
command:
<
String
>[
'adb'
,
'-s'
,
'1234'
,
'logcat'
,
'-v'
,
'time'
,
'-s'
,
'flutter'
],
command:
<
String
>[
'adb'
,
'-s'
,
'1234'
,
'
shell'
,
'-x'
,
'
logcat'
,
'-v'
,
'time'
,
'-s'
,
'flutter'
],
),
),
const
FakeCommand
(
const
FakeCommand
(
command:
<
String
>[
'adb'
,
'-s'
,
'1234'
,
'logcat'
,
'-v'
,
'time'
],
command:
<
String
>[
'adb'
,
'-s'
,
'1234'
,
'
shell'
,
'-x'
,
'
logcat'
,
'-v'
,
'time'
],
)
)
])
])
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment