title: DesiredCapabilities for Appium AndroidDriver
body: <p>I am a Programmer with fair amount of exposure in automation. Currently I am working on Appium. I have gone through documentation of Appium and able to run the test cases on the Android Virtual Device, Physical Device and GenyMotion. However I am still not in clear about following desired capabilities.</p>
  
  <p>1) UDID</p>
  
  <p>It stands for Unique Device Identifier for the physical devices we connect. 
  I have two questions for this.
  (a) Is it the same identifier when we connect a physical device and run "adb devices"?
  (b) Can we use this for Emulator/Simulator or an AVD? I have seen many code snippets over internet which use it for emulators like below.</p>
  
  <pre><code>capabilities.setCapability("udid", "emulator-5554");
  </code></pre>
  
  <p>2) deviceName</p>
  
  <p>(a) How to find Device name?
  (b) Is there any command line tool which returns the names of all the connected devices?
  (c) Is UDID and Device name same? or these are two entirely different things?
  (d) Can there be a device name for a virtual device?</p>
  
  <p>I have seen the snippets of code which use the value for deviceName same as UDID for an emulator.</p>
  
  <pre><code>capabilities.setCapability("udid", "emulator-5554");
  capabilities.setCapability("deviceName", "emulator-5554");
  </code></pre>
  
  <p>Also I have seen many snippets of code online which use values like "Android Emulator", "Emulator" and "Android" and also "Nexus".</p>
  
  <p>3) avd</p>
  
  <p>(a) Do we have to pass the name that we set for our virtual device as a value to this parameter?
  (b) If we use this, do we have to use device or udid?</p>
  
  <p>4) deviceType and device</p>
  
  <p>These two capabilities are not listed in the Appium documentation, yet I have seen many code snippets using this as below.</p>
  
  <pre><code>capabilities.setCapability("deviceType", "phone"); 
  capabilities.setCapability("device", "Android"); 
  </code></pre>
  
  <p>Can anyone please help?</p>