Skip to content

Latest commit

 

History

History
6 lines (6 loc) · 623 Bytes

adb禁用app.md

File metadata and controls

6 lines (6 loc) · 623 Bytes
  • 源码解析参考here
  • 通过阅读源码可以知道
  • shell必须有android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE 权限否则会报以下错误

Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=xxx, uid=2000, package uid=xxxx

  • shell不能使用pm disable 命令禁用组件,只能使用pm disbale-user,否则会报以下错误

Error: java.lang.SecurityException: Shell cannot change component state for xxxx/xxxxx to 2