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

2

11

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.

St answered 5/2, 2015 at 4:5 Comment(5)
You would want to change the orientation of your screen. In good 'old windows simply hit Ctrl+Alt+Arrow key to rotate in that direction. How about this for linux: faqforge.com/linux/rotating-screen-in-ubuntu-and-linux-mintNovak
@Novak Can confirm changing whole screen orientation works, but not ideal. Would be perfect if only VirtualBox window was rotated.St
I think thats kind of a tall order! On a windows platform I've employed the technique of rotating the entire screen and its been good enough for me. I could see from a convenience perspective that it might be nice to rotate just the virtualbox window, but AFAIK that is not possibleNovak
This is not a programming question and should have been asked on SuperUser instead.Severini
Related: #13451731All
C
13

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

Clea answered 16/3, 2016 at 14:53 Comment(3)
Thanks! Especially easy with android x86 because a root shell is accessible with alt+f1Lording
from menu (Virtual machine manager) i select send alt-f1, and i get terminal, how do i get back to gui ? ok for me it ended up being alt-f7Rhythmandblues
Good to know, I tested with Android x86 version 7 on VirtualBox, however apps like TikTok are still crashing. I tried the resolution 600x1040 which partially worked with TikTok on Anbox (Android version 7 also).All
T
10

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

Tectrix answered 20/8, 2015 at 23:39 Comment(3)
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.Harney
@Harney Good point. I wish I'd been mentioned in your reply so I could have edited the answer before it was deleted. The likelihood of the application display name changing seems substantially higher than the Google Play URL being invalidated. I feel like my updated answer mitigates either risk at this point.Tectrix
Simple alternative is to install App Rotator or Smart Auto-Rotate from the appstore and it is free. From the app then we can set any other app to be portrait, landscape, or auto. I post this because it is very useful based on my experience. Thanks, Source: linux.about.com/od/howtos/tp/…Leucippus

© 2022 - 2024 — McMap. All rights reserved.