Today there is a task that requires obtaining information apk version, saying that under the command on the line after the Baidu
adb shell dumpsys package com.baidu.searchbox | findstr versionCode
And then prompts -bash: findstr: command not found, probably means no findstr command
Then he went on Baidu, many of which are said path set not like, I have tried, are they not work
Tangled for a long time, and later found a system problem, I use a mac, mac is not in the findstr command, the findstr into grep to successfully get the version information of apk
Summary: In the win system, using: adb shell dumpsys Package Penalty for com.baidu.searchbox | findstr versionCode order to find relevant information
在mac(linux) 使用:adb shell dumpsys package com.baidu.searchbox | grep versionCode