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.
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.
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
Dynamic testing
Re: Dynamic testing
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!
Thanks!
tested.
Great!
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!
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). 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.
Yes
Thanks
Device is Motorola Razr HD XT926
Works on CM 12 Note 2.
Boot Loop
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
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
Works perfect on a Wileyfox Swift
Thanks
spa
CM13 Trebuchet Launcher Auto Rotate