title: Is it possible to simulate a GCM receive from the adb shell / am command line? I'm getting an error
body: <p>I'm trying to simulate as if the device is receiving a GCM push message by using adb and the command line. I've tried this command to broadcast a GCM intent:</p>
  
  <pre><code>adb shell am broadcast -c com.myapp -a com.google.android.c2dm.intent.RECEIVE -e data "SomeData"
  </code></pre>
  
  <p>This triggers a "Permission denial" log line though:</p>
  
  <pre><code>09-19 12:23:34.820      725-787/? W/BroadcastQueue﹕ Permission Denial: broadcasting Intent { act=com.google.android.c2dm.intent.RECEIVE cat=[com.myapp] flg=0x10 (has extras) } from null (pid=21244, uid=2000) requires com.google.android.c2dm.permission.SEND due to receiver com.myapp/com.google.android.gcm.GCMBroadcastReceiver
  </code></pre>
  
  <p>Relevant parts of my manifest:</p>
  
  <pre><code>&lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
  &lt;application&gt;
  &lt;receiver
      android:name="com.google.android.gcm.GCMBroadcastReceiver"
      android:permission="com.google.android.c2dm.permission.SEND" &gt;
      &lt;intent-filter&gt;
          &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt;
          &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION" /&gt;
          &lt;category android:name="com.myapp" /&gt;
      &lt;/intent-filter&gt;
  &lt;/receiver&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p><strong>Edit / clarification:</strong> Push / GCM receive works in production. I'm looking for an easier way to test changes.</p>