常用的用法:

查看已经安装的包

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 -

列出指定包名的APK位置

pm path com.kp.poi 

删除某个应用的所有数据(相当于全新安装)

pm clear com.UCMobile

禁用/启用某个应用(disable/enable)

pm disable com.android.systemui

列出硬件信息

pm list features

完整的用法:

usage: pm list packages [-f] [-d] [-e] [-s] [-] [-i] [-u] [--user USER_ID] [FIL
TER]
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 [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f]
[--algo <algorithm name> --key <key-in-hex> --iv <IV-in-hex>]
[--originating-uri <URI>] [--referrer <URI>] PATH
pm uninstall [-k] PACKAGE
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 block [--user USER_ID] PACKAGE_OR_COMPONENT
pm unblock [--user USER_ID] PACKAGE_OR_COMPONENT
pm grant PACKAGE PERMISSION
pm revoke PACKAGE PERMISSION
pm set-install-location [/auto] [/internal] [/external]
pm get-install-location
pm set-permission-enforced PERMISSION [true|false]
pm trim-caches DESIRED_FREE_SPACE
pm create-user 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.
-: 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 <TARGET-PACKAGE> 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 w ith the given PACKAGE. pm install: installs a package to the system. Options:
-l: install the package with FORWARD_LOCK.
-r: reinstall an exisiting app, keeping its data.
-t: allow test .apks to be installed.
-i: specify the installer package name.
-s: install package on sdcard.
-f: install package on internal flash.
-d: allow version code downgrade. 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 applications. Only optional permissions the application has
declared can be granted or revoked. pm get-install-location: returns the current install location.
[auto]: Let system decide the best location
[internal]: Install on internal device storage
[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.
[auto]: Let system decide the best location
[internal]: Install on internal device storage
[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命令之pm的更多相关文章

  1. adb shell am broadcast 手动发送广播及adb shell am/pm其他命令

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/zi_zhe/article/details/72229201 在命令行可用adb shell am ...

  2. 分享一个常用Adb命令

    分享一个常用Adb命令 首先 首先感谢@xuxu的常用adb命令,收益良多,但是已经不能满足于我,所以补充了下. 再者 好久没发帖了,最近论坛老司机们都在讨论/总结,我就用这个干货回报吧. 最后 基于 ...

  3. adb 命令

    adb命令 su 获取权限 ls 显示目录下的文件 cd / 跳转路径 pm 直接执行设备命令 exit 退出 adb devices 查看设备 adb shell 登录设备shell adb 用桥接 ...

  4. 常用的adb命令

    在平时的工作中,会经常用到adb命令,在这里稍微整理了一下. 一.概要 1.什么是adb? adb全称为Android Debug Bridge,就是起到调试桥的作用.顾名思义,adb就是一个debu ...

  5. Android 常用 adb 命令

    查看原文:http://blog.csdn.net/u010818425/article/details/52266593 (一)基础操作 安装app adb install -r xxx.apk / ...

  6. Android 常用 adb 命令总结

    Android 常用 adb 命令总结 针对移动端 Android 的测试, adb 命令是很重要的一个点,必须将常用的 adb 命令熟记于心, 将会为 Android 测试带来很大的方便,其中很多命 ...

  7. 【转】Android 常用 adb 命令总结

    原文地址:http://testerhome.com/topics/2565 针对移动端 Android 的测试, adb 命令是很重要的一个点,必须将常用的 adb 命令熟记于心, 将会为 Andr ...

  8. Android命令之-------ADB命令大全

    1.显示当前运行的全部模拟器:    adb devices2.启动ADB    adb start-server3.停止ADB   adb kill-server4.安装应用程序:      adb ...

  9. APP测试时常用adb命令

    ADB全称Android Debug Bridge, 是android sdk里的一个工具, 用这个工具可以直接操作管理android模拟器或者真实的andriod设备(手机),故在其实工作可以给我们 ...

随机推荐

  1. Python与Go选择排序

    #!/usr/bin/env python # -*- coding: utf-8 -*- # 选择排序 # 时间复杂度O(n^2) def selection_sort(array): length ...

  2. IDEA快捷键【收藏】

    Ctrl+Alt+L 格式化代码Ctrl+Shift+J 两行合成一行,删去不必要的空格匹配代码格式其他快捷键:[常规]Ctrl+Shift + Enter,语句完成“!”,否定完成,输入表达式时按 ...

  3. 什么是展uv

    uvw是对应三维模型x.y.z坐标,就像模型的皮肤一样,为了便于绘制贴图,需要将UV尽量展平 展UV就是把你建好的模型展开成平面,别人就可以在那平面上做材质,皮肤等,这些东西.例如展一个正方体的UV, ...

  4. 无需写try/catch,也能正常处理异常

    对于企业应用的开发者来说,异常处理是一件既简单又复杂的事情.说其简单,是因为相关的编程无外乎try/catch/finally+throw而已:说其复杂,是因为我们往往很难按照我们真正需要的策略来处理 ...

  5. RTX Server SDK跨服务器如何调用

    1.   确认安装RTX Server SDK在开发的机器上必须确认已经安装了RTX Server SDK,并且与RTX Server的版本要一致.该计算机后面我们简称SDK计算机. 2.   步骤2 ...

  6. RedHat 6 下配置网卡IP地址,Virtual Linux下配置网卡IP

    经常用到,自己Mark一下,顺带给需要的人参考. 1.配置文件修改 $ vi /etc/sysconfig/network-scripts/ifcfg-eth0 内容: DEVICE="et ...

  7. code1099 字串变换

    BFS 听上去蛮简单的,实际编程复杂度较高(至少一个快睡着的人是这么认为的...) 抄的题解(感谢题解的作者<'_'>): #include<queue> #include&l ...

  8. efcore dbfirst 通过数据库表反向生成model

    创建class library并设置为启动项目 使用nuget控制台,设置当前项目为新建的class library Install-Package Microsoft.EntityFramework ...

  9. Python自然语言处理工具NLTK的安装FAQ

    1 下载Python 首先去python的主页下载一个python版本http://www.python.org/,一路next下去,安装完毕即可 2 下载nltk包 下载地址:http://www. ...

  10. DeepLearning 学习资料

    1 sotfmax 函数: stanford UFLDL: http://deeplearning.stanford.edu/wiki/index.php/Softmax%E5%9B%9E%E5%BD ...