150

I've seen many posts asking about how to re-size the AVD emulator window, however, I have not found any that work. My emulator is off the top of my computer screen, and I cannot resize it.

How can I resize the AVD emulator window in Android Studio?

MendelG
  • 14,885
  • 4
  • 25
  • 52
user2254532
  • 1,851
  • 2
  • 14
  • 14
  • its not the solution but workaround, download genymotion instead using emulator – Randyka Yudhistira Apr 20 '15 at 01:14
  • Not really an answer, but, as of dec 2017 the UHD 4K monitor is really affordable, and not only solves the 'problem' of the big AVD window, but also makes for easier programming with several windows visible instead of on top of each other. In fact, the target screen on the phone is already full HD, so the IDE might be upgraded to something bigger. As for the OP, in Android Studio 3 there are resizing handles on the AVD, but these do not make it shrink :-( – Roland Dec 13 '17 at 22:15

22 Answers22

213

After the Android Studio 2.2 update, there is no Emulator Tab in Edit Configurations window.

If you want to scale your emulator, you just need to use this keyboard combination:

Windows :

To scale up: Ctrl +

To scale down: Ctrl +

For mac :

To scale up: CMD +

To scale down: CMD +

If what you want is scaling by a percentage or getting a 1:1 display, maybe you should try modifying these two files: (I don't know if this one will work since I didn't have a chance to try.)

C:\Users\YOUR USERNAME.android\avd\Nexus_XX_API_XX.avd\hardware-qemu.ini

C:\Users\YOUR USERNAME.android\avd\Nexus_XX_API_XX.avd\hardware-qemu.ini

Update for 2022:

Please see this answer if the above method doesn't work for you.

Gökhan Mete ERTÜRK
  • 3,378
  • 2
  • 19
  • 23
151

With Android Studio 2 now you can resize your window simply by dragging a corner.

enter image description here

Jorge Casariego
  • 21,948
  • 6
  • 90
  • 97
  • @chengsam tried a lot Bro, but it really didn't! I am on the latest version of the Emulator. – sud007 Oct 17 '16 at 11:53
  • @sud007 I'm using OS X 10.11.6 and Android Studio 2.2.1. When dragging the corner, the extra space will displays white color, and the emulator will resize when you release the cursor. – chengsam Oct 18 '16 at 03:00
  • @chengsam well I am on *OS X 10.10.5* and *AS 2.2.1* but unfortunately, upon releasing the cursor after a drag-in OR drag-out, the layout pops back to the original size; hence no change. – sud007 Oct 18 '16 at 05:35
  • I downloaded latest Android Studio 2.2.2 and its working now on Mac – To Kra Nov 08 '16 at 15:04
  • For sure resizing with mouse is completely different thing from command line option. You can not (or at least it is very complex) to add mouse resizing to batch script for example... Are there modern working solution to resize emulator on startup in batch (shell) script? – Vitalii Mar 16 '18 at 21:07
  • Does anyone know how to reset the size to its native resolution? I resized the window with my mouse but now the image is all blurry. – rozina Jun 08 '18 at 13:14
  • Somehow on Ubuntu it's only possible to shrink it, never expand – ruX Oct 12 '19 at 17:10
  • For those of you who can shrink it and not expand it, only dragging on the corners works to expand it, not the sides. – SIMMORSAL Jun 12 '20 at 18:57
  • if you don't see the frame ui in the latest 2021 version of the emulator / android studio see @jeadonara answer below for how to enable it. – PathToLife Sep 28 '21 at 21:36
46

You can resize your emulator screen

  1. By going (in the top menu of Android Studio) to Run > Edit Configurations

  2. In the left panel of the just opened dialog, choose your application.

  3. In the right panel, choose the General tab, and then go down and check Emulator, and in Prefer Android Virtual Device, choose the virtual device you are currently using.

  4. Now, go the tab Emulator (next to the General tab), and in Additional command line options, write

    -scale 0.X
    

    where X can be for example 25 or 50, which would represent respectively 25% and 50% of original size.

nbro
  • 15,395
  • 32
  • 113
  • 196
james04
  • 469
  • 3
  • 2
  • 3
    @james04 For some reason the `-scale 0.X` didn't work for me. Instead, I had to specify a specific dpi such as `-scale 128dpi`. I hope that helps someone. – UltraSonja Oct 15 '15 at 14:06
  • 24
    I don't see the "Emulator" tab in Run > Edit Configurations in Android Studio 1.5. Any idea where they've moved it? – Michael Nov 27 '15 at 01:42
  • 6
    According to https://developer.android.com/studio/run/emulator-commandline `-scale` option is deprecated – ViliusK Sep 19 '18 at 11:21
  • -scale option is already deprecated. The following command-line options are deprecated: -audio-in -audio-out -charmap -code-profile -cpu-delay -dpi-device -dynamic_skin -enable-kvm -gps -image -keyset -help-keys -help-keyset-file -nand-limits -noskin -no-skin -onion -onion-alpha -onion-rotation -radio -ranchu -raw-keys -scale -shared-net-id -shell-serial -skin -skindir -trace -useaudio---------------> ref: developer.android.com/studio/run/emulator-commandline – Saad Bilal Dec 10 '20 at 07:36
42

On emulator window, go to settings via "..." at the bottom and then choose Settings tab which second from bottom and toggle "show window frame around device" like here

Then resize with your mouse

jeadonara
  • 1,176
  • 10
  • 10
35

Try this on Android Studio:

  1. Go to Run

  2. Click Edit Configurations

  3. From left side, under the Android Application tab, select name of your application

  4. Now, from General tab (in the right panel), go down and check Emulator, and select one emulator from Prefer Android Virtual Device list

    For point 3 and 4

  5. Click on the Emulator tab, and in the entry box Additional command line options, change the scale of the emulator to something of the form -scale 0.X (where X could be for example 40, if you want your emulator to be 40% of the full size)

    enter image description here

  6. Click Ok to save these settings

Edit : On Android Studio 1.5 , this options are removed. Good News is we can directly change the size of the emulator from Android Studio 2.0 (As shown in the introduction video)

Community
  • 1
  • 1
N Kaushik
  • 2,198
  • 18
  • 29
11

Probably a duplicate but my step by step on what I did to get this working.

Environment Windows 10 64-bit on Surface 3 i7 8g ram w 512g hard drive.

Run HAXM config in {android sdks}\Intel\Extra Gave it 4 gig of ram verified its working by going to an admin prompt and running 'sc query intelhaxm'. Status of 4 verified it was happy.

Ran Android Device manager and deleted all images present.

Created new image targeting KitKat 4.4, wqith 768mb of ram

In emulator set scale to be "4 dp to 1 px onscreen"

You'll have to experiment for your particular resolution.

Started the emulator from the device manager. Comes up FAST, and non-docked, and clickable.

Screen shots below.

Healy in Tampa.

enter image description here

Joe Healy
  • 5,769
  • 3
  • 38
  • 56
10

On Android Studio 4, you can enter zoom mode by clicking this button. After dragging the window to the desired size, you can exit zoom mode by clicking it again. zoom mode button

Alexander Wu
  • 433
  • 4
  • 8
8

I have gone through this same issue and recently got perfect solution.

While you creating your own virtual device there is an option for "Start-up size and orientation" ,the default of which is "auto"

You need to select another value according to your need from the drop-down menu and voila...

This worked for me and wish will work for you too.enter image description here

Zahid Hossain
  • 292
  • 1
  • 3
  • 13
  • 1
    This never really worked for me. The suggestions to use -scale 0.X did work however. – 1mike12 Aug 18 '15 at 13:51
  • Actually the above method does the same. It invokes the emulator with -scale 0.X (where X is predefined by the dp selection). For me both worked fine. Just FYI ... – pravin Aug 26 '15 at 13:06
8

Android Studio 1

  1. Got to AVD Manager
  2. Under Actions for the device you want to change click "Edit this AVD"
  3. Change Scale setting

    Android Studio 2

For step two click on the little pencil on the right.

little pencil

AMAN77
  • 6,218
  • 9
  • 45
  • 60
7

This solution is going off of what @james04 did with a minor tweak since specifying the scale as -scale 0.X didn't work for me.

  1. Run --> Edit Configurations --> Emulator tab
  2. Check Additional command line options
  3. Type -scale 128dpi (or some other dpi of your choice; will need to experiment a little to get exactly what you want).

So, basically just replace -scale 0.X with -scale XXdpi.

UltraSonja
  • 881
  • 1
  • 20
  • 33
6

I was getting problem while doing from the methods mentioned.

I will give the way I did, which is different from the given methods.

Follow the steps as given :

  1. Go to Control Panel.
  2. Click on Programs.
  3. Select "Turn Windows feature On or Off".
  4. Check "Telnet Server" and "Telnet Client".
  5. Go to cmd.
  6. Type "cd\" (to move to the main directory).
  7. Now type "telnet localhost 5554" (leaving the quotes and the number is the same as present on top of your emulator).
  8. Now type : window scale 0.x (x as per your requirement eg: window scale 0.5 to get the half screen size).

Hope this helps.

Link : https://www.youtube.com/watch?v=O9bvxlo70IE

  • This is great. I had the same problem in 1.5.1. My problem is that I want to run the emulator on a secondary monitor, but it always opens on the primary one. Moving it the other monitor resulted in a window to big. No scaling in the manager did the trick. This one works like a charm. Thanks!!! – ckn Dec 31 '15 at 05:01
5

!!!! Finally !!!!

For Android studio greater than 2.0

This solution worked for me. Since Emulator tab is not there to scale the screen.

  1. Go to Android virtual device(AVD)
  2. Emulated performance > Graphics - Change it from Automatic to Software.

See Screenshot for better understanding

harsh
  • 577
  • 7
  • 10
5

for mac its CMD + UP. Tested on Android Studio 3.1

Michael
  • 183
  • 2
  • 10
  • 1
    Word to word copy of [this comment](https://stackoverflow.com/questions/29737499/how-can-i-resize-the-avd-emulator-window-in-android-studio#comment86462898_39894182) – iDecode Aug 26 '22 at 17:49
4
  1. Open "Task Manager" look for the process running the AVD. In my case "qemu-system-x86_64.exe"

Task Manager Screenshot

  1. Right click on the process and choose "Open containing folder"
  2. Right click the file "qemu-system-x86_64.exe" to open file properties
  3. In the properties window select "Compatibility" tab Properties window

  4. Select change High DPI settings enter image description here

  5. Under "High DPI scaling override". Check "Override high behavior" and Select "System"

Worked for me on a surface book

4

Starting with Android Studio 4.1, scaling the standalone emulator is not possible (or if it is, it's not straightforward), but there is a workaround:

You can configure Android Studio to run the emulator in a tool window, and, within that, the emulator adapts to the available space. If you change the tool window's view mode to "Float" or "Window" (small settings icon in the upper right) you get a fully resizable standalone emulator window. The only difference is the window frame drawn around it.

Android Studio -> Preferences... -> Tools -> Emulator -> Launch in a tool window

Update: The latest version of the emulator (30.5.3) now also allows you to resize the UI when run in standalone mode. Make sure you select "Show window frame around device" in the emulator settings.

  • 1
    It would be "File -> Settings -> Tools -> Emulator -> Launch in a tool window" in Windows 10/11. – Alex Nov 03 '21 at 19:04
3
  • For Mac:

    • pressed cmd + up to scale up

    • pressed cmd + down to scale down

  • For Windows:

    • pressed ctrl + up
    • pressed ctrl + down

`

Muhammad Fauzi Masykur
  • 1,994
  • 1
  • 15
  • 18
2

This is situational for me: My setup: MacBook Pro (Retina: 2880x1800) + 27' ASUS Monitor (1920 x 1080) + Startup size and orientation in AVD Manager set to Auto.

There are 2 situations in which I can start emulator:

1) With ASUS monitor attached to Macbook Pro

This results in an emulator window that fits my ASUS monitor in height. If I move the emulator window over to MacBook - it does not resize properly - part of the emulator window is hidden.

2) No monitor attached to MacBook Pro

This results in an emulator window that fits my MacBook Pro in height. This is ideal because I can now reattach the big ASUS monitor and the window is still a comfortable size.

This leads me to conclude that in the case of multiple displays - Android Studio philosophy is to pick the largest size and size the Emulator window accordingly.

So I guess Android Studio bug fix/enhancement can be to reset emulator window size based on detecting a different resolution when it is moved between displays of different resolution/dpi/ppi.

I have submitted a bug report to AOSP here: https://code.google.com/p/android/issues/detail?id=187327&thanks=187327&ts=1443045686

dessertcook
  • 361
  • 3
  • 5
2

With older versions of Android Studio, adding -scale 0.5x to the additional command line options worked like a charm.

But with Android Studio v1.5.1, The Emulator tab is missing in the Rn/Debug Configurations window.

Has anyone else encountered the same thing?

As of now, I'm starting the emulator from Command Line with the -scale option to make it work.

./emulator -avd NEXUS_9_API_19 -scale 0.4

xaxist
  • 598
  • 5
  • 9
1

Concerning the resizing, there are plenty of good answers here. But for moving the emulator window with the keyboard it is as easy as pressing [ALT] + [Spacebar] and move the window around with the arrows.

This is a good trick for any kind of apps.

1

Yet another way in AndroidStudio. Open the terminal from the bottom status bar.

Enter the following, changing the path and avd name to match your environment.

C:\android-sdk\tools\emulator.exe -scale 0.25 -netdelay none -netspeed full -avd Nexus_6_23

Note: The scale can be refined as needed

Noah
  • 15,080
  • 13
  • 104
  • 148
  • 2
    According to https://developer.android.com/studio/run/emulator-commandline `-scale` option is deprecated – ViliusK Sep 19 '18 at 11:25
1

Unfortunately, -scale and -dpi-device flags have been deprecated with Emulator 2.0.

(http://tools.android.com/recent/emulator20previewreleasenotes)

25.0.7
Add warning messages for deprecated window size flags. ("-scale" and "-dpi-device")

25.0.6
The deprecated “-scale” parameter will now be ignored. (b.android.com/200522)

25.0.5
Removed the "-scale" flag and "window scale" commands. (b.android.com/199843)

I think the best workaround for now, modu's answer. The usage CTRL+ Up and CTRL + Down

Community
  • 1
  • 1
efkan
  • 12,991
  • 6
  • 73
  • 106
0

For those who want a cmd line way, create a shell script (this example uses window_scale.sh) in your path with this content:

#!/bin/bash
if [ $# != 1 ]; then
    echo usage: $0 scale
    exit 1
fi
echo "window scale $1" | nc localhost 5554

Then just type the following command to resize the window to whatever you want:

$ window_scale.sh 0.4
DustinB
  • 11,037
  • 5
  • 46
  • 54