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.

5
  • 3
    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-mint
    – chiliNUT
    Feb 5, 2015 at 4:09
  • 1
    @chiliNUT Can confirm changing whole screen orientation works, but not ideal. Would be perfect if only VirtualBox window was rotated.
    – Aprel
    Feb 5, 2015 at 4:26
  • 1
    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 possible
    – chiliNUT
    Feb 5, 2015 at 4:31
  • This is not a programming question and should have been asked on SuperUser instead. Feb 26, 2016 at 14:38
  • Related: stackoverflow.com/questions/13451231/…
    – baptx
    Jun 18, 2021 at 11:39

2 Answers 2

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

3
  • 1
    Thanks! Especially easy with android x86 because a root shell is accessible with alt+f1
    – STM
    Jan 4, 2018 at 18:48
  • 1
    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-f7
    – Pieter
    Aug 3, 2019 at 9:35
  • 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).
    – baptx
    Jan 2, 2021 at 15:28
10

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

3
  • 1
    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.
    – rcs
    Aug 21, 2015 at 0:04
  • @rcs 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.
    – opello
    Sep 23, 2015 at 4:19
  • 1
    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/… Jul 1, 2016 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.