[AOSP/CM/Stock]Adding Lidroid Toggles + Grid View[GB]

Search This thread

san122

Senior Member
Jan 20, 2013
1,238
1,593
Unavailable.
Hello guys today iam going to teach you how to add lidroid toggles in grid view in AOSP/CM/Stock roms.
Maybe i have forgot something so dont blame me Let me know it first and i will change it
.



Things REQUIRED.

1.Patience [Heavily Needed]
2.Lots of time.
3.My provided files.Here: Public.xml and Lidroid_Resources.zip
4.Notepad++ etc.


The guide is divide into two parts.
1.XML PART [Includes xml editing ]
2.SMALI PART [ Includes smali editing ]



Lets start with XML PART first.

STEP 1

Open ids.xml under res/values foler and add these in last above

Code:
<item type="id" name="quickpanel_button">false</item>
    <item type="id" name="quickpanel_text">false</item>
    <item type="id" name="quickpanel_image">false</item>
    <item type="id" name="quickpanel_indicator">false</item>
    <item type="id" name="Lidroid">false</item>


STEP 2

Open dimens.xml under res/values foler and add these in last above
Code:
</resources>

Code:
quickpanel_button_height">79.0px

STEP 3
Open strings.xml under res/values foler and add these in last above
Code:
    <string name="quickpanel_wifi_text">Wi-Fi</string>
    <string name="quickpanel_bluetooth_text">Bluetooth</string>
    <string name="quickpanel_gps_text">GPS</string>
    <string name="quickpanel_sound_text">Sound</string>
    <string name="quickpanel_sound_vibration_text">"Sound Vibration"</string>
    <string name="quickpanel_silent_text">Silent</string>
    <string name="quickpanel_vibration_text">Vibration</string>
    <string name="quickpanel_rotation_text">"Auto rotation"</string>
    <string name="quickpanel_shutdown_text">Phone will be shutdown</string>
    <string name="quickpanel_shutdown_confirm">Shutdown</string>
    <string name="quickpanel_sound_vibrate">Vibrate</string>
    <string name="quickpanel_sound_sound">Sound</string>
    <string name="quickpanel_sound_silent">Silent</string>
    <string name="quickpanel_sound_sound_vibrate">Sound Vibrate</string>
    <string name="quickpanel_sync">Sync</string>
    <string name="quickpanel_wifiap">Wifi Ap</string>
    <string name="quickpanel_wifi">Wifi</string>
    <string name="quickpanel_rotation">Auto Rotate</string>
    <string name="quickpanel_airplane">Airplane</string>
    <string name="quickpanel_bluetooth">Bluetooth</string>
    <string name="quickpanel_brightness">Brightness</string>
    <string name="quickpanel_flashlight">Flashlight</string>
    <string name="quickpanel_gps">GPS</string>
    <string name="quickpanel_lockscreen">Lockscreen</string>
    <string name="quickpanel_mobiledata">Data</string>
    <string name="quickpanel_reboot">Reboot</string>
    <string name="quickpanel_reboot_text">Phone will reboot</string>
    <string name="quickpanel_screen_timeout">Screen Timeout</string>
    <string name="quickpanel_recovery">Recovery</string>
STEP 5
Delete these if they are already present
Code:
<string name="quickpanel_wifi_text">Wi-Fi</string>
    <string name="quickpanel_bluetooth_text">Bluetooth</string>
    <string name="quickpanel_gps_text">GPS</string>
    <string name="quickpanel_sound_text">Sound</string>
    <string name="quickpanel_sound_vibration_text">"Sound Vibration"</string>
    <string name="quickpanel_silent_text">Silent</string>
    <string name="quickpanel_vibration_text">Vibration</string>
    <string name="quickpanel_rotation_text">"Auto rotation"</string>

STEP 6
Merge attached files with your SystemUI.apk


STEP 7
Recompile Your App.


STEP 8
Decompile it again.

STEP 9
Open Statusbar_expanded.xml or any other xml where you want to place lidroid toggles.

STEP 10
And Add this where you want to place the lidroid toggles.
Code:
    <com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/Lidroid" android:layout_width="fill_parent" android:layout_height="wrap_content" />


Now lets complete the SMALI PART

SMALI PART

STEP 11
Open com/android/systemui/statusbar/StatusBarService.smali

STEP12
In
Code:
# instance fields
Below
Code:
.field mPositionTmp:[I
Add this line
Code:
.field mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

STEP 13

In
Code:
 .method private makeStatusBarView(Landroid/content/Context;)V


Add this in last above
Code:
 .line (A numeric value will be there)
    return-void
    

.line 656
    iget-object v5, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;

    const v6, 0x7f090039

    invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;

    iput-object v5, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
STEP 14
Open your public.xml
Search for "Lidroid" id and copy its public id and replace it with id of above code i.e with "0x7f090039"


STEP 15
OPEN Statusbarservice.smali again

STEP 16
In
Code:
 .method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
Add this in last above
Code:
.line (A numeric value will be there)
    return-void

Code:
.line 1900
    iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->updateWidget()V

NOTE..
Here "0x7f090039" is the public id of id "Lidroid"


STEP17
Now open all files in com/lidroid/systemui/quickpanel folder

Search "0x7f" Copy the whole id .

Open my provided public.xml

Search for that id in my public.xml

Copy the text of that id.

Like if my Public id is "0x7f030011"



Then i will copy "quickpanel_button".

Now find same text in your public.xml

Copy its public id .

And replace the id of all smali files with your public.xml's id.

Similarly do this with all smali files available in quickpanel folder.

STEP 18
Now open your apps Android-Manifest.xml.

And add this in last above
Code:
   </application>
Code:
  <activity android:theme="@*android:style/Theme.NoTitleBar.Fullscreen" android:name="com.lidroid.systemui.quickpanel.FlashlightActivity" android:clearTaskOnLaunch="true" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation" />
Since You have edited Android-Manifest.xml you need to sign apk file.

STEP 19
Recompile it .

STEP 20
Sign it.


And push to system/app
 
Last edited:

san122

Senior Member
Jan 20, 2013
1,238
1,593
Unavailable.
8ete7uzy.jpg

Reserved for more....
 
Last edited:

GSculerlor

Senior Member
Oct 23, 2013
441
89
Malang
Reserved
Edit : If i want to place it in ROM, so i must sign all the apk of my ROM ?
Sent from my GT-S5360 using xda app-developers app
 
Last edited:
  • Like
Reactions: GalKill

aemier

Member
Dec 14, 2013
33
0
blitar
Please help me.. After i flash costum kernel Merruk v.2.5 ,, i have problem charge batrai pada saat hp off tidak ada gambar batrai charger.. Please help me... Sorry i bad english
 

m4RinKo2

Senior Member
Oct 5, 2012
947
512
24
Hi. U guided me once. And it works but toogles are misplaced. I looked at every file but cant see anything wrong. Here is my systemui, so if u have time , could you take a look at it? TIA
 

Attachments

  • SystemUI.apk
    718.4 KB · Views: 278
  • SC20140212-103104.png
    SC20140212-103104.png
    31.1 KB · Views: 961
  • Like
Reactions: kuku.arch

aemier

Member
Dec 14, 2013
33
0
blitar
After change the kernel merruk v.2.5 ..when the battery charge at the time of hp off I can not see the picture batrai charging... Please help me.. .. Sorry i bad english

Sent from my GT-S5360 using xda premium
 

SpaceCaker

Senior Member
Mar 26, 2011
13,545
10,904
netherlands
www.youtube.com
@san

there is an even easier easier way to add lidroid.

use the smali by mariozawa

and also assign all layoutsnpngs ids and such all in the lidroid res apk.

so the newbies dont need to fix the const values and only need to add the smali folders and add 1 line to layout ;)

Sent from my S500 using xda app-developers app
 
  • Like
Reactions: san122

san122

Senior Member
Jan 20, 2013
1,238
1,593
Unavailable.
  • Like
Reactions: Aleemk9

Aleemk9

Senior Member
Jan 19, 2014
50
16
Mahrashtra,aurangabad
success... but not showing brightness slider.
anyway plz tell me how to mov this lidroid taggels to quick panel button ??
 

Attachments

  • 20140219132106.png
    20140219132106.png
    38.4 KB · Views: 288

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    Hello guys today iam going to teach you how to add lidroid toggles in grid view in AOSP/CM/Stock roms.
    Maybe i have forgot something so dont blame me Let me know it first and i will change it
    .



    Things REQUIRED.

    1.Patience [Heavily Needed]
    2.Lots of time.
    3.My provided files.Here: Public.xml and Lidroid_Resources.zip
    4.Notepad++ etc.


    The guide is divide into two parts.
    1.XML PART [Includes xml editing ]
    2.SMALI PART [ Includes smali editing ]



    Lets start with XML PART first.

    STEP 1

    Open ids.xml under res/values foler and add these in last above

    Code:
    <item type="id" name="quickpanel_button">false</item>
        <item type="id" name="quickpanel_text">false</item>
        <item type="id" name="quickpanel_image">false</item>
        <item type="id" name="quickpanel_indicator">false</item>
        <item type="id" name="Lidroid">false</item>


    STEP 2

    Open dimens.xml under res/values foler and add these in last above
    Code:
    </resources>

    Code:
    quickpanel_button_height">79.0px

    STEP 3
    Open strings.xml under res/values foler and add these in last above
    Code:
        <string name="quickpanel_wifi_text">Wi-Fi</string>
        <string name="quickpanel_bluetooth_text">Bluetooth</string>
        <string name="quickpanel_gps_text">GPS</string>
        <string name="quickpanel_sound_text">Sound</string>
        <string name="quickpanel_sound_vibration_text">"Sound Vibration"</string>
        <string name="quickpanel_silent_text">Silent</string>
        <string name="quickpanel_vibration_text">Vibration</string>
        <string name="quickpanel_rotation_text">"Auto rotation"</string>
        <string name="quickpanel_shutdown_text">Phone will be shutdown</string>
        <string name="quickpanel_shutdown_confirm">Shutdown</string>
        <string name="quickpanel_sound_vibrate">Vibrate</string>
        <string name="quickpanel_sound_sound">Sound</string>
        <string name="quickpanel_sound_silent">Silent</string>
        <string name="quickpanel_sound_sound_vibrate">Sound Vibrate</string>
        <string name="quickpanel_sync">Sync</string>
        <string name="quickpanel_wifiap">Wifi Ap</string>
        <string name="quickpanel_wifi">Wifi</string>
        <string name="quickpanel_rotation">Auto Rotate</string>
        <string name="quickpanel_airplane">Airplane</string>
        <string name="quickpanel_bluetooth">Bluetooth</string>
        <string name="quickpanel_brightness">Brightness</string>
        <string name="quickpanel_flashlight">Flashlight</string>
        <string name="quickpanel_gps">GPS</string>
        <string name="quickpanel_lockscreen">Lockscreen</string>
        <string name="quickpanel_mobiledata">Data</string>
        <string name="quickpanel_reboot">Reboot</string>
        <string name="quickpanel_reboot_text">Phone will reboot</string>
        <string name="quickpanel_screen_timeout">Screen Timeout</string>
        <string name="quickpanel_recovery">Recovery</string>
    STEP 5
    Delete these if they are already present
    Code:
    <string name="quickpanel_wifi_text">Wi-Fi</string>
        <string name="quickpanel_bluetooth_text">Bluetooth</string>
        <string name="quickpanel_gps_text">GPS</string>
        <string name="quickpanel_sound_text">Sound</string>
        <string name="quickpanel_sound_vibration_text">"Sound Vibration"</string>
        <string name="quickpanel_silent_text">Silent</string>
        <string name="quickpanel_vibration_text">Vibration</string>
        <string name="quickpanel_rotation_text">"Auto rotation"</string>

    STEP 6
    Merge attached files with your SystemUI.apk


    STEP 7
    Recompile Your App.


    STEP 8
    Decompile it again.

    STEP 9
    Open Statusbar_expanded.xml or any other xml where you want to place lidroid toggles.

    STEP 10
    And Add this where you want to place the lidroid toggles.
    Code:
        <com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/Lidroid" android:layout_width="fill_parent" android:layout_height="wrap_content" />


    Now lets complete the SMALI PART

    SMALI PART

    STEP 11
    Open com/android/systemui/statusbar/StatusBarService.smali

    STEP12
    In
    Code:
    # instance fields
    Below
    Code:
    .field mPositionTmp:[I
    Add this line
    Code:
    .field mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    STEP 13

    In
    Code:
     .method private makeStatusBarView(Landroid/content/Context;)V


    Add this in last above
    Code:
     .line (A numeric value will be there)
        return-void
        
    
    .line 656
        iget-object v5, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
    
        const v6, 0x7f090039
    
        invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    
        move-result-object v5
    
        check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        iput-object v5, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
    STEP 14
    Open your public.xml
    Search for "Lidroid" id and copy its public id and replace it with id of above code i.e with "0x7f090039"


    STEP 15
    OPEN Statusbarservice.smali again

    STEP 16
    In
    Code:
     .method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
    Add this in last above
    Code:
    .line (A numeric value will be there)
        return-void

    Code:
    .line 1900
        iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->updateWidget()V

    NOTE..
    Here "0x7f090039" is the public id of id "Lidroid"


    STEP17
    Now open all files in com/lidroid/systemui/quickpanel folder

    Search "0x7f" Copy the whole id .

    Open my provided public.xml

    Search for that id in my public.xml

    Copy the text of that id.

    Like if my Public id is "0x7f030011"



    Then i will copy "quickpanel_button".

    Now find same text in your public.xml

    Copy its public id .

    And replace the id of all smali files with your public.xml's id.

    Similarly do this with all smali files available in quickpanel folder.

    STEP 18
    Now open your apps Android-Manifest.xml.

    And add this in last above
    Code:
       </application>
    Code:
      <activity android:theme="@*android:style/Theme.NoTitleBar.Fullscreen" android:name="com.lidroid.systemui.quickpanel.FlashlightActivity" android:clearTaskOnLaunch="true" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation" />
    Since You have edited Android-Manifest.xml you need to sign apk file.

    STEP 19
    Recompile it .

    STEP 20
    Sign it.


    And push to system/app
    6
    CREDITS;;
    ryanfebriyadi
    PineappleOwl
    MuSaddiq
    Lidroid
    serajr
    5
    8ete7uzy.jpg

    Reserved for more....
    1
    Reserved
    Edit : If i want to place it in ROM, so i must sign all the apk of my ROM ?
    Sent from my GT-S5360 using xda app-developers app
    1
    Please help me.. After i flash costum kernel Merruk v.2.5 ,, i have problem charge batrai pada saat hp off tidak ada gambar batrai charger.. Please help me... Sorry i bad english

    I cant undersrtand what are u saying?

    Sent from my GT-S5360 using Tapatalk 2