How to deal with apps that force screen orientation in android-x86 on VirtualBox?

Aprel picture Aprel · Feb 5, 2015 · Viewed 20.6k times · Source

If you've used an Android device, you're aware that there are some apps that force the display to portrait and ignore the device's orientation sensor. On a real device, this is not a problem, as you can physically rotate the device in your hands to use the app.

However, I am trying to use such an app on android-x86 in Oracle's VirtualBox on a Linux Mint PC, and cannot physically rotate my monitor. I have tried the f9-f12 keys that send a rotation event to the app, but since the orientation is fixed, this has no effect.

Short of keeping my neck cricked at a 90° angle, how might I configure android-x86, VirtualBox, and/or Linux to display the app right side up? To be clear, I don't have access to the source code of the app.

Answer

alrama picture alrama · Mar 16, 2016

For sure now is too late to reply, anyway I discovered that I can rotate back my vd resetting resolution of screen on the fly. If my device is 1200x800 (landscape) and it is rotated left by an app I can get it vertical by shell comamnd: (adb shell) wm size 800x1200