File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -15,17 +15,6 @@ cd "${originalDirPath}" || exit 1
1515unset scriptDirPath
1616unset originalDirPath
1717
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-
2918waitUserInputParameter () {
3019 echo " 请输入查看 Logcat 的应用包名(留空则查看所有应用的日志):"
3120 while true ; do
@@ -66,7 +55,7 @@ displayLogcatSingleDevice() {
6655 return 1
6756 fi
6857
69- if isSupportLogcatUidFilter " ${deviceId} " ; then
58+ if (( androidVersionCode >= 31 )) ; then
7059 echo " 📝 设备支持 uid 过滤,使用原生过滤的方式(UID: ${uid} )"
7160 adb -s " ${deviceId} " logcat --uid " ${uid} " < /dev/null
7261 else
You can’t perform that action at this time.
0 commit comments