Options for enabling Portrait mode/Rotation without using VirtualBox

1,113 views
Skip to first unread message

Chris Gay

unread,
Nov 30, 2017, 2:27:39 PM11/30/17
to Android-x86
I have a large touch screen that I want to set up as a kiosk. I have a built version of the 7.1 RC2 of Android-x86. I also have an app that will auto-rotate to Portrait mode. Unfortunately, when I install the app onto my device running said build, it does not switch to Portrait mode. All of the resolutions for the screen are width x height, so I cannot change the resolution via GRUB menu easily (please inform me if I am missing something to enable this). Ultimately I want to enable Portrait mode, with a preference of not rebuilding the ROM (the computer I built it on is slow and often fails/hangs). Any and all help would be appreciated!

Thanks in advance,
Chris Gay

Chih-Wei Huang

unread,
Nov 30, 2017, 10:53:37 PM11/30/17
to Android-x86
See https://groups.google.com/d/msg/android-x86/efgnq9xA5aQ/9qaU4F7PAwAJ

I may need to add a kernel cmdline option to configure it.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Chris Gay

unread,
Dec 4, 2017, 8:09:25 PM12/4/17
to Android-x86
Thanks for the link Chih-Wei! Unfortunately I rebuilt a few times with the changes to the init.sh and I am not able to enable Portrait mode. Do I need to specify the proper matrix as well? Here are my modifications in init.sh, init_hal_sensors():

    has_sensors=true
    set_property ro.hardware.sensors $hal_sensors
    #[ "$hal_sensors" != "kdb" ] && has_sensors=true
    set_property config.override_forced_orient $has_sensors

Please note that I attempted to comment out the boolean check for "kbd" as that was false (i.e the value WAS "kdb") for my case to force the setting of the property. I verified via adb shell that the config.override_forced_orient property was set to true as well. Thanks for your assistance!
Reply all
Reply to author
Forward
0 new messages