Screen keeps rotating on Android 4.4

Discussions about using non Windows and Linux guests such as FreeBSD, DOS, OS/2, OpenBSD, etc.
Post Reply
renatov
Posts: 3
Joined: 23. Dec 2010, 10:25
Primary OS: Debian Lenny
VBox Version: OSE self-compiled
Guest OSses: Other linux distros (for test purposes)

Screen keeps rotating on Android 4.4

Post by renatov »

Hello, I'm emulating Android 4.4 using Virtualbox 5.0.2 (on Ubuntu 14.04). Android was installed successfully and is running just fine, but when I start some applications, the screen will rotate 90° CCW:

Image

When I leave the application, the screen goes back to normal. This problem happens even though screen rotation is locked:

Image

I'm not sure what's going on. Could someone help me, please?
Nekromancer
Posts: 17
Joined: 8. Aug 2009, 20:29
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows (W2K-WXP-W7), Linux, OpenSolaris, Android, Others

Re: Screen keeps rotating on Android 4.4

Post by Nekromancer »

Hi!

I've been using VirtualBox for Android x86 for some time.
The only workaround I've found (from multiple sources) is to create two virtual machines using a single virtual harddisk, and two distinct GRUB entries in Android, one for portrait, another for landscape.

Basically you can start by installing Android in whatever orientation you prefer.
Shutdown the virtual machine, and create a new one using the same virtual harddisk.
I suggest choosing sensible VM names, such as "Droid - Portrait" and "Droid - Landscape" for the VMs.
Then you must configure both for specific video modes:

Portrait virtual machine:

Code: Select all

VBoxManage setextradata "Droid - Portrait" "CustomVideoMode1" "480x800x16"
Landscape virtual machine:

Code: Select all

VBoxManage setextradata "Droid - Portrait" "CustomVideoMode1" "1024x600x16"
Finally, you must edit the GRUB configuration within Android.


EDITION TO CLARIFY:
To edit the grub configuration boot Android x86 in debug mode, when booting stops (you will be in text mode), edit the GRUB configuration using the 'vi' editor (familiarize yourself with the very basics of the 'vi' editor, is powerful and sometimes the only editor available):

Code: Select all

vi /mnt/grub/menu.lst
You can reboot after saving the changes.
[/color]

Portrait boot stanza (you can edit the existing one, remember to rename it to something descriptive):

Code: Select all

kernel /android-4.4-r2/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 SRC=/android-4.4-r2 UVESA_MODE=480x800
Landscape boot stanza (you must add this one, remember to assign a descriptive boot name):

Code: Select all

kernel /android-4.4-r2/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 SRC=/android-4.4-r2 UVESA_MODE=1024x600
Note: change the "4.4-r2" portions according to the Android x86 version you use.

You're free to select any valid VESA mode (Google is your friend), I've chosen the above simply because these work for me and fit nicely into my Linux host screen.
Depending on the application I need to use, I boot either of these. I guess if you've an app which uses both you've problems. Keep in mind this is just a workaround, not real screen rotation (which works, but never the way you intended!); as I use Android mainly to test stuff I don't need the real screen rotation functionality.

Hope that helps!
Kind regards,
rullydotcom
Posts: 1
Joined: 26. Feb 2016, 12:06

Re: Screen keeps rotating on Android 4.4

Post by rullydotcom »

use Rotation Locker app from Play Store
Raven
Posts: 54
Joined: 2. Oct 2008, 18:27

Re: Screen keeps rotating on Android 4.4

Post by Raven »

I have had good results with the app Smart Rotator by SmartDog Studio HK.
Post Reply