android adb shell am pm

xiaoxiao2021-02-28  75

adb shell pm list packages //列出说要安装的packages

pm list packages: prints all packages, optionally only

those whose package name contains the text in FILTER. Options:

-f: see their associated file. -d: filter to only show disbled packages. -e: filter to only show enabled packages. -s: filter to only show system packages. -3: filter to only show third party packages. -i: see the installer for the packages. -u: also include uninstalled packages.

adb shell pm list packages -f //列出安装的packages 并显示出apk包所在的位置 eg:package:/system/priv-app/FMRadio/FMRadio.apk=com.android.fmradio eg: adb shell pm list packages -f “qiku”

adb shell pm list packages -d //列出被停用的应用 eg:C:\Users\Administrator>adb shell pm list packages -d package:com.qiku.android.sos

adb shell pm list packages -e //列出启用的应用 adb shell pm list packages -3 //列出安装的第三方应用,可以结合-3 -f查看具体apk的路径 adb shell pm list packages -i //列出应用及包,并显示他的安装来源,null表示系统。 eg:package:com.tencent.mobileqq installer=com.tencent.mobileqq adb shell pm list packages -u //列出为安装包应用信息

pm list permission-groups: prints all known permission groups.

pm list permissions: prints all known permissions, optionally only

those in GROUP. Options:

-g: organize by group. -f: print all information. -s: short summary. -d: only list dangerous permissions. -u: list only the permissions users will see.

adb shell pm list permission-groups //列出已知的权限组 shell@sp9832a_3h10_volte:/ $ pm list permission-groups

permission group:com.android.qiku.permission-group.CONTACTS permission group:android.permission-group.CONTACTS permission group:android.permission-group.PHONE permission group:com.android.qiku.permission-group.CALENDAR permission group:android.permission-group.CALENDAR permission group:android.permission-group.CAMERA permission group:android.permission-group.SENSORS permission group:android.permission-group.LOCATION permission group:android.permission-group.STORAGE permission group:android.permission-group.MICROPHONE permission group:android.permission-group.SMS

pm list features: prints all features of the system. eg: C:\Users\Administrator>adb shell pm list features feature:reqGlEsVersion=0x20000 feature:android.hardware.audio.output feature:android.hardware.bluetooth feature:android.hardware.bluetooth_le feature:android.hardware.camera feature:android.hardware.camera.any feature:android.hardware.camera.autofocus feature:android.hardware.camera.flash feature:android.hardware.camera.front feature:android.hardware.faketouch feature:android.hardware.location feature:android.hardware.location.gps feature:android.hardware.location.network feature:android.hardware.microphone

pm list users: eg: C:\Users\Administrator>adb shell pm list users Users: UserInfo{0:机主:13} running

pm path: print the path to the .apk of the given PACKAGE.//列出指定包名的apk的路径 感觉和pm list packages -f “pkgname”差不多 eg: C:\Users\Administrator>adb shell pm path com.qiku.music package:/system/priv-app/QK_Music/QK_Music.apk

pm dump: print system state associated with the given PACKAGE //dump 指定应用的信息 包括版本号,安装时间,更新时间,权限等等。 eg:C:\Users\Administrator>adb shell pm dump com.qiku.music >d:\music.log

pm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f] PATH //安装指定目录的apk eg: pm install /data/3dijoy_fane.apk

pm get-install-location  返回当前默认安装位置

  返回值:

    0  auto

    1  内部存储

    2  外部存储

pm set-install-location 0|1|2 修改默认安装位置

pm clear “pkgname”//清除指定应用的数据,可以用于fota升级后,清空数据结合Runningtime

转载请注明原文地址: https://www.6miu.com/read-1400306.html

最新回复(0)