[APP] [XPERIA JB 4.2.2] Serajr Swiping Power Toggles - SystemUI - v2 - 28/11/13

Search This thread

Bakaczo2

Member
Jan 11, 2013
22
2
Serajr, I follow Your work more than 2 years. I started when i got LWW, now L :)
Your work is flawlees man, thank You for Your time spended on something You're giving for free.
That Power Toggles is ideal for me, I love to have all important settings under finger.
I have 2 questions about SystemUI:

1.) How can I make SystemUI transparent, without using Xposed? (I dont see that option in Your Xperia Xposed Module, and i dont want to use others modules like GB, cause I think they consuming a lot of RAM)

2.) In this Topic i red about more advanced SystemUI from Your hand, can I find it for my device?

Xperia L 15.3.A.17
 
  • Like
Reactions: serajr

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,069
18,700
São Paulo - SP
Serajr, I follow Your work more than 2 years. I started when i got LWW, now L :)
Your work is flawlees man, thank You for Your time spended on something You're giving for free.
That Power Toggles is ideal for me, I love to have all important settings under finger.
I have 2 questions about SystemUI:

1.) How can I make SystemUI transparent, without using Xposed? (I dont see that option in Your Xperia Xposed Module, and i dont want to use others modules like GB, cause I think they consuming a lot of RAM)

2.) In this Topic i red about more advanced SystemUI from Your hand, can I find it for my device?

Xperia L 15.3.A.17

@serajr WOW!
Its really amazing:crying:
PLEASE port this for xperia z kitkat:(
Now xperia L is better than Z with this:crying::D:(

Thank you so much buddies!!
Xperia Xposed v3 will have suggested features ;)
 

the_vanya1

Senior Member
Oct 13, 2013
225
30
Kiev
@serajr thx fot this awesome work)
I try to port your toggles and its work, but when I choose flashlight and others toggle - fc
Pls check my logcat
 

Attachments

  • name.rar
    31.1 KB · Views: 9

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,069
18,700
São Paulo - SP
@serajr thx fot this awesome work)
I try to port your toggles and its work, but when I choose flashlight and others toggle - fc
Pls check my logcat
Thank you!

Code:
Caused by: java.lang.[B]NoClassDefFoundError[/B]: com/serajr/powertoggles/utils/[B]LedController[/B]
Compiler did not found LedController class.
Is LedController.smali inside com\serajr\powertoggles\utils\ folder?
 

the_vanya1

Senior Member
Oct 13, 2013
225
30
Kiev
@serajr i already fix it, thx but new error with flip anim). Maybe i can delete flip anim line in flashlight.smali?

Update - Success with port flip anim and flashlight. And now, i try to port camera toggle

Pls check this logcat (when i tap and long click on camera). No field error. but in your .smali dont have this field
 

Attachments

  • name.rar
    66.3 KB · Views: 14
Last edited:

Punkzappa09

Member
Jan 5, 2014
37
4
Hi Sir @serajr I've ported your great work (viewpager,customdrawer and powertoggles) on our device.. which is My|phone A848i duo ( JB .4.1.1 ) here in Philippines.. :eek:
Sorry Sir if I change/edit the MeProfile.smali.. because the image/picture is kinda blurred/pix-elated in your device..
i want to have Camera toggle.. but I think it's not working in 4.1.1 :crying: Sorry for my bad english.. thank you so much for this.. ;)
take a look at here Sir.. https://www.youtube.com/watch?v=xQEWbGxys7Q
 
Last edited:

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,069
18,700
São Paulo - SP
Hi Sir @serajr I've ported your great work (viewpager,customdrawer and powertoggles) on our device.. which is My|phone A848i duo ( JB .4.1.1 ) here in Philippines.. :eek:
Sorry Sir if I change/edit the MeProfile.smali.. because the image/picture is kinda blurred/pix-elated in your device..
i want to have Camera toggle.. but I think it's not working in 4.1.1 :crying: Sorry for my bad english.. thank you so much for this.. ;)
take a look at here Sir.. https://www.youtube.com/watch?v=xQEWbGxys7Q
Great job!!
The camera button uses functions/methods added on api level 17 (4.2.2), I don't know if you can replace them!
 

Punkzappa09

Member
Jan 5, 2014
37
4
i think i need to put PanelView.smali in my systemui sir.. that's what my logcat say.. hehehehe :)
I'm not sure..
 
Last edited:

dr3amCatch3r

New member
Nov 27, 2014
1
0
Help please.

Ehmm..Hey I got a little problem with that,did everything that was said on my xperia L c2105 and after that my systemUI and settings things disappeared even though I set them as 0644 in the system app root folder.Is there an easy way to fix this cause wouldn't like to flash again the stock Rom after I managed to clean it form most of the bloatware.Just wanted a nice perk :(
 

DihaX

Member
Feb 24, 2014
38
81
Sukabumi
dihak.blogspot.com
Ehmm..Hey I got a little problem with that,did everything that was said on my xperia L c2105 and after that my systemUI and settings things disappeared even though I set them as 0644 in the system app root folder.Is there an easy way to fix this cause wouldn't like to flash again the stock Rom after I managed to clean it form most of the bloatware.Just wanted a nice perk :(
Try disable system applications signature check, the systemUI and settings disappeared because app not installed :D
 

Mystery000777

Member
Jan 22, 2014
36
9
Master serajr are you going to update this? Or your not planning to do so :( anyway thanks for your hard work! Also do you have any idea to make our status bar change colors like paranoid android and the x posed module?

Sent from my C2105 using XDA Free mobile app
 

Nagaeh

Member
Nov 23, 2013
38
2
attachment.php

In the event you plan to update this module,
Could u remove the white space between the toggles and the clock? (Probably enlarge the toggles to fill the space)
 

Udit_Sharma

New member
Aug 2, 2015
1
0
Sir whan i flash the zip and reboot my xperia l it show error (system ui has stop working) plz help and sry for bad English
 

Top Liked Posts

  • There are no posts matching your filters.
  • 96
    I proudly brought to you my new creation, it´s titled: Swiping Power Toggles

    Here´s a brief explanation:
    As you can see here, android has been used Navigation Drawer as its main options panel on apps like Gmail, Play Store, and so on. And it has been used as main options panel on many other 3th party apps too.
    Navigation Drawer was developed meant for Activites with Action Bar and Fragments (regular apps), and not be used within android services... worse, core system services like SystemUI (aka Status Bar).
    But... why not? Here´s the funniest and the best part of this short history, IT SUITS THERE TOO!!!
    Not directly with its DrawerLayout, but with mine one, tittled CustomDrawerLayout. That´s it!!


    Here are some proofs:



    Status Bar and Swiping Power Toggles v2

    attachment.php
    attachment.php


    attachment.php
    attachment.php


    attachment.php




    Swiping Power Toggles v2 - Preferences

    attachment.php
    attachment.php


    attachment.php
    attachment.php


    attachment.php
    attachment.php


    attachment.php
    attachment.php


    attachment.php
    attachment.php


    attachment.php




    Install:

    TRY AT YOUR OWN RISK!!!

    Requeriments:
    - Xperia L deodexed Stock JB 4.2.2 firmware (any other one starting with 4.0.3, if properly ported)
    - System signatures compare disabled (super-user mod) inside Services.jar (see 3th post for further info)


    Download mirros:
    - Dev-Host
    - G-Drive


    Flash
    1. Download Serajr_Swiping_PowerToggles_v2.zip and put it on your sdcard root

    2. Flash it while on recovery

    3. Done!


    Manually
    1. Download Serajr_Swiping_PowerToggles_v2.zip to your computer

    2. Extract its contents

    3. Push SystemUI.apk and Settings.apk to system/app/ with rw-r--r-- permissions

    4. Reboot phone

    5. Done!




    Developers/Rom cookers info:

    How can I show up Power Toggles settings screen from my own code?

    Power Toggles settings screen activity has "exported" flag set to "true", so:

    Under Java:
    PHP:
    Intent intent = new Intent("com.serajr.powertoggles.preferences.intent.PREFERENCES");
    startActivity(intent);

    or

    Inside Settings.apk \xml preferences folder:
    Code:
    <com.sonymobile.settings.preference.IntentPreference android:key="power_toggles" settings:dependOnResource="true" settings:dependOnIsValidIntent="true" settings:hasMetaData="true">
        <intent android:targetPackage="com.android.systemui" android:targetClass="com.serajr.powertoggles.preferences.PowerTogglesPreferencesActivity" />
    </com.sonymobile.settings.preference.IntentPreference>



    Known issues:
    - Some animations will seem slow due the system is processing its toggle in background
    - Delaying top edge while swiping to open or close Power Toggles drawer (minor DrawerLayout bug?!)
    - Sometimes Battery toggle icon becomes completly colored with accent color (minor issue, I´ll fixed it asap!)



    To do:
    You tell me!!



    Special thanks: (if I forgot someone, please remember me!!)
    - Sony
    - CM Team
    - @niaboc79 for "brainstorming" with me about everything you see here
    - Other ones inside Power Toggles "About" screen



    If you like it, press thanks... Simple so!! ;)
    .
    .
    31
    Changelog

    v2 - 28/11/2013
    - Entirely new look and feel
    - Fully working new Camera toggle (Tap it to start camera preview, tap it again to take pictures. Long-press it to stop camera preview)
    - 29 toogles set (added Camera toggle)
    - Double colored static icons with current theme accent color
    - New icons set (A very big THANKS to my friend @niaboc79)
    - New toggling flip animation
    - Fixed "take screenshot" issue


    v1 - 18/11/2013
    - Initial 4.2.2 release
    - New and unprecedented android Navigation Drawer (DrawerLayout) widget inside SystemUI service!!
    - Swipe expanded status bar left edge to show up Power Toggles
    - 28 toogles set
    - Power Toggles buttons and preferences according to theme accent color
    25
    How to disable your system applications signature check

    TRY IT AT YOUR OWN RISK!!

    1. Decompile your deodexded services.jar

    2. Open ...\com\android\server\pm\PackageManagerService.smali with notepad++

    3. Find compareSignatures method (Original method)

    4. Replape Original method with Patched method:

    Original method:
    Code:
    .method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
        .registers 9
        .parameter "s1"
        .parameter "s2"
    
        .prologue
        .line 2338
        if-nez p0, :cond_8
    
        .line 2339
        if-nez p1, :cond_6
    
        const/4 v6, 0x1
    
        .line 2358
        :goto_5
        return v6
    
        .line 2339
        :cond_6
        const/4 v6, -0x1
    
        goto :goto_5
    
        .line 2343
        :cond_8
        if-nez p1, :cond_c
    
        .line 2344
        const/4 v6, -0x2
    
        goto :goto_5
    
        .line 2346
        :cond_c
        new-instance v3, Ljava/util/HashSet;
    
        invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
    
        .line 2347
        .local v3, set1:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
        move-object v0, p0
    
        .local v0, arr$:[Landroid/content/pm/Signature;
        array-length v2, v0
    
        .local v2, len$:I
        const/4 v1, 0x0
    
        .local v1, i$:I
        :goto_14
        if-ge v1, v2, :cond_1e
    
        aget-object v5, v0, v1
    
        .line 2348
        .local v5, sig:Landroid/content/pm/Signature;
        invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
    
        .line 2347
        add-int/lit8 v1, v1, 0x1
    
        goto :goto_14
    
        .line 2350
        .end local v5           #sig:Landroid/content/pm/Signature;
        :cond_1e
        new-instance v4, Ljava/util/HashSet;
    
        invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
    
        .line 2351
        .local v4, set2:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
        move-object v0, p1
    
        array-length v2, v0
    
        const/4 v1, 0x0
    
        :goto_26
        if-ge v1, v2, :cond_30
    
        aget-object v5, v0, v1
    
        .line 2352
        .restart local v5       #sig:Landroid/content/pm/Signature;
        invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
    
        .line 2351
        add-int/lit8 v1, v1, 0x1
    
        goto :goto_26
    
        .line 2355
        .end local v5           #sig:Landroid/content/pm/Signature;
        :cond_30
        invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z
    
        move-result v6
    
        if-eqz v6, :cond_38
    
        .line 2356
        const/4 v6, 0x0
    
        goto :goto_5
    
        .line 2358
        :cond_38
        const/4 v6, -0x3
    
        goto :goto_5
    .end method

    Patched method:
    Code:
    .method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
        .registers 9
        .parameter "s1"
        .parameter "s2"
    
        .prologue
        .line 2338
        const/4 v2, 0x0
    
        return v2
    .end method

    5. Compile it

    Now you need to try to replace your services.jar with patched one... again, TRY IT AT YOUR OWN RISK!!

    6. With Root Explorer copy patched services.jar to /system/ and give it rw-r--r-- permissions
    [x] [x] [ ]
    [x] [ ] [ ]
    [x] [ ] [ ]
    25
    Thumbs

    Proofs!!
    12
    same here

    what i did for the toggles was use the old lidroid toggles ;)
    It has text under the toggles ;)

    or use the other Powertoggles smalis from serajr.

    there can be done a lot with this ;)
    its nice feature.

    Hi, sera

    I've had some time this morning so I've ported the Swiping Power Toggles to JB 4.1.2 :good:

    There is one problem, JB 4.1.2 doesn't have method makeExpandedInvisibleSoon()V so the CustomDrawer is not close automatically when the expanded status bar is closed.

    I thought to add the method but she need an other one: makeExpandedInvisible()V who need many more smali edition to be fully implemented.

    Any easy way to change things or it will need deep work?

    Something else:

    How to add back the text under each toggle?

    Thanks

    Great news!!!!

    For 4.1.2 I think you´re right on put CustomDrawerLayout visibility line within makeExpandedInvisible()V, put that line just before return-void

    To show up toggles tittles back, delete red lines
    Code:
    .method private setupPowerToggles()V
        .locals 3
    
        .prologue
        .line 45
        iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
    
        const v1, 0x7f0800f6
    
        invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
    
        move-result-object v0
    
        check-cast v0, Lcom/serajr/powertoggles/PowerToggles;
    
        iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
    
        .line 46
        iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
    
        iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
    
        invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
    
        move-result-object v1
    
        const v2, 0x7f0d005e
    
        invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
    
        move-result v1
    
        invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->gridWidth(I)V
    
        [COLOR="Red"].line 47
        iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
    
        const/4 v1, 0x0
    
        invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->buttonShowLabel(Z)V[/COLOR]
    
        .line 48
        iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
    
        invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->setupPowerToggles()V
    
        .line 49
        iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
    
        invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->updatePowerToggles()V
    
        .line 50
        iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
    
        new-instance v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$41;
    
        invoke-direct {v1, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$41;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
    
        invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->setChangeContentObserverListener(Lcom/serajr/powertoggles/PowerToggles$ChangeObserverCallbackInterface;)V
    
        .line 51
        return-void
    .end method

    I´ve fixed screenshots issue, so If you want, wait just a single day to release your ported versions, you´ll have to change some few lines. I´ll provide you (here) a little guide.

    Btw... others news from v1.1 are:
    - Array for colored buttons (as we talked about)
    - PowerTogglesReceivers.apk - tiny app (about 11kb) that receives intents from SystemUI Power Toggles and change proper system settings, so SystemUI queue processes becomes lighter!

    Let´s make our beloved xperias fly (at least we try :p)!