FORUMS
Remove All Ads from XDA

Lockscreen Rotation Android 4.2.x

981 posts
Thanks Meter: 177
 
By xaueious, Senior Member on 13th February 2013, 07:23 PM
Post Reply Email Thread
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
The Following 14 Users Say Thank You to xaueious For This Useful Post: [ View ] Gift xaueious Ad-Free
 
 
13th February 2013, 08:44 PM |#2  
Senior Member
Thanks Meter: 260
 
Donate to Me
More
Great find. Thanks!
14th February 2013, 12:31 AM |#3  
Senior Member
Thanks Meter: 119
 
More
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.
22nd February 2013, 04:58 PM |#4  
Member
Thanks Meter: 5
 
More
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!
22nd February 2013, 05:23 PM |#5  
Carlos_Manuel's Avatar
Senior Member
Flag Kuressaare
Thanks Meter: 5,390
 
Donate to Me
More
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?
22nd February 2013, 05:56 PM |#6  
Senior Member
Thanks Meter: 260
 
Donate to Me
More
Quote:
Originally Posted by privatesam

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

Quote:
Originally Posted by manumanfred

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?

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.
The Following 6 Users Say Thank You to Cilraaz For This Useful Post: [ View ] Gift Cilraaz Ad-Free
22nd February 2013, 08:04 PM |#7  
zAlbee's Avatar
Senior Member
Flag Toronto
Thanks Meter: 146
 
More
Awesome. This worked for me on 4.1.2 as well. Thanks!

Really useful in the car since I don't have the official car dock. No more unlocking sideways!
22nd February 2013, 09:54 PM |#8  
Carlos_Manuel's Avatar
Senior Member
Flag Kuressaare
Thanks Meter: 5,390
 
Donate to Me
More
Quote:
Originally Posted by Cilraaz

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...
4th March 2013, 06:50 PM |#9  
Senior Member
Flag Nottingham UK
Thanks Meter: 55
 
More
Quote:
Originally Posted by manumanfred

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?
19th March 2013, 07:50 AM |#10  
Member
Thanks Meter: 14
 
More
dosent work for me
Quote:
Originally Posted by xaueious

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 ??
22nd March 2013, 03:34 AM |#11  
Senior Member
Thanks Meter: 73
 
More
Quote:
Originally Posted by siddharthisback

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.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes