title: Android: How to use "adb shell wm" to simulate other devices
body: <p>So I bought a Nexus 10 for development and was super excited by the prospect of being able to simulate other devices using the "adb shell wm" command, with its size, density, and overscan subcommands.</p>
  
  <p>However, I've had a few problems making this work. I'd like to see if anyone else has encountered/overcome these. For the sake of this discussion, let's say I'm trying to simulate a typical phone, running the following:</p>
  
  <pre><code>adb shell wm size 800x480
  adb shell wm density 240
  adb shell wm overscan reset
  </code></pre>
  
  <p>First, setting the size messes up the menu bar. In portrait mode, only some of the buttons will be present and at the wrong scale, and in landscape mode, the menu bar is completely missing. In fact, even after you reset everything, it's still missing until you restart the device. Any workaround for this? </p>
  
  <p>Secondly, what does the overscan command do? I can't find any documentation for it anywhere.</p>
  
  <p>Thirdly, is there any way to make the device render the screen using 1 pixel of the new size to 1 pixel of the physical screen? That is to say, if I set the size to 800x480, I'd like to see the new screen take up exactly that much space. Instead, what seems to happen is the 800x480 screen is stretched so that the longest side just fits on the physical display. I suspect that overscan might be the answer, but when I tried to set it to 0,0,800,480, it permanently hung my system and I had to reset to the factory image to recover.</p>
  
  <p>Finally, is there any way to cause the tablet to simulate a phone in terms of what happens to the menu bar during an orientation change? On a tablet, the menu bar goes to new bottom of the screen, but on a phone, it stays where it is. </p>
  
  <p>I like this device so far, but if I could just get this device simulation stuff working, I'd love it! Thanks in advance for any pointers.</p>