Post Reply

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

OP san122

11th February 2014, 09:05 AM   |  #1  
san122's Avatar
OP Senior Member
Flag Unavailable.
Thanks Meter: 1,560
 
1,229 posts
Join Date:Joined: Jan 2013
More
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 by san122; 12th February 2014 at 12:04 PM.
The Following 17 Users Say Thank You to san122 For This Useful Post: [ View ]
11th February 2014, 09:06 AM   |  #2  
san122's Avatar
OP Senior Member
Flag Unavailable.
Thanks Meter: 1,560
 
1,229 posts
Join Date:Joined: Jan 2013
More
CREDITS;;
ryanfebriyadi
PineappleOwl
MuSaddiq
Lidroid
serajr
Last edited by san122; 12th February 2014 at 12:32 PM.
The Following 3 Users Say Thank You to san122 For This Useful Post: [ View ]
11th February 2014, 09:20 AM   |  #3  
san122's Avatar
OP Senior Member
Flag Unavailable.
Thanks Meter: 1,560
 
1,229 posts
Join Date:Joined: Jan 2013
More

Reserved for more....
Last edited by san122; 11th February 2014 at 09:35 AM.
The Following 2 Users Say Thank You to san122 For This Useful Post: [ View ]
11th February 2014, 11:37 AM   |  #4  
GSculerlor's Avatar
Senior Member
Flag Malang
Thanks Meter: 84
 
430 posts
Join Date:Joined: Oct 2013
More
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 by GSculerlor; 29th March 2014 at 04:29 AM.
The Following User Says Thank You to GSculerlor For This Useful Post: [ View ]
11th February 2014, 01:47 PM   |  #5  
m4RinKo2's Avatar
Senior Member
Thanks Meter: 461
 
828 posts
Join Date:Joined: Oct 2012
More
Thanks for sharing!
11th February 2014, 05:38 PM   |  #6  
aemier's Avatar
Junior Member
Flag blitar
Thanks Meter: 0
 
14 posts
Join Date:Joined: Dec 2013
Donate to Me
More
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
11th February 2014, 08:24 PM   |  #7  
kumar akarsh's Avatar
Senior Member
Thanks Meter: 34
 
147 posts
Join Date:Joined: Dec 2012
awesome guide sir!!!!!!
12th February 2014, 01:18 AM   |  #8  
san122's Avatar
OP Senior Member
Flag Unavailable.
Thanks Meter: 1,560
 
1,229 posts
Join Date:Joined: Jan 2013
More
HAS anyone tried?

Sent from my GT-S5360 using Tapatalk 2
12th February 2014, 01:19 AM   |  #9  
san122's Avatar
OP Senior Member
Flag Unavailable.
Thanks Meter: 1,560
 
1,229 posts
Join Date:Joined: Jan 2013
More
Quote:
Originally Posted by aemier

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
The Following User Says Thank You to san122 For This Useful Post: [ View ]
12th February 2014, 09:33 AM   |  #10  
m4RinKo2's Avatar
Senior Member
Thanks Meter: 461
 
828 posts
Join Date:Joined: Oct 2012
More
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
Attached Thumbnails
Click image for larger version

Name:	SC20140212-103104.png
Views:	511
Size:	31.1 KB
ID:	2574855  
Attached Files
File Type: apk SystemUI.apk - [Click for QR Code] (718.4 KB, 108 views)

The Following User Says Thank You to m4RinKo2 For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Galaxy Y GT-S5360 General by ThreadRank