adb shell pm disable <pkg> 命令详解

禁用应用或组件(需 root;非 root 请改用 disable-user)

命令语法

adb shell pm disable <pkg>高危

禁用应用或组件(需 root;非 root 请改用 disable-user)

示例

$ adb shell su -c 'pm disable com.example.demo'

adb shell pm disable <pkg> 用法说明

adb shell pm disable <pkg> 是「应用管理」分类下的常用命令,作用是:禁用应用或组件(需 root;非 root 请改用 disable-user)。

典型用法如下:adb shell su -c 'pm disable com.example.demo'。你可以复制到终端直接运行,或查看下方同组的相关命令。

常见问题解答

adb shell pm disable <pkg> 是什么?
adb shell pm disable <pkg> 用于禁用应用或组件(需 root;非 root 请改用 disable-user),属于「应用管理」相关命令。
adb shell pm disable <pkg> 怎么用?
在终端执行 adb shell su -c 'pm disable com.example.demo' 即可,具体参数请按实际环境调整。
还有哪些相关命令?
「应用管理」分类下还有 25 条相关命令,见下方「相关命令」。