[GUIDE] [CM11] How To Add Visible Brightness Slider To Status Bar For CM11

Search This thread

TheFixItMan

Senior Member
Jul 8, 2012
7,844
4,052
London
Thank you for your kindness, I flashed the zip and after the reboot it gives me system ui error continuously, so nothing to do, it's my rom's fault

Flashed what zip? I assume the Moto E zip I just posted in the quote

Well unless that's the phone you have that won't work for you and you need to make it yourself
 

TheFixItMan

Senior Member
Jul 8, 2012
7,844
4,052
London
With CM11 and I tried but flash the zip file and gives me an error

Again - saying you have an error is not very helpful

Say what the error is - compile error, flash error, force closes, status bar disappears and so one
Did it compile successfully
Provide logs

And so on

I don't see how you expect me to help you if you don't provide details


It will work if you follow all the instructions and have properly added the smali in the correct locations & edited the xml with notepad++ correctly
 
Last edited:

supreme01061

Member
Jan 29, 2015
44
2
All rules as in the first post.
Look here how to work with APKTOOL

---------- Post added at 04:41 PM ---------- Previous post was at 04:35 PM ----------

I did not use notepad ++
 

TheFixItMan

Senior Member
Jul 8, 2012
7,844
4,052
London

supreme01061

Member
Jan 29, 2015
44
2
I can not understand should I delete this line

<ViewStub android:id="@id/ribbon_settings_stub" android:layout="@layout/ribbon_settings" android:layout_width="fill_parent" android:layout_height="@dimen/notification_min_height" />

And to put this in its place

<include android:id="@id/brightness_slider" layout="@layout/marcus_brightness" />
 

TheFixItMan

Senior Member
Jul 8, 2012
7,844
4,052
London
I can not understand should I delete this line

<ViewStub android:id="@id/ribbon_settings_stub" android:layout="@layout/ribbon_settings" android:layout_width="fill_parent" android:layout_height="@dimen/notification_min_height" />

And to put this in its place

<include android:id="@id/brightness_slider" layout="@layout/marcus_brightness" />

No you do not delete anything!


You simply paste
Code:
<include android:id="@id/brightness_slider" layout="@layout/marcus_brightness" />

Under
Code:
<ViewStub android:id="@id/ribbon_settings_stub" android:layout="@layout/ribbon_settings" android:layout_width="fill_parent" android:layout_height="@dimen/notification_min_height" />

So it looks like

Code:
<ViewStub android:id="@id/ribbon_settings_stub" android:layout="@layout/ribbon_settings" android:layout_width="fill_parent" android:layout_height="@dimen/notification_min_height" />
<include android:id="@id/brightness_slider" layout="@layout/marcus_brightness" />
 

Githriff

New member
Jul 8, 2015
2
0
plz help

No you do not delete anything!


You simply paste
Code:
<include android:id="@id/brightness_slider" layout="@layout/marcus_brightness" />

Under
Code:
<ViewStub android:id="@id/ribbon_settings_stub" android:layout="@layout/ribbon_settings" android:layout_width="fill_parent" android:layout_height="@dimen/notification_min_height" />
So it looks like

Code:
<ViewStub android:id="@id/ribbon_settings_stub" android:layout="@layout/ribbon_settings" android:layout_width="fill_parent" android:layout_height="@dimen/notification_min_height" />
<include android:id="@id/brightness_slider" layout="@layout/marcus_brightness" />

I GOT THIS ERROR WHILE RECOMPILING
DID I GOT WRONG??

..\3-Out\SystemUI.apk\smali\com\android\systemui\statusbar\SlideBrightness$1.smali[24,4] Error for input '.parameter': Invalid directive
..\3-Out\SystemUI.apk\smali\com\android\systemui\statusbar\SlideBrightness$1.smali[40,4] Error for input '.parameter': Invalid directive
..\3-Out\SystemUI.apk\smali\com\android\systemui\statusbar\SlideBrightness$1.smali[41,4] Error for input '.parameter': Invalid directive
..\3-Out\SystemUI.apk\smali\com\android\systemui\statusbar\SlideBrightness$1.smali[40,15] mismatched input '"context"' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/android/systemui/statusbar/SlideBrightness$1.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:71)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:55)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:378)
at brut.androlib.Androlib.buildSources(Androlib.java:305)
at brut.androlib.Androlib.build(Androlib.java:288)
at brut.androlib.Androlib.build(Androlib.java:261)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)

------------------------------------------------------

PLZ I using cm11 rom :good::good::crying::crying:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    How To Add Visible Brightness Slider To Status Bar For CM11

    This Guide Is For CM11 Only - For GB/CM7/CM9 See My Guide Here



    What Does This Mod Do?
    This mod will give you a visible brightness slider on your status bar
    Yes we all know you can enable an invisible slider and swipe across the status bar or click the brightness tile to bring up a slider but this mod is specifically for those who want a visible brightness slider on the status bar itself



    105cpww.jpg
    ets0tv.jpg



    1 - Download the attachment CM11Brightness at the end of this thread

    2 - Decompile SystemUI.apk with apktool (Guide in my signature if you need one)

    3 - Place the files from the CM11Brightness.zip at the following locations

    smali\com\android\systemui\statusbar
    SlideBrightness.smali
    SlideBrightness$1.smali
    SlideBrightness$2.smali

    res\layout
    marcus_brightness.xml


    4 - Open res/layout/status_bar_expanded.xml with notepad++

    5 - Under
    Code:
    <ViewStub android:id="@id/ribbon_settings_stub" android:layout="@layout/ribbon_settings" android:layout_width="fill_parent" android:layout_height="@dimen/notification_min_height" />

    Place
    Code:
    <include android:id="@id/brightness_slider" layout="@layout/marcus_brightness" />


    6 - Recompile

    7 - Optional step - sign with a platform key with zipsigner (playstore)

    8 - Put in a flashable zip and flash in cwm with system mounted
    2
    tried on s4 mini duos, it works :)
    2
    It's perfect but I think would be awesome if it include automatic brightnes

    sent from my i9192 with CM11 by sekil

    I have got the smali for that however because my phone doesnt support that feature (hasnt got a light sensor) I didnt include it because I cant test it

    If you want to have a go yourself -

    You can find all the orig brightness slider files
    http://xdaforums.com/attachment.php?attachmentid=2695638&d=1397898301

    The xml that you need to include is quickpanel_brightness_settings.xml for the automatic brightness check box with the smali being BrightnessSettingsView
    you will need to add some ids and drawable xml/png too

    you will find the orig gingerbread guide by evanlocked on my gb/cm7/cm9 guide at the top of this thread which may help
    2
    I was getting some kind of same error, will try the older stable version.

    I will assume you have sorted it
    1
    gOOD

    Work fine in my huawei Y300 THANKS :)