Resizing and Running Android Studio 2 Emulator using Telnet, Terminal, Command Prompt

One way to resize is to go to avd manager then click on pen icon to edit. Now change the scale settings based on screen resolution. Android studio use to have emulator configuration options in which I could pass arguments such as “-scale 0.8” to scale the emulator. But as of this writing Android studio no longer has that option. Another option is to connect via telnet and pass commands to it. Also more options are available read this.

Using Telnet:

First go to programs and features then select Telnet Client and Server then apply. Now open command prompt and type “telnet localhost 5554” if it is the first instance of the emulator. Increment by two for the next one and so on if multiple instances are running.

Type telent commands carefully. After making typo in command then fixing by backspace and insert doesn’t work. Just press enter and reenter the commands.

android emulator telnet scale command
android emulator telnet scale command

 

Using Terminal:

For using terminal and command prompt to run and scale the emulator the easiest thing to do is first do a run using the play button. No need to wait for the emulator to load. Just note the emulator path with its arguments in the run tab bottom of the screen.

Copy the whole command and go to terminal tab on android studio. Now paste it in terminal and change the scale factor.

android emulator path with arguments
android emulator path with arguments
paste emulator run command in terminal
paste emulator run command in terminal
change the scale factor of emulator run command in terminal
change the scale factor of emulator run command in terminal

 

Using Command Prompt:

Just open command prompt and paste in the same command copied as above. Then just change the scale part to best suit your screen resolution.

 run and scale android studio emulator from command prompt

run and scale android studio emulator from command prompt

 

Further Reading:

Read using the Emulator Console Part.
http://developer.android.com/tools/devices/emulator.html

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s