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:
log.tag.launcher_force_rotate=VERBOSE

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 com.android.launcher3.Launcher class, but the above comment (in the com.android.launcher3.Utilities class) gave away the hint about the log.tag. prefix that you've to use in the property name.

Comments

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!

Thanks!

Tested on my Galaxy S2 with CM11, works perfectly!

tested.

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

Great!

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

Yes

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

Thanks

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!

Syndicate content