adb shell pm命令初识, 禁止应用开机自启动命令

本文介绍了如何取消Android应用的开机自启动功能,通过使用pm命令实现权限撤销。提供了具体的命令示例,并列举了pm命令的多种用法,如安装、卸载、查询已安装的应用等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在论坛看到好多人想取消应用的开机自启动, 于是就想了解是怎么实现的, 可是百度了一下,结果都是怎么让应用开机启动, 对百度搜索资料越来越没有希望了.

最后google得到一个结果,

<span style="font-size:18px;">pm revoke com.android.livevideo  android.permission.RECEIVE_BOOT_COMPLETED</span>

虽然提示(猜测用系统权限就OK)

Operation not allowed: java.lang.SecurityException: Permission android.permission.RECEIVE_BOOT_COMPLETED is not a development permission

但是至少知道是这样去实现, 等会儿就放假了, 先写博文记录下来.

查询得到pm命令的使用方法如下:

Use Android package manager pm
usage: pm [list|path|install|uninstall]
       pm list packages [-f]
       pm list permission-groups
       pm list permissions [-g] [-f] [-d] [-u] [GROUP]
       pm list instrumentation [-f] [TARGET-PACKAGE]
       pm list features
       pm path PACKAGE
       pm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f] PATH
       pm uninstall [-k] PACKAGE
       pm enable PACKAGE_OR_COMPONENT
       pm disable PACKAGE_OR_COMPONENT
       pm setInstallLocation [0/auto] [1/internal] [2/external]

Examples

Install the package com.twitter.android-1.apk from the SD card
pm install /sdcard/com.twitter.android-1.apk
List installed packages that contain the term twitter
pm list packages | grep twitter
Show the install directory of the twitter package
pm path com.twitter.android
http://www.kpbird.com/2013/05/android-shell-command-pm-package-manager.html


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值