Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 704
Aprel Avatar asked Feb 05 '15 04:02

Aprel


People also ask

How do I manage screen orientation on Android?

If you want to manually handle orientation changes in your app you must declare the "orientation" , "screenSize" , and "screenLayout" values in the android:configChanges attributes. You can declare multiple configuration values in the attribute by separating them with a pipe | character.

How do I lock orientation in Android programmatically?

setRequestedOrientation(ActivityInfo. SCREEN_ORIENTATION_LANDSCAPE); Called on an activity, will lock it to landscape.

How do I change the orientation of an Android app?

On the main screen of Rotation Manager, select an orientation by tapping on either the vertical or horizontal icons next to a specific app to lock it into either landscape or portrait mode. Highlighting both icons will allow that particular app to auto-rotate.


2 Answers

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

like image 160
alrama Avatar answered Oct 15 '22 22:10

alrama


I found that Rotation Locker (com.devasque.rotationlocker) solved the problem for me. Via this mailing list post.

like image 37
opello Avatar answered Oct 15 '22 22:10

opello