How to send broadcast with permission from command line

前端 未结 3 1414
情深已故
情深已故 2021-02-10 05:38

I have a broadcast receiver in a app which uses my permission com.myexample.permission.MY_PERMISSION.

I am able to send the broadcast using

se

3条回答
  •  鱼传尺愫
    2021-02-10 05:56

    Use arg --receiver-permission which belongs to subcmd broadcast:

    adb shell am broadcast -a com.com.myexample.MY_ACTION --receiver-permission com.myexample.permission.MY_PERMISSION
    

提交回复
热议问题