列出已经安装的应用
adb shell pm list package
C:UsersCJTDEV003>adb shell pm list package package:com.samsung.android.provider.filterprovider package:com.sec.android.app.DataCreate package:com.android.cts.priv.ctsshim package:com.gd.mobicore.pa package:com.sec.android.widgetapp.samsungapps package:com.qualcomm.qti.auth.sampleextauthservice package:com.samsung.android.app.galaxyfinder package:com.sec.location.nsflp2 package:com.samsung.android.themestore package:com.sec.android.app.chromecustomizations package:com.thinksky.itools package:com.android.providers.telephony package:com.sec.android.app.parser
已安装的应用,可以使用下面这个命令来查看,这个出来的信息很多,需要过滤掉
adb shell dumpsys package [PackageName]
查看 versionCode、versionName (windows 用 findstr 过滤,linux 用 grep 过滤)
adb shell dumpsys package [PackageName] | findstr versionCode adb shell dumpsys package [PackageName] | findstr versionName
C:UsersCJTDEV003> adb shell dumpsys package com.tencent.mm | findstr versionCode versionCode=1240 minSdk=17 targetSdk=23 C:UsersCJTDEV003> adb shell dumpsys package com.tencent.mm | findstr versionName versionName=6.6.2 C:UsersCJTDEV003> adb shell dumpsys package com.tencent.mm | findstr version versionCode=1240 minSdk=17 targetSdk=23 versionName=6.6.2