I have my device TI am335xevm running android Jellybean 4.2.2 with Landscape as the default/natural orientation.
How can I change the default/natural orientation of the device 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
This 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?
Note: I have already overridden the bootanimation with own portrait images so that it will look like portrait.Still the rotation after the bootanimation exit occurs. So what will be a generic solution?
Any advices will be appreciated.
Is it something related to SurfaceFlinger? I would also like to point to this article in android website. pre rotation in hardware composer
(FYI - The question is not regarding app/activity orientation but the device natural orientation when you build Android OS for a custom device)