常用的用法:

查看已经安装的包: pm list packages

查看已经安装的包以及apk路径(-3:只看第三方应用; -s:只看系统应用)

-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.

pm list packages -f -3:列出指定包名的APK位置

pm path com.kp.poi :删除某个应用的所有数据(相当于全新安装)

pm clear com.UCMobile:禁用/启用某个应用(disable/enable)

pm disable com.android.systemui:列出硬件信息:pm list features

完整的用法:

C:\Users\Administrator>adb shell pm

usage: pm list packages [-f] [-d] [-e] [-s] [-3] [-i] [-u] [--user USER_ID] [FILTER]

pm list permission-groups

pm list permissions [-g] [-f] [-d] [-u] [GROUP]

pm list instrumentation [-f] [TARGET-PACKAGE]

pm list features

pm list libraries

pm list users

pm path PACKAGE

pm dump PACKAGE

pm install [-lrtsfd] [-i PACKAGE] [--user USER_ID] [PATH]

pm install-create [-lrtsfdp] [-i PACKAGE] [-S BYTES]

[--install-location 0/1/2]

[--force-uuid internal|UUID]

pm install-write [-S BYTES] SESSION_ID SPLIT_NAME [PATH]

pm install-commit SESSION_ID

pm install-abandon SESSION_ID

pm uninstall [-k] [--user USER_ID] PACKAGE

pm set-installer PACKAGE INSTALLER

pm move-package PACKAGE [internal|UUID]

pm move-primary-storage [internal|UUID]

pm clear [--user USER_ID] PACKAGE

pm enable [--user USER_ID] PACKAGE_OR_COMPONENT

pm disable [--user USER_ID] PACKAGE_OR_COMPONENT

pm disable-user [--user USER_ID] PACKAGE_OR_COMPONENT

pm disable-until-used [--user USER_ID] PACKAGE_OR_COMPONENT

pm hide [--user USER_ID] PACKAGE_OR_COMPONENT

pm unhide [--user USER_ID] PACKAGE_OR_COMPONENT

pm grant [--user USER_ID] PACKAGE PERMISSION

pm revoke [--user USER_ID] PACKAGE PERMISSION

pm reset-permissions

pm set-app-link [--user USER_ID] PACKAGE {always|ask|never|undefined}

pm get-app-link [--user USER_ID] PACKAGE

pm set-install-location [0/auto] [1/internal] [2/external]

pm get-install-location

pm set-permission-enforced PERMISSION [true|false]

pm trim-caches DESIRED_FREE_SPACE [internal|UUID]

pm create-user [--profileOf USER_ID] [--managed] USER_NAME

pm remove-user USER_ID

pm get-max-users

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.

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.

pm list instrumentation: use to list all test packages; optionally

supply to list the test packages for a particular

application. Options:

-f: list the .apk file for the test package.

pm list features: prints all features of the system.

pm list users: prints all users on the system.

pm path: print the path to the .apk of the given PACKAGE.

pm dump: print system state associated with the given PACKAGE.

pm install: install a single legacy package

pm install-create: create an install session

-l: forward lock application

-r: replace existing application

-t: allow test packages

-i: specify the installer package name

-s: install application on sdcard

-f: install application on internal flash

-d: allow version code downgrade

-p: partial application install

-g: grant all runtime permissions

-S: size in bytes of entire session

pm install-write: write a package into existing session; path may

be '-' to read from stdin

-S: size in bytes of package, required for stdin

pm install-commit: perform install of fully staged session

pm install-abandon: abandon session

pm set-installer: set installer package name

pm uninstall: removes a package from the system. Options:

-k: keep the data and cache directories around after package removal.

pm clear: deletes all data associated with a package.

pm enable, disable, disable-user, disable-until-used: these commands

change the enabled state of a given package or component (written

as "package/class").

pm grant, revoke: these commands either grant or revoke permissions

to apps. The permissions must be declared as used in the app's

manifest, be runtime permissions (protection level dangerous),

and the app targeting SDK greater than Lollipop MR1.

pm reset-permissions: revert all runtime permissions to their default state.

pm get-install-location: returns the current install location.

0 [auto]: Let system decide the best location

1 [internal]: Install on internal device storage

2 [external]: Install on external media

pm set-install-location: changes the default install location.

NOTE: this is only intended for debugging; using this can cause

applications to break and other undersireable behavior.

0 [auto]: Let system decide the best location

1 [internal]: Install on internal device storage

2 [external]: Install on external media

pm trim-caches: trim cache files to reach the given free space.

pm create-user: create a new user with the given USER_NAME,

printing the new user identifier of the user.

pm remove-user: remove the user with the given USER_IDENTIFIER,

deleting all data associated with that user

adb shell 命令之----pm的更多相关文章

  1. 【原创】Android开发之ADB及ADB SHELl命令的应用

    adb的全称为Android Debug Bridge,就是起到调试桥的作用.通过adb我们可以在Eclipse中方面通过DDMS来调试Android程序,说白了就是debug工具.adb的工作方式比 ...

  2. 【android】android 常用adb 和 adb shell 命令

    db是SDK自带的工具,可实现桥接功能:adb shell 可以与手机系统建立交互,是基于andoid Linux系统下的操作 ADB常用命令: 1. 查看设备         adb  device ...

  3. ubuntu 使用adb shell命令识别android设备

    ubuntu 使用adb shell命令配置 在ubuntu下使用adb 命令识别Android设备需配置adb_usb.ini 文件 文件路径:  ~/.android/ ,若不存在创建该文件. a ...

  4. adb shell 命令详解,android

    http://www.miui.com/article-275-1.html http://noobjava.iteye.com/blog/1914348 adb shell 命令详解,android ...

  5. 【安卓手机通用】android adb shell 命令大全

    浏览:3116 | 更新:2013-10-17 17:05 | 标签:安卓 android 一.[什么是shell] Linux系统的shell作为操作系统的外壳,为用户提供使用操作系统的接口.它是命 ...

  6. Android 执行 adb shell 命令

    Android 执行Adb shell 命令大多需要root权限,Android自带的Runtime. getRuntime().exec()容易出错,在网上找到了一个执行adb shell命令的类 ...

  7. adb shell命令后出现error: device not found错误提示

    在cmd中输入adb shell进入linux shell环境前,需要把android模拟器打开(本文都是针对模拟器而言,并非真机).如果启动好了模拟器,且输入adb shell命令后出现error: ...

  8. Android 通过adb shell命令查看内存,CPU,启动时间,电量等信息

    Android 通过adb shell命令查看内存,CPU,启动时间,电量等信息   by:授客 QQ:1033553122 1.  查看内存信息 1)查看所有内存信息 命令: dumpsys mem ...

  9. adb shell 命令详解,android, adb logcat

    http://www.miui.com/article-275-1.html http://noobjava.iteye.com/blog/1914348 adb shell 命令详解,android ...

随机推荐

  1. hdu 1241(DFS/BFS)

    Oil Deposits Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tota ...

  2. table中内容过长,table改变的问题

    在看效果时发现在Chrome中的table已经不是原来设置的宽度了,而其他浏览器是好的,经过百度发现是单元格内容过多造成的,但这时候给td设置宽度已经不适用了,此时就要给table设置 table{t ...

  3. 网站SEO优化问答精选【转载】

    在接触seo的过程中,大家都会碰到很多这样或那样的问题,特别是一些seo新手由于知识有限会经常到很多地方问一些网站优化的问题,做seo时间慢慢变长之后,知识会慢慢地积累,之前的问题也会慢慢的都被解答. ...

  4. 再读vue2.0

    玩过一段时间后在来读读vue2.0会发现受益良多 概述: vue2.0 是一套构建用户界面的渐进式框架, 使用virtual DOM  提供了响应式和组件化, 允许使用简介的模板语法来声明式的将数据渲 ...

  5. bug修复记录

    telnet 网址 ping netaddr traceroute netaddr ,这是一个linux下的命令可以通过Vmmap观察程序运行时所需要的依赖库协议里面涉及到数组的, 一定要判断最大值 ...

  6. vue-property-decorator 提供 OO 的风格 Vue Component 方便类型声明

    @Prop  父子组件之间传值 Install: npm install --save vue-property-decorator Child: <template> <div&g ...

  7. sql server自定义排序

    方法一: 比如需要对SQL表中的字段NAME进行如下的排序:张三(Z)李四(L)王五(W)赵六(Z) 按照sql中的默认排序规则,根据字母顺序(a~z)排,结果为:李四  王五 赵六 张三 自定义排序 ...

  8. sql语句格式化数字(前面补0)

    将一个数字例如33,或1使用t-sql语句转换成033或001 以下是详细分析: .,)得到1000 . as varchar) 将1000转换类型 .,) 从右边取3个字符得到033 将1格式化同上 ...

  9. gitlab的ssh key有2个

    Gitlab添加SSH key可以pull不能push的问题 最后解决的是 使用http去clone pull  提交 没用ssh.就是需要输入密码

  10. iPhone IOS10安装APP没提示连接网络(无法联网)的解决办法

    iPhone升级ios10之后,遇到如标题所述问题时: 1.退出APP,设置-蜂窝移动网络-无线局域网助理-开启 2.进入APP,这时候就回提示连接网络了. 提醒: 数据流量有限的朋友,平时请关闭&q ...