CyanogenMod (CM11), Trebuchet and home screen rotation

There's a lot of whining on the net about not being able to enable home screen rotation in CM11. Well, this is what the source code is for. Smile And you are able to enable home screen rotation (without compiling your own version of Trebuchet or switching to an alternative launcher), just not through the UI.

You'll need to get your hands dirty and edit the build.prop file. If you don't know what this is or where to find it or how to edit it, chances are you shouldn't try it. It's risky: one bad move and your phone won't boot! So don't blame me if you brick your phone.

Home screen rotation can be enabled (i.e. forced) by adding this property to build.prop and of course you'll need a reboot as well:

Btw. I've found this info by downloading the source of Trebuchet (from the CM11 branch) and looking into it. In the Utilities class you'll find this ...
// To turn on these properties, type
// adb shell setprop log.tag.PROPERTY_NAME [VERBOSE | SUPPRESS]
static final String FORCE_ENABLE_ROTATION_PROPERTY = "launcher_force_rotate";
public static boolean sForceEnableRotation = isPropertyEnabled(FORCE_ENABLE_ROTATION_PROPERTY);

Setting the property dynamically (as the above comment suggests) didn't work for me, but setting it via build.prop just worked fine. Smile

P.S.: I tested this with CM11 M8 on a Galaxy Nexus (maguro), but chances are it's all the same for the entire CM11 branch.
P.S.2: if you want to enable lock screen rotation as well, set the lockscreen.rot_override property to true as well.
P.S.3: the actual rotation is done in the class, but the above comment (in the class) gave away the hint about the log.tag. prefix that you've to use in the property name.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Dynamic testing

You can set it dynamically and it will take effect if you Force Stop the Trebuchet process in the ALL Apps settings menu. The process will automatically restart with the new props set. Of couse, this will not survive a reboot, but you can test out the behavior without making any permanent changes to your phone.

Re: Dynamic testing

Thanks for the tip! It didn't occur to me that the prop value might cached on a per app level and killing the app would fix.

Hmm. I just tested this and it didn't work for me. The new instance of Trebuchet didn't pick up on the dynamically set prop value.

Thank you!

I edited the build.prop file in my CM11 system folder. I use Samsung Galaxy S4. Works perfect!. Thank you!


Tested on my Galaxy S2 with CM11, works perfectly!


Thanks for sharing bro i tested on sgs 3 and worked perfectly


I downloaded BuildProp Editor from Google Play Store, it's great! Very easy to add this values on the file. And this trick works on CM11 at the moment.
I'm usual to use my phone as GPS navigator in my car, so a landscape mode is a must for every app for me.
My problem at the moment is the Phone app that doesn't want to go in landscape .... what's the problem? Any other suggestion would be appreciated.

Re: Great!

You're right. I didn't even notice that the Phone app has no landscape mode. Shock
I use my phone for navigation too and I have a Tasker task set up that disables the Phone app, when I start the navigation app (iGO). I have this because if I get a call while I'm running iGO (i.e. during navigation) and I dismiss the call, the phone get's locked (instead of switching back to iGO). Sad I'm not sure what is at fault here (there could be many factors ... eg. I always use my GNex in the car with the charger plugged in and this activates the car/docked mode ... or maybe it's just iGO's fault, I've no idea), but disabling the Phone app helps ... no incoming call, no locking ... and mainly: my attention is always on the road and not interrupted by incoming calls. Smile


Using build prop editor from the play store worked just fine for me too on an sgs3 i9300. "props" to you sir!


Worked for me too on CM 11-20141112-SNAPSHOT-M12

Device is Motorola Razr HD XT926

Works on CM 12 Note 2.

Works on CM 12 Note 2. Thanks!

Boot Loop

Careful! I added the line to build.prop and had a perfect boot loop. Essentially an almost bricked phone.

I had to fire up the TWRP recovery and go through some complicated adb commands to put the original build.prop back in place to resuscitate my phone. So before you modify build.prop, be sure you know how to back out. You may need a recovery with adb support.

Re: Boot Loop

I'm glad that you managed to get out of the boot loop. What happened to you is the exact reason for my warning in my post:

You'll need to get your hands dirty and edit the build.prop file. If you don't know what this is or where to find it or how to edit it, chances are you shouldn't try it. It's risky: one bad move and your phone won't boot! So don't blame me if you brick your phone.

Messing with build.prop always involves the chance of bricking (to some extent) your phone. If you're prepared (as you described: an ABD enabled recovery helps a lot), you can easily come out of the result of an unfortunate modification. I always make a copy of build.prop before I apply any changes, so I can revert to the original that is already known to work.

Thanks for emphasizing this again!

Confirmed Working on Galaxy s5


Nice reverse engineering the code.

Now can anyone tell me how to lock the flipping home screen in CM11?

It must be obvious but I just can't see it!

Re: CyanogenMod (CM11), Trebuchet and home screen rotation

"log.tag.launcher_force_rotate=VERBOSE" and "lockscreen.rot_override=true" still work just fine in CM 12.1 (and COS 12.1) too. Smile Tested on OnePlus One.

Works perfect on a Wileyfox Swift

Works perfect on a Wileyfox Swift running CM12.1



CM13 Trebuchet Launcher Auto Rotate

It works on cm13 trebuchet as well, thanks.

Syndicate content