How to resize the AVD emulator (in Eclipse)?

I'm writing my first Android app for a small business that has some Droid phones. I set up an AVD for the phone with the right resolution: 854 pixels high.

I'm working on a MacBook Pro with a max screen resolution 900 pixels high, so when the emulator starts up, the bottom is cut off.

Is there a way to scale the emulator display down to 75% or something so that it fits on my screen? Any other solution (other than running everything on the phone itself)?


Solution 1:

This is actually possible from your project as well, no need to start the emulator through the AVD manager:

  1. Go to Run > Run Configurations... > (Select your application on the left hand side) > (Click the "Target" tab on the right hand side).

  2. At the bottom there, you'll see Emulator launch parameters. In the additional emulator command line options, add '-scale 0.75' (to make the screen 75% of full size)

Next time you start the emulator it will have scaled properly.

Solution 2:

From within Eclipse:

  1. Go to Window > Android SDK and AVD Manager > Virtual Devices

  2. Select the AVD you want to launch and click Start

  3. Check the Scale display to real size button

  4. Enter how big you want it to appear in inches and press Launch. For this to work, you'll have to also enter a reasonable approximation of your mac's screen resolution. I'm using 7 inches and 113 dpi for my 13" Macbook Pro, but you may be able to get away with 8 or 9 inches.

Solution 3:

There is also a way to re size the emulator through a windows command prompt.

  1. From command prompt run: telnet localhost 5554
  2. window scale 0.75
  3. quit

Assuming there is one emulator running with on port 5554.

Solution 4:

The telnet answer above is great for Android Studio developers. I just wanted to add that the window scale command will take either a scale factor OR the dpi which may be easier for many people (measure once and it should work for you ADV which are 1dp:1 pixel)

telnet localhost PortNumOfAVD
window scale 96dpi
quit

Note telnet is not installed on windows by default anymore.

Solution 5:

For Changing the window size of the Android Emulator

Append the parameter -scale ­­<scale factor> to the Emulator launch parameters. In eclipse, put it in the field "Additional Emulator Command Line Options" within the Run Configuration.

Allowed scale factors are those between 0.1 and 3, although the most common will probably be -scale 0.5 .