title: How can I project my Android phone screen to my computer monitor?
body: <p>For the sake of a class, I want to give an Android app development demo which I hope I can project whatever displayed on the device to my computer (so that I can further project in front of the class). I was thinking whether ADB has already supported this feature, though I didn't find a desired command in Android Development website yet (<a href="http://developer.android.com/tools/help/shell.html" rel="nofollow noreferrer">link</a>). But I'm aware the following two commands:</p>
  
  <ul>
  <li>screencap</li>
  <li>screenrecord (available on API 19 onward)</li>
  </ul>
  
  <p>For the first <code>screencap</code> command, I can write a bash script and put a while loop to loop over screencap and pull the image to my computer, this answer pretty much did what I just described (<a href="https://stackoverflow.com/a/29701428/4713342">StackOverflow</a>). However, since my target device is Nexus 5 whose screen resolution is 1920x1080, it takes almost 2 seconds to fetch a frame. Is there a way to specify the resolution size of output images?</p>
  
  <p>The second choice is <code>screenrecord</code> command. However, it has to be saved locally (i.e., on the phone) and then pull to the computer to play. Though I'm sure making a streaming record, pulling out to the computer, and playing clips can be pipelined, it has to be imposed a delay of several seconds. What is a good practice to streaming the device display on the computer?</p>
  
  <p>I'm okay with other solutions, in fact, I've also explored AndroidStudio, but it seems streaming is not supported.</p>