pm命令
来源:互联网 发布:js goto语句 编辑:程序博客网 时间:2024/06/05 05:22
使用as开发时,发现并不是使用的adb命令安装apk,而是使用的pm命令进行安装。
1、pm用法
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] [PATH] pm install-create [-lrtsfdp] [-i PACKAGE] [-S BYTES] 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 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 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 [--profileOf USER_ID] [--managed] USER_NAME pm remove-user USER_ID pm get-max-users2、各命令用法意思
pm list permission-groups 列出所有权限分组信息
pm list permissions列出所有的权限
两者区别,查看http://blog.csdn.net/feng88724/article/details/6409313
pm list instrumentation 列出测试样例
相关文章http://www.cnblogs.com/carbs/archive/2013/01/12/2857596.html,http://www.oschina.net/question/54100_27061
pm list features 列出软,硬件特性
相关文章http://blog.sina.com.cn/s/blog_48d491300100zmwf.html
pm list libraries 列出运行库,不理解
pm path PACKAGE 查看apk路径
pm dump PACKAGE 实时的打印出进程关键结构变量的状态和累计值,在不重装和重启进程的现场,为开发者提供
原生态的关键信息和重要数据,引用该文章http://blog.chinaunix.net/uid-16459552-id-3513320.html
pm install 、 pm uninstall 和adb install,uninstall相似
后面一些命令,后续学习再补上
3、具体参数用法
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 with the given PACKAGE.pm install: install a single legacy packagepm 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 -S: size in bytes of entire sessionpm install-write: write a package into existing session; path may be '-' to read from stdin -S: size in bytes of package, required for stdinpm install-commit: perform install of fully staged sessionpm install-abandon: abandon sessionpm set-installer: set installer package namepm 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 mediapm 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 mediapm 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
0 0
- pm 命令
- pm命令
- pm命令详解
- android pm命令
- android am pm命令
- android pm 命令总结
- android am pm命令
- android am pm命令
- adb、pm命令、root
- ---------------android am pm命令
- Android am & pm 命令
- adb pm命令
- Android pm命令使用方法
- am,pm命令
- android adb pm命令
- Android pm命令详解
- android pm命令实现
- Pm命令用法
- HDU-5662 YJQQQAQ and the function (枚举&&单调栈)
- 后台运行
- iOS多线程-SDWebImage简单介绍 1 设置imageView的图片 (内存缓存&磁盘缓存) 1 [cell.imageView sd_setImageWithURL:[NSURL URL
- 如何回答「有什么问题要问我」?【面试核心问题9】
- 桶式排序(C语言)
- pm命令
- Python collections OrderedDict
- 【问题解决】Error:Cause: org/gradle/api/publication/maven/internal/DefaultMavenFactory
- 5. PDO 数据库封装
- js作用域Scope
- python之sys
- 图像处理——物体替换
- Anaconda:search and install package
- Android四大组件详解