[MOD] [HOW TO] Enable rotation lock tile on 4.4

Search This thread

S0bes

Senior Member
Jan 1, 2012
870
969
As I know, this feature was hidden by google for any phone which screen size is smaller than 600 dp. ( dp = (px / dpi) * 160 ).
If you have root you can install GravityBox and easily get this tile. But if for some reason you do not wanna use gravitybox, there are few ways to do it:
How to simply enable it by changing framework.jar you can find here http://xdaforums.com/showpost.php?p=29209182&postcount=13
How to enable this tile using only SystemUI.apk I'm gonna show you
1. SystemUI/res/values/bools.xml
find this bools and change them to true
Code:
<bool name="quick_settings_show_rotation_lock">true</bool>
<bool name="config_showRotationLock">true</bool>
Actually, I think this is not necessary. You can skip this step and return if it wont work
2.SystemUI\smali\com\android\systemui\statusbar\policy\RotationLockController.smali
Find this:
Code:
invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z
There will be four the same lines. And you should change it four times for each line.
Before:
Code:
invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_0
After:
Code:
invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z

    move-result v0

   # if-eqz v0, :cond_0
3. SystemUI\smali\com\android\systemui\statusbar\phone\QuickSettings$15.smali
find method public refreshView
Before:
Code:
.line 1118
    .local v0, "rotationLockState":Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;
    iget-boolean v1, v0, Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;->visible:Z

    if-eqz v1, :cond_2

    const/4 v1, 0x0
After:
Code:
.line 1118
    .local v0, "rotationLockState":Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;
    iget-boolean v1, v0, Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;->visible:Z

    #if-eqz v1, :cond_2

    const/4 v1, 0x0
This is for XT1032 174.44.1.falcon_umts.Retail.en.US :http://xdaforums.com/attachment.php?attachmentid=2674905&stc=1&d=1396965597 [LOCK.zip]
And I can not guarantee work on any other firmwares
Backup your original SystemUI.apk just in case if something goes wrong and you'll get bootloop or black screen.
 

Attachments

  • LOCK.zip
    1.1 MB · Views: 190
Last edited:

ekhatooni

Member
Apr 26, 2014
10
0
not work

Thanks for your effort but this mod doesn't work on moto g xt1032 stock ROM and faux123 009m kernek ....
The issue is after flash this by CWM there is not any status bar anymore :D and there is not any navigation keys anymore
 

S0bes

Senior Member
Jan 1, 2012
870
969
Thanks for your effort but this mod doesn't work on moto g xt1032 stock ROM and faux123 009m kernek ....
The issue is after flash this by CWM there is not any status bar anymore :D and there is not any navigation keys anymore

Is your system version EXACTLY 174.44.1.falcon_umts.Retail.en.US ?Because as I said in 1st post
This is for XT1032 174.44.1.falcon_umts.Retail.en.US :http://xdaforums.com/atta...1&d=1396965597 [LOCK.zip]
And I can not guarantee work on any other firmwares
 

ekhatooni

Member
Apr 26, 2014
10
0
Request

HI :D

you are right ..... My Version is 176.44.1.falcom_umts.TescoSL.en.GB

and my phones SystemUI.apk is already attached .....

Is it possible that enable the Rotation tile ????

thanks ....
 

Attachments

  • SystemUI.apk
    1.5 MB · Views: 10

lifetimes

Senior Member
Jan 19, 2014
164
21
Kingstown
Thanks, this worked on my Moto G. Not sure if I needed it because I never take off auto rotate but it's good to have it there.
 

Fede37

Senior Member
Sep 17, 2013
140
11
My god! Why is it that you people never read the WHOLE post BEFORE flashing stuff?!

Sent from my XT1032 using XDA Free mobile app
 
  • Like
Reactions: Deathtoflesh

GodOfPsychos

Senior Member
Mar 15, 2014
499
619
30
Solingen
For People with XT1032 EU Moto G

i just compiled the SystemUI.apk from the EU version of the Moto G XT1032 to make the Lock Rotation Tile visible

Maybe the Thread starter can put my apk as well to the first post ;D

Note that my modified SystemUI.apk is just for 176.44.1.falcon_umts.EURetail.en.EU (don't know if it works for other versions)
 

Attachments

  • SystemUI.apk
    1.5 MB · Views: 17

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    As I know, this feature was hidden by google for any phone which screen size is smaller than 600 dp. ( dp = (px / dpi) * 160 ).
    If you have root you can install GravityBox and easily get this tile. But if for some reason you do not wanna use gravitybox, there are few ways to do it:
    How to simply enable it by changing framework.jar you can find here http://xdaforums.com/showpost.php?p=29209182&postcount=13
    How to enable this tile using only SystemUI.apk I'm gonna show you
    1. SystemUI/res/values/bools.xml
    find this bools and change them to true
    Code:
    <bool name="quick_settings_show_rotation_lock">true</bool>
    <bool name="config_showRotationLock">true</bool>
    Actually, I think this is not necessary. You can skip this step and return if it wont work
    2.SystemUI\smali\com\android\systemui\statusbar\policy\RotationLockController.smali
    Find this:
    Code:
    invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z
    There will be four the same lines. And you should change it four times for each line.
    Before:
    Code:
    invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z
    
        move-result v0
    
        if-eqz v0, :cond_0
    After:
    Code:
    invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z
    
        move-result v0
    
       # if-eqz v0, :cond_0
    3. SystemUI\smali\com\android\systemui\statusbar\phone\QuickSettings$15.smali
    find method public refreshView
    Before:
    Code:
    .line 1118
        .local v0, "rotationLockState":Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;
        iget-boolean v1, v0, Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;->visible:Z
    
        if-eqz v1, :cond_2
    
        const/4 v1, 0x0
    After:
    Code:
    .line 1118
        .local v0, "rotationLockState":Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;
        iget-boolean v1, v0, Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;->visible:Z
    
        #if-eqz v1, :cond_2
    
        const/4 v1, 0x0
    This is for XT1032 174.44.1.falcon_umts.Retail.en.US :http://xdaforums.com/attachment.php?attachmentid=2674905&stc=1&d=1396965597 [LOCK.zip]
    And I can not guarantee work on any other firmwares
    Backup your original SystemUI.apk just in case if something goes wrong and you'll get bootloop or black screen.
    1
    thanks!!

    Can you create others mods to add anothers functions on notification bar?
    of course not. I didn't create it. It was created by google and I just let it be visible
    1
    My god! Why is it that you people never read the WHOLE post BEFORE flashing stuff?!

    Sent from my XT1032 using XDA Free mobile app