- >adb shell pm
- usage: pm list packages [-f] [-d] [-e] [-s] [-3] [-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 [0/auto] [1/internal] [2/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.
- -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 <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.
- 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
list packages [options] filter
输出所有软件包,或者,仅输出包名称包含filter
中的文本的软件包。
选项:-f
:查看它们的关联文件。-d
:进行过滤以仅显示已停用的软件包。-e
:进行过滤以仅显示已启用的软件包。-s
:进行过滤以仅显示系统软件包。-3
:进行过滤以仅显示第三方软件包。-i
:查看软件包的安装程序。-u
:也包括卸载的软件包。--user user_id
:要查询的用户空间。
list permission-groups
输出所有已知的权限组。list permissions [options] group
输出所有已知权限,或者,仅输出 group 中的权限。
选项:-g
:按组加以组织。-f
:输出所有信息。-s
:简短摘要。-d
:仅列出危险权限。-u
:仅列出用户将看到的权限。
list instrumentation [options]
列出所有测试软件包。
选项:-f
:列出用于测试软件包的 APK 文件。target_package
:列出仅用于此应用的测试软件包。
list features
输出系统的所有功能。list libraries
输出当前设备支持的所有库。list users
输出系统上的所有用户。path package
输出给定package
的 APK 的路径。install [options] path
将软件包(通过 path 指定)安装到系统。
选项:-l
:安装具有转发锁定功能的软件包。-r
:重新安装现有应用,保留其数据。-t
:允许安装测试 APK。-i installer_package_name
:指定安装程序软件包名称。-s
:在共享的大容量存储(如 sdcard)上安装软件包。-f
:在内部系统内存上安装软件包。-d
:允许版本代码降级。g
:授予应用清单文件中列出的所有权限。
uninstall [options] package
从系统中移除软件包。
选项:-k
:移除软件包后保留数据和缓存目录。
clear package
删除与软件包关联的所有数据。enable package_or_component
启用给定软件包或组件(作为“package/class”写入)。disable package_or_component
停用给定软件包或组件(作为“package/class”写入)。disable-user [options] package_or_component
选项:--user user_id
:要停用的用户。
grant package_name permission
向应用授予权限。在运行 Android 6.0(API 级别 23)及更高版本的设备上,可以是应用清单中声明的任何权限。在运行 Android 5.1(API 级别 22)和更低版本的设备上,必须是应用定义的可选权限。revoke package_name permission
从应用中撤销权限。在运行 Android 6.0(API 级别 23)及更高版本的设备上,可以是应用清单中声明的任何权限。在运行 Android 5.1(API 级别 22)和更低版本的设备上,必须是应用定义的可选权限。set-install-location location
更改默认安装位置(注:此命令仅用于调试目的;使用此命令会导致应用中断和其他意外行为。)。位置值:- 0:自动—让系统决定最佳位置。
- 1:内部—安装在内部设备存储上。
- 2:外部—安装在外部介质上。
get-install-location
返回当前安装位置。返回值:- 0 [auto]:让系统决定最佳位置。
- 1 [internal]:安装在内部设备存储上
- 2 [external]:安装在外部介质上
set-permission-enforced permission [true|false]
指定是否应强制执行给定的权限。trim-caches desired_free_space
减少缓存文件以达到给定的可用空间。create-user user_name
使用给定的 user_name 创建新用户,输出新用户的标识符。remove-user user_id
移除具有给定的 user_id 的用户,删除与该用户关联的所有数据。get-max-users
输出设备支持的最大用户数。
当前文章价值9.93元,扫一扫支付后添加微信提供帮助!(如不能解决您的问题,可以申请退款)
你可能感兴趣的文章
来源:每日教程,
每日一例,深入学习实用技术教程,关注公众号TeachCourse
转载请注明出处: https://teachcourse.cn/07131624-adb-shell-pm ,谢谢支持!
转载请注明出处: https://teachcourse.cn/07131624-adb-shell-pm ,谢谢支持!
Python库Flask和SQLite数据库创建简单CRUD(创建、读取、更新、删除)应用的示例
下面是一个使用Flask和SQLite数据库创建简单CRUD(创建、读取、更新、删除)应用的示例。假设我们要创建一个简单的博客系统,包含文章标题和内容...
微信开放平台开发之闪退问题解决办法
这篇文章主要介绍微信开放平台使用过程中需要注意的一些问题,比如导包出错,微信分享出现闪退和支付不成功的问题,并针对这些问题做了一点总结,希...
python转换markdown为html表格高亮
1. 安装markdwon
安装markdwon,执行命令
pip install markdown
2. 转换为html
读取.md文件(注意中文),指定encoding编码为UTF-8
with open(f...
ubuntu写入权限(W)和执行权限(X)
需求
站点上传图片的目录,容易成为攻击的对象,经常出现警告,被植入“病毒”,加强权限控制。
权限控制
图片上传目录uploads及其子目录只分配读...
Android学习笔记五:内存泄露
一、造成内存泄露的原因分析
Android系统虚拟机的垃圾回收是通过虚拟机的GC机制来实现的,GC会选择一些存活的对象作为GC Root,通过对GC的可达性...
Python实现提取文章关键字
虽然您提供的信息提到有一段适用于英文文章的高效Python代码,但没有直接提供具体的代码细节。不过,基于常见的文本处理和自然语言处理方法,我...
Android开发之枚举(Enum)在实际项目中的应用
摘要:
谈起枚举(enum),我脑海里立即呈现出一周有七天(Mon、Tues、Wed、Thur、Fri、Sat、Sun)和一年有四季(Spring、Summer、Autumn、Winte...
Android开发之TextView控件设置颜色切换器的问题
在开发新闻类的APP中,使用TextView制作Tab导航过程中,遇到Tab导航无法切换的问题
Python库tkinter常用语法和示例说明
Python的Tkinter库是内置的标准GUI(图形用户界面)工具包,用于快速创建桌面应用程序。以下是一些Tkinter库的常用语法和示例说明:
1. 导入库
...
ubuntu统计访问次数最多的IP,分析打印内容含义
root@Ubuntu:~# awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -nr | head -n 10
243099 194.164.60.90
139680 159.65...