title: Create shortcut on homescreen using ADB
body: <p><em><strong>EDIT: I should add that the author/maintainer of phoneME has - since this question was created - made it possible to add shortcuts in the app itself. So this post isn't relevant anymore.</strong></em></p>
  <p>I'm running JavaME MIDlets on my Android phone using PhoneME, and it's great.
  To run MIDlets, I have to start the Foundation Profile App, and then choose MIDlet to start.</p>
  <p>I wish to create shortcuts to the MIDlets from my homescreen using ADB, and have been searching a lot. StackOverflow has a few posts about it, but none that gives a clear answer.
  I can't believe it's not possible.</p>
  <p>To start a MIDlet on the phone from my PC using ADB, I can type this:</p>
  <pre><code>./adb shell am start -d file:///sdcard/MyMidlet.jad be.preuveneers.phoneme.fpmidp/.MidletActivity
  </code></pre>
  <p>Is there no ADB command that'll create a shortcut on my homescreen to that command line?</p>
  <p>Thanks</p>
  <p>EDIT:</p>
  <p>I have managed to create a shortcut now using this code:</p>
  <pre><code>Intent shortcut = new Intent(Intent.ACTION_VIEW);
  shortcut.setClassName(&quot;be.preuveneers.phoneme.fpmidp&quot;, &quot;be.preuveneers.phoneme.fpmidp.MidletActivity&quot;);
  shortcut.setData(Uri.parse(&quot;file:///sdcard/MyMidlet.jad&quot;));
  
  Intent intent = new Intent(&quot;com.android.launcher.action.INSTALL_SHORTCUT&quot;);
  intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, &quot;My shortcut&quot;);
  intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcut);
  
  sendBroadcast(intent);
  </code></pre>
  <p>Now the question is, can the above code be written as an ADB command line? If so, how does that command-line look like?</p>
  <p>Thanks</p>