BroadcastReceiver permission for adb shell

房东的猫 提交于 2019-12-04 23:12:37
Swing

A root shell can send any broadcast protected by any permissions.
A normal shell also has been granted lots of permissions, check this file in the AOSP souce code: frameworks\base\packages\Shell\AndroidManifest.xml.

Replace your any.test.PERMISSION with one permission in this file that the protectionLevel is signatureOrSystem, like android.permission.REAL_GET_TASKS. After that, you can send broadcast to this receiver in shell, but other 3rd app can not.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!