Sample Header Ad - 728x90

How to change Android default-natural orientation?

4 votes
3 answers
31479 views
I have my device running android Jellybean 4.2.2 with Landscape as the default/natural orientation. How can I change the default/natural orientation of the same to portrait? Here is what I have tried till now, 1) Added **setprop ro.sf.hwrotation 90** to build.prop and it did nothing. 2) changed **user_rotation** value in **/data/data/com.android.providers.settings/databases/settings.db** and it changed the orientation of apps only. the orientation of Home screen and launcher are still landscape. 3) Modified PhoneWindowManager.java similar to the one given in link : changing phonewindowmanager to change natural orientation The third option works. But it still shows the bootanimation in landscape and after the animation is finished, the display rotates(with rotate animation) to portrait. How can I avoid this rotation and change the default/natural orientation before boot animation? Is it something related to SurfaceFlinger? I would also like to point to this article in android website. pre rotation in hardware composer
Asked by Rockcollins (141 rep)
Apr 16, 2014, 09:29 AM
Last activity: May 12, 2021, 08:05 PM