In my last post, I explained how to install Android under VirtualBox. Today, I’ll explain how you can change the screen resolution.
Profile gravatar of Michael Pietroforte

Michael Pietroforte

Michael Pietroforte is the founder and editor of 4sysops. He is a Microsoft Most Valuable Professional (MVP) with more than 30 years of experience in IT management and system administration.
Profile gravatar of Michael Pietroforte

The display resolution after the installation is a bit unusual for tablets and phones. For testing apps, it is better to use a screen size with a typical portrait aspect ratio. It gives you a better impression of how end users experience a certain app, and you can create screenshots in the typical format of mobile devices if you have to send instructions to a user.

In this guide, I used a resolution of 360x640. Depending on the size of your screen, you might choose another format. Unfortunately, changing the resolution of an Android VM is not as easy as with a Windows VM.

VirtualBox Android resolution configuration

  1. Add a custom screen resolution to your VirtualBox VM by opening a command prompt, navigating to your VirtualBox installation folder, and entering the following command:
    VBoxManage setextradata "Android" "CustomVideoMode1" "360x640x16"
    Custom screen resolution
    I assumed here that the name of your VM is Android.
  2. Start the VM and, when the GRUB boot menu appears, select the Debug mode.
    Debug mode
  3. Wait until the Linux boot process is completed, and then press Enter.
    Linux boot up
  4. At the Linux prompt, enter the following commands:
    mkdir /boot
    mount /dev/sda1 /boot
    vi /boot/grub/menu.lst
    Edit GRUB menu.lst
  5. Move the cursor to the first line that begins with kernel /android. In this line, search for “video= -16”.
  6. Press the i key (enables insert mode in the vi editor), and then type UVESA_MODE=360x640.
  7. Press ESC and then SHIFT+ZZ to save the new GRUB boot menu.
  8. Clean up and then restart the VM.
    umount /boot
    rmdir /boot
    reboot –f

From now on, your Android VM should use the new screen resolution.

Android on VirtualBox with changed resolution

Android on VirtualBox with changed resolution

If you want to work with different resolutions, you just have to add the corresponding entries to the GRUB boot menu. Don’t forget to add a custom screen size to the VirtualBox virtual machine (step 1).

Take part in our competition and win $100!


Related Posts

  1. […] Change the screen resolution of an Android VirtualBox VM – 4sysops. […]

  2. avatar
    Ricardo 2 years ago

    Very useful, android on Vbox is the only way to debug

  3. Profile gravatar of Michael Pietroforte
    Michael Pietroforte 2 years ago

    Ricardo, thanks!

  4. avatar
    Tommit 2 years ago

    Can't find -16 string in new virtualbox version grub menu.... should this be added or has logic changed in new version?

  5. Profile gravatar of Michael Pietroforte
    Michael Pietroforte 2 years ago

    Tommit, can you find “video="? What do you see?

  6. avatar
    Tommit 2 years ago

    Will make a copy tomorrow... currently at customers site but there's no video and no -16 anymore using virtualbox 4.3.20

  7. avatar
    Tommit 2 years ago

    Can I send a PM with two small screenshots of menu.lst?
    or to a info@4sysops ?

  8. Profile gravatar of Michael Pietroforte
    Michael Pietroforte 2 years ago

    Tommit, you can such questions in the forum. You can also upload screenshots there.

  9. avatar
    Bill 2 years ago

    running latest 4.4RC2 when I go into debug mode there is no /dev/sda1. Any ideas?

  10. avatar
    mrdeep 2 years ago

    hi dear,
    I have tried this hundreds of times but resolution remaied same.
    when I enter commad "unmount /boot"
    messages displayed is "unmount: not found"
    and when I enter next command "rmdir /boot"
    message is " '/boot': Device or resource busy"

    see the error here
    Please help.

  11. avatar
    tom 2 years ago

    when I enter commad “unmount /boot”...
    Not unmount -> umount without n

  12. avatar
    Jibraan 2 years ago

    Machine stuck at "Detecting Android-x86......"
    what to do?

  13. avatar
    Emmanuel 2 years ago

    looks like the 16 set the color to a lower level that the original one ... How to reduce the resolution but keep the color nice and sharp?

  14. avatar
    Sreenivasa Rajiv 2 years ago

    Thanks Dude !!! U r awesome

  15. avatar
    Tony 2 years ago

    Worked like a charm. Awesome easy guide. Thank you!

  16. avatar
    peer 2 years ago

    The textfragment " video=-16" was not there (android 4.4r3). I looked for the suggested line _x86 SRC=/android-4.4....
    then I put the cursor just before the letters SRC and inserted: video=-16 UVESA_MODE=1280x800
    Then the line becomes: _x86 video=-16 UVESA_MODE=1280x800 SRC=/android-4.4....
    And it works for me!!

  17. avatar
    Nataly 2 years ago

    Hello! Thanks for the article, it very helpfull, but I still need some help there~ Is there any chance to set bit depth to 24 bit? When I set 480x720x24 or 480x720x32 in VirtualBox, android even don't load :c only with x16 bit depth.

  18. avatar
    Sigitas 1 year ago

    Thanks. Super!

  19. avatar
    Mahabubul Alam 1 year ago

    Hello, I installed android on virtualbox but after installation i turned off the machine. T he problem is when i again go to open the device it asks for installation again. Plz solve the problem. Thanks

  20. avatar
    Kevin 1 year ago

    Odd, when I follow the instructions it changes my screen not to 360x640 but to 1024x768x16, but only on the line I altered.  The debug one remained the original size of 720x400 (note the missing x16)

    Running the VM in a windows 7 environment.

    Any ideas?


Leave a reply

Your email address will not be published. Required fields are marked *



Please ask IT administration questions in the forum. Any other messages are welcome.

© 4sysops 2006 - 2017

Log in with your credentials


Forgot your details?

Create Account