Home » Android » sdk – Change Screen Orientation – Android 3.2 on VirtualBox

sdk – Change Screen Orientation – Android 3.2 on VirtualBox

Posted by: admin May 14, 2020 Leave a comment


I am running android 3.2 RC2 eeepc on Virtual Box.
The OS assumes it a tablet and sets the orientation to landscape by delfault.
How can I manually change the orientation between landscape and portrait?

Is there a way to do this through the commandline in the android OS?
Is there a shortcut key like the emulator from AVD Manager?
I tried Numlock off 7 and Ctrl F11. No use. Kindly help

I use the VM to run an app that I am currently building.
My app has many views and most are set to work in both portrait and landscape.
One view is strictly set to portrait. When I launch this, the entire OS turns to portrait.
How to revert to landscape mode?

How to&Answers:

Sadly, VBox is really bad at handling screen orientation. There is no shortcut to change screen orientation on the go I’m afraid. However, there are ways to force the screen into one orientation always. This is however probably not what you were looking for.

You could however try going with BuilDroid – which is a type of addon for VBox to try and support Android as best as possible. It makes sure that screens are “managed”. I have no experience with BuilDroid myself, but it could have what you’re looking for.

Try it out! You can find it here: http://www.buildroid.org/blog/?page_id=121

Alternatively, there’s a blog post giving information on how to change the orientation permanently, as I mentioned before, here: http://davematthew.blogspot.com/2011/09/app-development-with-android-x86-on.html

I have no idea if that helps you either though! But I hope one of these answers your question.

EDIT: The problem seems to have been solved by apps such as the one user2835272 referred to. I have not tried the app personally, but trying “Set Orientation” might be a proper solution for the problem now. Even better, if F9 – F12 works now, that is the functionality that should be used. Again, I haven’t played around with VM Android for a while, so I cannot confirm this.


download apps like “Set Orientation” so u can set it as potrait, lanscape or automatic


Try just using F9 or F11. It worked for me.


I encountered this problem when trying to run QQ on Android 4.4 running in VirtualBox. F9-F12 were ineffective as soon as QQ started. The app “Ultimate Rotation Control” does the trick but does not resize the QQ window. So part of it gets to lie out of the virtual screen. Finally, I ended up redefining the screen size of the virtual Android to 360×640 (portrait) as described here. It seems that QQ detects which side of the screen is longer and rotates according to this. So if you start with a portrait aspect ratio it will not rotate sideways. I do not about other apps, but guess they operate the same way.


If you are trying to set the display to a portrait resolution. There is one way to set the resolution manually in VBox

I set it to 600×800 successfully in Android x86 4.4.
So basically do the following:

  1. VBoxManage setextradata “Android” “CustomVideoMode1” “360x640x16”

  2. Start Android in VBox in Debug mode

  3. At the Linux prompt, enter the following commands:

mkdir /boot

mount /dev/sda1 /boot

vi /boot/grub/menu.lst

Find the line with tile like “Android-x86 4.4”, add “UVESA_MODE=360×640” (replace 360×640 with your resolution) at the end of the line

Save the file.

  1. Clean up and then restart the VM.

umount /boot

rmdir /boot

reboot –f