解决adb uninstall 卸载应用出现[DELETE_FAILED_DEVICE_POLICY_MANAGER]

1. 普通卸载

  1. 获取应用包名列表
adb shell pm list packages

找到你要卸载应用的,例如com.test.demo

  1. 卸载应用
adb shell  uninstall com.test.demo

如果成功,到此处就结束了,若出现[DELETE_FAILED_DEVICE_POLICY_MANAGER]接着向下看
3、找到要卸载应用的安装路径

adb shell pm path com.test.demo

package:/data/app/com.test.demo/demo.apk
4、挂载系统读写权限

adb remount

出现remount succeeded表示成功了,跳过下述,直接开始第5步
如果出现
Not running as root. Try "adb root" first. remount failed
获取系统root 权限

adb root

restarting adbd as root
成功之后再

adb remount

5、删除apk

adb shell rm /data/app/com.test.demo/demo.apk

6、重启设备

adb reboot

你可能感兴趣的:(解决adb uninstall 卸载应用出现[DELETE_FAILED_DEVICE_POLICY_MANAGER])