How to Fix Screen rotation by 180 degrees after installing Custom ROMS

How to fix Android Screen rotation by 180 after installing custom rom

A common problem that most users face after rooting their Android phone is the rotation of the screen by 90 degree or 180 degree. The principle reason of this bug or problem is due to improper phone drivers or inappropriate installation of ROM.

We all know that Android being an open source platform has certain bugs. But the best thing is that, these bugs or problems can be fixed with the help of tweaks within the Android platform and also using certain third party softwares. The ever growing Android community always brings out some solutions or means for keeping these problems at bay.

Today in this article we will discuss about the rotation of screen problem that you may see in your device after installing a custom ROM. We will try to put down a comprehensive study about the solution of this problem. Read down till the end of this article if you are facing this annoying problem and want to get rid of it. Before delving into the details of the problem, let us put a few necessary things that you need to know.

Screen Rotation in Android

 Almost every Android device is equipped with a sensor named Accelerometer whose job is to provide information regarding up and down tilts of the phone relative to the ground and change its orientation accordingly. It is worth mentioning that, accelerometer was first introduced by Apple in their flagship iphones. Later this is being used as a key feature by all major smartphone manufacturers.

Screen Rotation Bug in Rooted Android Phones

Most Android users typically root their phones for installing custom ROM. This enables them to have added features and benefits on the device. However, if the root is not being done properly, there are several risks to the phone. One such problem that may be seen in a rooted Android device is the screen rotation bug. This bug messed with your Android device’s screen orientation thereby ruining the overall experience.

The screen either stays in the landscape mode or portrait mode and doesn’t interchange according to the user’s tilt. Though this problem is seen commonly after the phone is rooted with custom ROMs, it can be experienced by unrooted Android users too.

Screen Rotation and Youtube

Youtube is the most popular video sharing social media platform which has its own app for the Android devices. The screen rotation feature of Android phone has a important aspect with the Youtube app. Usually Youtube videos when viewed in portrait mode, it does not fit full screen. However when viewed in the landscape mode, the videos are stretched full screen. This may not be case every time though. Due to the screen rotation bug you might face anomalies while enjoying youtube videos.

Turning Screen Rotation on and Off

The default orientation for your phone’s screen is portrait (vertical), but many apps will change to landscape orientation (widescreen) when you rotate the phone sideways. You might be wondering how to turn screen rotation on and off in your device. Follow the below steps

  1. Pull down the status bar and find the Auto Rotation option.
  2. Tap on Auto Rotate option to turn it on or off. You might be required to scroll little down to find the auto rotate option.

How to fix Screen Rotation bug on Android ROMs

In order to fix this annoying problem, you will be required to edit a system file  named build.prop. Before going into the details about how and what to edit in this file, let us give a couple of details about this system file.

What is build.prop?

Build.prop is a system file that exists in every Android device. It contains build information and other vital system properties that are used throughout the operating system. The build.prop file is loaded during the first boot of the device. Most importantly, this file can be created and edit by the user of the device.

In order to edit the build.prop file, you will be requiring a boot.prop editor which will enable you to edit the file as text. One such editor can be found here. This app will help you in editing the build.prop file or any other system properties of your Android device. It will also help you in keeping backup of the build.prop file of your device.  

Usually build.prop file is not editable in normal ways because you don’t have the required permissions. So in order to edit build.prop, you will need to root the phone. However that may not be true always, as  in unrooted Android devices also, you can edit build.prop file through custom recovery.

How to fix Screen Rotation bug on Android ROMs:

Step 1. In order to start with the process, you will be required to download and install a root file explorer app from the Play Store.

Some of the examples of root file explorer apps are Root Browser and ES file explorer. Both these two apps works fine, but we would recommend using the ES file explorer due to its better user interface.

File Explorer Root Browser
File Explorer Root Browser
Developer: JRummy Apps
Price: Free+
ES File Explorer File Manager
ES File Explorer File Manager
Developer: ES Global
Price: Free+

Step 2.  In the ES file explorer app, go to the fast access menu button that you can find on the top left. Tap on this button and find Tools. Tap on tools and scroll down to locate root explorer. Switch the toggle to yes.

Step 3. Click on the root explorer which will prompt a pop up box for you. There you will have to keep the / path as read only (RO) and /system and /cust paths as rewritable(RW).

After doing the above steps, you can now head on to edit the build.prop file.   

How to edit Build.prop

How to edit Build.prop

Step 1. Now you have enabled root browser relaunch ES File Explorer & Click on above tab showing sd card & Click on ” / Device”.

Step 2. Goto System folder & Open build.prop file as text.

Step 3. Search for the phrase “ro.sf.hwrotation=’value”. You may not find the line. In that case copy and paste it at the end of the file.

Step 4. Replace the word value with the appropriate rotation value Eg. if the orientation of the screen is upside down, then write 180 in place of value. Similarly if the screen is rotated by 90 degree, then enter 270 as the value. It should be kept in mind that the formulae for getting the value is

Value = 360 – Angle of Rotation.

CONCLUSION

So, now that you have known the ways to fix the rotation bug in your Android phone, it will be beneficial if you understand accept the risk of editing the build.prop file. Anyhow, we don’t recommend you to perform all the  above tweaks and also root your phone, if you are a newbie Android user.

By saying that, we would like to state that devsjournal does not take responsibility of any loss in your device due to rooting of the phone or editing build.prop file.  

Related Posts —