列出已经安装的应用
adb shell pm list package
C:\Users\CJTDEV003>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:\Users\CJTDEV003> adb shell dumpsys package com.tencent.mm | findstr versionCode versionCode=1240 minSdk=17 targetSdk=23 C:\Users\CJTDEV003> adb shell dumpsys package com.tencent.mm | findstr versionName versionName=6.6.2 C:\Users\CJTDEV003> adb shell dumpsys package com.tencent.mm | findstr version versionCode=1240 minSdk=17 targetSdk=23 versionName=6.6.2
原文地址:https://www.cnblogs.com/yinzhuoqun/p/8436280.html
时间: 2024-10-12 22:51:21