Lockscreen Rotation Android 4.2.x

Search This thread

xaueious

Senior Member
Dec 17, 2009
980
176
Toronto
Force enable lockscreen rotation
Code:
setprop lockscreen.rot_override true

Force disable lockscreen rotation
Code:
setprop lockscreen.rot_override false

On devices that already can rotate, this does nothing.


Code should work on all AOSP ROMs with lockscreens that don't rotate, unless the code there has been modified.


Resets on reboot though I think
 
Last edited:

reysonance

Senior Member
Nov 19, 2012
285
119
Thanks man, I have a DIY dock for mine and the fact I had to enter my PIN sideways everytime I unlock my device driving me insane.
 

privatesam

Member
Dec 13, 2005
45
5
Can this code be used on the fly? I'm using a app at the moment (called Rotate) which can enable, disable lockscreen rotation. however this is heavy on memory and I want to simply do this with a script in Tasker.

---------- Post added at 04:58 PM ---------- Previous post was at 04:37 PM ----------

Just ran this from terminal emulator as root and it worked! Awesome - but it is lost on reboot so I need to be able to run this as a script in tasker - scripting looks tricky in Tasker though. Open to ideas!
 

Carlos_Manuel

Senior Member
Apr 28, 2011
4,092
5,368
25
Kuressaare
I have enabled rotation by modifying bools.xml file and now I get to know that JB 4.2 has different rotation texts to enable rotation!

How about Launcher?
:D
 

Cilraaz

Senior Member
Sep 17, 2010
677
263
Just ran this from terminal emulator as root and it worked! Awesome - but it is lost on reboot so I need to be able to run this as a script in tasker - scripting looks tricky in Tasker though. Open to ideas!

If you run it from a terminal emulator, it's temporary. If you want it to be permanent, add lockscreen.rot_override=true to /system/build.prop

I have enabled rotation by modifying bools.xml file and now I get to know that JB 4.2 has different rotation texts to enable rotation!

How about Launcher?
:D

On 4.1.2, you could add launcher.force_enable_rotation=true to make the default launcher rotate, but some say that doesn't work in 4.2 (I use Apex Launcher, so I haven't tried the stock launcher) and you have to modify bools.xml, as you stated. I don't know if it requires both the bools.xml edit and build.prop entry or not, though.

The build.prop change for the lockscreen works without the bools.xml edit, though.
 

Carlos_Manuel

Senior Member
Apr 28, 2011
4,092
5,368
25
Kuressaare
If you run it from a terminal emulator, it's temporary. If you want it to be permanent, add lockscreen.rot_override=true to /system/build.prop



On 4.1.2, you could add launcher.force_enable_rotation=true to make the default launcher rotate, but some say that doesn't work in 4.2 (I use Apex Launcher, so I haven't tried the stock launcher) and you have to modify bools.xml, as you stated. I don't know if it requires both the bools.xml edit and build.prop entry or not, though.

The build.prop change for the lockscreen works without the bools.xml edit, though.

I know that, that's why I have modified bools.xml file to enable rotation on launcher + lockscreen.
I think JB 4.2.x have also the changed code for launcher rotation...
 

Redscorpian

Senior Member
Nov 2, 2011
561
65
Nottingham UK
I know that, that's why I have modified bools.xml file to enable rotation on launcher + lockscreen.
I think JB 4.2.x have also the changed code for launcher rotation...

Does anyone have an answer to whether they have changed the code in 4.2? I can't find a bools.xml file anywhere - and no one seems to point at it. Also, no one says exactly where the suggested code should sit in the build.prop file - at the end, in the 'build' section, at the front? And it doesn't work on android 4.2.2 as far as I can tell although the terminal emulator temporary method works. And while you're firguring that out - can you tell me a way (without an app) to get the screen to stay awake after rebooting? Why won't that option remain set in Developer Options?
 

siddharthisback

Senior Member
Jul 13, 2011
87
14
dosent work for me

Force enable lockscreen rotation
Code:
setprop lockscreen.rot_override true

Force disable lockscreen rotation
Code:
setprop lockscreen.rot_override false

On devices that already can rotate, this does nothing.


Code should work on all AOSP ROMs with lockscreens that don't rotate, unless the code there has been modified.


Resets on reboot though I think

I tried this command in the terminal and no error message came.i.e it got executed properly Then when i see the lock-screen it is always in portrait mode.
Cant manage to get it to landscape mode. My auto rotation is on.
I am on 4.2.2 and using NOVA launcher. Xperia S OPENSEMC ROM.

Any idea y i am not able to rotate my lockscreen ??
 

yojlik

Senior Member
Aug 29, 2010
359
73
I tried this command in the terminal and no error message came.i.e it got executed properly Then when i see the lock-screen it is always in portrait mode.
Cant manage to get it to landscape mode. My auto rotation is on.
I am on 4.2.2 and using NOVA launcher. Xperia S OPENSEMC ROM.

Any idea y i am not able to rotate my lockscreen ??
Run Terminal as root, type "su" (no quotes), then enter, then the command.
 

dark0shark

Senior Member
Feb 17, 2013
261
170
Hamburg
Nexus 7
Honor 8
... If you want it to be permanent, add lockscreen.rot_override=true to /system/build.prop

Thank you, this works perfectly with 4.2.2 (CM 10.1).

Here are the steps to do this, if someone is not too familiar with editing a file in the /system file system:

1. Install app "ES File Explorer", new version 3.0.0
2. In ES File Explorer, go into Tools > Root Explorer, Option Mount R/W
3. Choose /system to be mounted RW
4. Allow (permanent) Superuser permissions for this app
5. Go to /system and open file build.prop with ES Notice-Editor (this Editor will ask for superuser permission, others won't)
6. Choose "Edit" from the upper right Options in Editor
7. Scroll to the end of the file and add the line lockscreen.rot_override=true, beware of syntax corruption due to automatic grammar correction
7. Exit ES Notice-Editor, answer question "Do you want to save build.prop" with "Yes"
8. Leave ES File Explorer and restart the phone

That's it, - check after reboot that the logon lockscreen turns while you turn the phone (maybe with some delay while turning)
 
Last edited:

laur3n.newm4n

Senior Member
Dec 21, 2010
230
43
Manchester, NH
Thank you, this works perfectly with 4.2.2 (CM 10.1).

Here are the steps to do this, if someone is not too familiar with editing a file in the /system file system:

1. Install app "ES File Explorer", new version 3.0.0
2. In ES File Explorer, go into Tools > Root Explorer, Option Mount R/W
3. Choose /system to be mounted RW
4. Allow (permanent) Superuser permissions for this app
5. Go to /system and open file build.prop with ES Notice-Editor (this Editor will ask for superuser permission, others won't)
6. Choose "Edit" from the upper right Options in Editor
7. Scroll to the end of the file and add the line lockscreen.rot_override=true, beware of syntax corruption due to automatic grammar correction
7. Exit ES Notice-Editor, answer question "Do you want to save build.prop" with "Yes"
8. Leave ES File Explorer and restart the phone

That's it, - check after reboot that the logon lockscreen turns while you turn the phone (maybe with some delay while turning)

Thank you for this. I wasn't sure if there was a specific spot in build.prop where I had to insert the line. The temporary fix in Terminal Emulator worked for me, but now it sticks after boot! I was sick of having to unlock my device sideways when it was in my car mount. The only weird thing is that it smooshes my wallpaper instead of switching to the landscape orientation, but I can live with that.
 
  • Like
Reactions: MauFerrusca

dark0shark

Senior Member
Feb 17, 2013
261
170
Hamburg
Nexus 7
Honor 8
... I was sick of having to unlock my device sideways when it was in my car mount.

Yes, the car mount in heads up position with the cables (USB-power and 3,5 audio jack) to the bottom were exactly my reason to add this option permanently, too. The position of this environment variable in the configuration file build.prop does not matter, it is just common sense to add additional lines at the end, so you can find them easily.
 
  • Like
Reactions: Jeffreycat

Jeffreycat

Senior Member
Jun 3, 2012
189
45
Thank you, this works perfectly with 4.2.2 (CM 10.1).

Here are the steps to do this, if someone is not too familiar with editing a file in the /system file system:

1. Install app "ES File Explorer", new version 3.0.0
2. In ES File Explorer, go into Tools > Root Explorer, Option Mount R/W
3. Choose /system to be mounted RW
4. Allow (permanent) Superuser permissions for this app
5. Go to /system and open file build.prop with ES Notice-Editor (this Editor will ask for superuser permission, others won't)
6. Choose "Edit" from the upper right Options in Editor
7. Scroll to the end of the file and add the line lockscreen.rot_override=true, beware of syntax corruption due to automatic grammar correction
7. Exit ES Notice-Editor, answer question "Do you want to save build.prop" with "Yes"
8. Leave ES File Explorer and restart the phone

That's it, - check after reboot that the logon lockscreen turns while you turn the phone (maybe with some delay while turning)

Thank you for outlining this -- it helped me remember what to do! :)
 
  • Like
Reactions: MauFerrusca

runawaybayeh

Senior Member
May 3, 2013
145
17
Vancouver
basic build.prop editing to enable pie on sgh-i747m

Indeed -- very helpful and worked for me as well!

Thanks for providing the info on this basic build prop prop editing !
Ive been reading CyanogenMod 10.1 – A Complete Hands-On Review & Guide
by Haroon Q Raja and really wanted to enable Pie,etc on my rooted Samsung SGH I747m. With your help I was able to edit my build prop as was suggested by a comment I picked up on to:

ro.product.manufacturer=LGE
ro.product.model=Nexus 4

This didnt make any difference. Is there something else that needs to be changed?

Samsung G3 SGH-I747M Rogers
 

mulbyungjahri

Member
Jul 18, 2013
48
92
...
On 4.1.2, you could add launcher.force_enable_rotation=true to make the default launcher rotate, but some say that doesn't work in 4.2 (I use Apex Launcher, so I haven't tried the stock launcher) and you have to modify bools.xml, as you stated. I don't know if it requires both the bools.xml edit and build.prop entry or not, though.

The build.prop change for the lockscreen works without the bools.xml edit, though.

Does anyone have an answer to whether they have changed the code in 4.2? I can't find a bools.xml file anywhere - and no one seems to point at it. Also, no one says exactly where the suggested code should sit in the build.prop file - at the end, in the 'build' section, at the front? And it doesn't work on android 4.2.2 as far as I can tell although the terminal emulator temporary method works. And while you're firguring that out - can you tell me a way (without an app) to get the screen to stay awake after rebooting? Why won't that option remain set in Developer Options?

No one can tell?
 

madd0g

Senior Member
May 8, 2010
2,843
871
Some users who flashed the leaked JWR66N on their N4's report there is no full app rotation anymore in the Camera app, just the icons. So another change to feel optimistic about 4.3.
 

Mach3.2

Senior Member
May 1, 2012
2,038
446
Singapore
Some users who flashed the leaked JWR66N on their N4's report there is no full app rotation anymore in the Camera app, just the icons. So another change to feel optimistic about 4.3.

Speaking of the camera, I played around with a iPad yesterday at the local store, i felt that Apple's shutter button have a better placement as compared to Google's. The shutter button is placed by the right side of the app, falls just nice of my thumb.

Beamed from my Grouper
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    Force enable lockscreen rotation
    Code:
    setprop lockscreen.rot_override true

    Force disable lockscreen rotation
    Code:
    setprop lockscreen.rot_override false

    On devices that already can rotate, this does nothing.


    Code should work on all AOSP ROMs with lockscreens that don't rotate, unless the code there has been modified.


    Resets on reboot though I think
    14
    ... If you want it to be permanent, add lockscreen.rot_override=true to /system/build.prop

    Thank you, this works perfectly with 4.2.2 (CM 10.1).

    Here are the steps to do this, if someone is not too familiar with editing a file in the /system file system:

    1. Install app "ES File Explorer", new version 3.0.0
    2. In ES File Explorer, go into Tools > Root Explorer, Option Mount R/W
    3. Choose /system to be mounted RW
    4. Allow (permanent) Superuser permissions for this app
    5. Go to /system and open file build.prop with ES Notice-Editor (this Editor will ask for superuser permission, others won't)
    6. Choose "Edit" from the upper right Options in Editor
    7. Scroll to the end of the file and add the line lockscreen.rot_override=true, beware of syntax corruption due to automatic grammar correction
    7. Exit ES Notice-Editor, answer question "Do you want to save build.prop" with "Yes"
    8. Leave ES File Explorer and restart the phone

    That's it, - check after reboot that the logon lockscreen turns while you turn the phone (maybe with some delay while turning)
    6
    Just ran this from terminal emulator as root and it worked! Awesome - but it is lost on reboot so I need to be able to run this as a script in tasker - scripting looks tricky in Tasker though. Open to ideas!

    If you run it from a terminal emulator, it's temporary. If you want it to be permanent, add lockscreen.rot_override=true to /system/build.prop

    I have enabled rotation by modifying bools.xml file and now I get to know that JB 4.2 has different rotation texts to enable rotation!

    How about Launcher?
    :D

    On 4.1.2, you could add launcher.force_enable_rotation=true to make the default launcher rotate, but some say that doesn't work in 4.2 (I use Apex Launcher, so I haven't tried the stock launcher) and you have to modify bools.xml, as you stated. I don't know if it requires both the bools.xml edit and build.prop entry or not, though.

    The build.prop change for the lockscreen works without the bools.xml edit, though.
    1
    Thank you, this works perfectly with 4.2.2 (CM 10.1).

    Here are the steps to do this, if someone is not too familiar with editing a file in the /system file system:

    1. Install app "ES File Explorer", new version 3.0.0
    2. In ES File Explorer, go into Tools > Root Explorer, Option Mount R/W
    3. Choose /system to be mounted RW
    4. Allow (permanent) Superuser permissions for this app
    5. Go to /system and open file build.prop with ES Notice-Editor (this Editor will ask for superuser permission, others won't)
    6. Choose "Edit" from the upper right Options in Editor
    7. Scroll to the end of the file and add the line lockscreen.rot_override=true, beware of syntax corruption due to automatic grammar correction
    7. Exit ES Notice-Editor, answer question "Do you want to save build.prop" with "Yes"
    8. Leave ES File Explorer and restart the phone

    That's it, - check after reboot that the logon lockscreen turns while you turn the phone (maybe with some delay while turning)

    Thank you for this. I wasn't sure if there was a specific spot in build.prop where I had to insert the line. The temporary fix in Terminal Emulator worked for me, but now it sticks after boot! I was sick of having to unlock my device sideways when it was in my car mount. The only weird thing is that it smooshes my wallpaper instead of switching to the landscape orientation, but I can live with that.
    1
    ... I was sick of having to unlock my device sideways when it was in my car mount.

    Yes, the car mount in heads up position with the cables (USB-power and 3,5 audio jack) to the bottom were exactly my reason to add this option permanently, too. The position of this environment variable in the configuration file build.prop does not matter, it is just common sense to add additional lines at the end, so you can find them easily.