title: How to send broadcast with permission from command line
body: <p>I have a broadcast receiver in a app which uses my permission <code>com.myexample.permission.MY_PERMISSION</code>.</p>
  
  <p>I am able to send the broadcast using</p>
  
  <p><code>sendBroadcast(intent, "com.myexample.permission.MY_PERMISSION")</code> </p>
  
  <p>from activities.</p>
  
  <p>To send a broadcast for action as <code>com.com.myexample.MY_ACTION</code> and extra data with key as <code>MY_EXTRA</code> below command can be used:</p>
  
  <pre><code>$adb shell am broadcast -a com.com.myexample.MY_ACTION
  --ez MY_EXTRA true
  </code></pre>
  
  <p>But how to send broadcast with permission <code>com.myexample.permission.MY_PERMISSION</code> to the app from command line using adb shell commands??</p>