常用的用法:

查看已经安装的包

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. MongoDB动态条件之分页查询

    一.使用QueryByExampleExecutor 1. 继承MongoRepository public interface StudentRepository extends MongoRepo ...

  2. Cassandra读写性能测试

    1. 测试目的 测试Cassandra集群读写TPS的极值,确定Cassandra读写性能. 2. 测试环境 2.1 硬件信息 CPU 8核 Intel(R) Xeon(R) CPU E5-2650 ...

  3. 网站转为https协议,苹果商店应用转为https协议总结

    log_format www.44755.com '$remote_addr - $remote_user [$time_local] "$request" ' '$status ...

  4. react native android 真机调试

    http://localhost:8081/index.android.bundle?platform=android 晕死,设备掉线了 C:\Users\ZHONGZHENHUA\.android\ ...

  5. 【LA2238 训练指南】固定分区内存管理 【二分图最佳完美匹配,费用流】

    题意 早期的多程序操作系统常把所有的可用内存划分为一些大小固定的区域,不同的区域一般大小不同,而所有区域的大小之和为可用内存的大小.给定一些程序,操作系统需要给每个程序分配一个区域,使得他们可以同时执 ...

  6. Eclipse设置Tab键缩进4个空格的步骤,也就是按一下Tab键输出四个空格

    Eclipse设置Tab键缩进4个空格的步骤,也就是按1下Tab键输出4个空格,步奏如下 1.点击 window->preference-,选择 General->Editors-> ...

  7. XPath在python中的高级应用

    XPath在python的爬虫学习中,起着举足轻重的地位,对比正则表达式 re两者可以完成同样的工作,实现的功能也差不多,但XPath明显比re具有优势,在网页分析上使re退居二线. XPath介绍: ...

  8. SQL 中怎么查询数据库中具有的表、存储过程、试图数目、总触发器数、作业数

    用户表:select count(*) 总表数 from sysobjects where xtype='u' 刚才那个是用户表,下面这个是系统表加用户表: select count(*) 总表数 f ...

  9. leetCode--towSum

    题目链接:https://leetcode.com/problems/two-sum/description/ 此题的意思是:给定一个target值,从给定的数组中找两个数,使得这两个数的和==tar ...

  10. HBase表的memstore与集群memstore

    一直有一个问题,今天调查了一下源码算是明白了. ===问题=== 通过java api(如下代码所示)在创建表的时候,可以通过setMemStoreFlushSize函数来指定memstore的大小, ...