Monday, May 18, 2015

settings - Is there are way to change Android's default screen orientation?


I have a general purpose Android computer that has no sensors. It requires an external monitor to view output via HDMI. It always displays in landscape unless the app running specifies portrait.


1) The screen PHYSICALLY needs to be displayed in portrait.
2) The OS always displays in landscape, unless an app overrides orientation.


3) How to change the default (currently landscape) orientation to portrait in the OS?


Is there a setting in Android that determines default orientation or does this require a hack? I have root access.



Answer



Run this from adb shell or from a root terminal:


content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0


Change the value to 1 if you want to go back to Landscape (2 and 3 also work for upside-down portrait and reverse landscape).


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...