We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 247e193 commit 36ea4f4Copy full SHA for 36ea4f4
1 file changed
shell/device-tools/DisplayLogcat.sh
@@ -15,17 +15,6 @@ cd "${originalDirPath}" || exit 1
15
unset scriptDirPath
16
unset originalDirPath
17
18
-isSupportLogcatUidFilter() {
19
- local deviceId=$1
20
- local outputPrint
21
- outputPrint=$(adb -s "${deviceId}" logcat --help 2>&1)
22
- if echo "${outputPrint}" | grep -q -- "--uid"; then
23
- return 0
24
- else
25
- return 1
26
- fi
27
-}
28
-
29
waitUserInputParameter() {
30
echo "请输入查看 Logcat 的应用包名(留空则查看所有应用的日志):"
31
while true; do
@@ -66,7 +55,7 @@ displayLogcatSingleDevice() {
66
55
return 1
67
56
fi
68
57
69
- if isSupportLogcatUidFilter "${deviceId}"; then
58
+ if (( androidVersionCode >= 31 )); then
70
59
echo "📝 设备支持 uid 过滤,使用原生过滤的方式(UID: ${uid})"
71
60
adb -s "${deviceId}" logcat --uid "${uid}" < /dev/null
72
61
else
0 commit comments