title: ADB: Libraries to simulate bluetooth device
body: <p>I want to simulate a Bluetooth headset being connected to a phone, to see how my code reacts to the intents and the connection as a whole. I'm testing on a real device connected via USB, in Eclipse.</p>
  
  <p>I have been able to simulate the pressing of a "media button" by running the following:</p>
  
  <pre><code>adb shell input keyevent &lt;keycode&gt;
  </code></pre>
  
  <p>I was hoping for something similar, where I can set the device name, device class etc and trigger it?</p>
  
  <p>Running the following produces instructions on various calls that can be made to adb:</p>
  
  <pre><code>adb shell am start
  </code></pre>
  
  <p>The way to trigger an intent "ACL_CONNECTED" is by typing this:</p>
  
  <pre><code>adb shell am broadcast -a android.bluetooth.adapter.action.ACL_CONNECTED
  </code></pre>
  
  <p>further options can be added in the command, as per the instructions from above.</p>
  
  <p>The problem is, I want to simulate all the functionality of a Bluetooth device, not just the few intents it triggers. In other words, I want a dummy Bluetooth device which is indistinguishable from a real device from the phone's point of view.</p>