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.

Dateimanager Root Browser
Dateimanager Root Browser
Developer: Maple Media
Price: Free
How to Fix Screen rotation by 180 degrees after installing Custom ROMS
The app was not found in the store. 🙁

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.


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.  

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


  1. I have phenoix os installed on i3 based system.and now I tried to rotate screen but not yet successful. Kindly suggest us option

  2. I have phenoix os installed on i3 based system.and now I tried to rotate screen but not yet successful. Kindly suggest us option

  3. I have phenoix os installed on i3 based system.and now I tried to rotate screen but not yet successful. Kindly suggest us option

  4. Hi

    My device is ZTE v5 redbull(v9180). I have installed ES file explorer, but cant switch the root explorer toggle to yes. It says that “this action isnt possible on your device”.

    For now I have temporarily solved this problem. I have changed system language to russian and touched home button. I see that problem solved. Then I changed to english, now its working normal.

    Please write if you know how to switch root explorer toggle on my device.

    Thank you in advance.

  5. ++++++++++++++++ Bingooooooooooooo!! It works. +++++++++++++++++++++++++
    ++++++++++++++++ I really proud of you, +++++++++++++++++++++++++++++++++
    The below line was not there and i make it with the value 180 and after restart i got surprise.
    7. Search for line “ro.sf.hwrotation=’value’” if you didn’t find this line then copy this line at the end of the file.
    ***But I faced another problem,***
    The screen light wont up after it goes to sleeps unless i remove the battery and re insert.
    I hope you smart people also may have a solution for this.
    Thank you

  6. sir
    plz help me
    My Phone Is qmobile noir a500
    mt 6589
    512 mb ram
    480 800 resolution
    sir plz suggest me android l rom plz plz where to i download that rom link and guid plz

  7. When i Put value 90 or 360 No error Occured And Screen Rotates But When i Put value 180 when SYSTEM UI stopped Problem Starts in Loop

  8. Sir After Putting Value 180 i Restart My Phone Now Screen Rotation is Fixed But System UI has Been Stopped Loop Repeat How to Get Rid of it.

  9. Sir I change rotation but nothing happen my mobile screen is inverse
    Model katbann a26 mtk 6572
    Their is three problem on installing custom rom
    1 . screen rotation iinverse
    2. Camera also rotate inverse when I take photo object also inverse but in gallery it is reverse photo
    3. In gallery app I can’t edit it says unfortunately stopped app

    Please help me sir

  10. your battery is over temperature, please remove the battery
    why i am seeeing this message please help