How to Port Lidroid Toggles to non Samsung ICS 4.0 roms

Search This thread

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
HOW TO PORT LIDROID TOGGLES
TO NON SAMSUNG ICS ROMS



for JB you can go here : http://xdaforums.com/showthread.php?t=2381290

Credit & Thank you :
- @lidroid
- Recognized themer @serajr for some additional toggles created by him.

and we are going to port 21 Lidroid toggles :
( -Lock screen/screen-off action, -Reboot action, -Shutdown action, -Airplane mode, -Bluetoth, -Brightness, -GPS, -Flashlight, -Lockscreen, -MobileData, -Orientation, -ScreenTimeOut, -Sound, -Sync, -Wi-fi, -Wi-fi Hotspot, Battery info, Stay awake, USB Connection mode, USB Debugging, Network mode )


NOTE !! , for CyanogenMod 9 do not follow this guide, you can just flash my mod for CM9 in here http://xdaforums.com/showthread.php?t=2334200
many users from different devices reported work on their phone :)

ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE

REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else




1. Decomple SystemUI.apk
- res/values/ids.xml
add this to the end :
Code:
    <item type="id" name="quickpanel_button">false</item>
    <item type="id" name="quickpanel_button_image">false</item>
    <item type="id" name="quickpanel_button_text">false</item>
    <item type="id" name="quickpanel_button_indic">false</item>
    <item type="id" name="adi_quickpanel">false</item>

- res/values/strings.xml
add this to the end :
Code:
    <string name="quickpanel_wifi_text">WiFi</string>
    <string name="quickpanel_dc_text">Data</string>
    <string name="quickpanel_network_mode_text">Network</string>
    <string name="quickpanel_sound_text">Ring</string>
    <string name="quickpanel_sound_vibration_text">Ring Vibrate</string>
    <string name="quickpanel_silent_text">Silent</string>
    <string name="quickpanel_vibration_text">Vibration</string>
    <string name="quickpanel_rotation_text">Orientation</string>
    <string name="quickpanel_bluetooth_text">Bluetooth</string>
    <string name="quickpanel_gps_text">GPS</string>
    <string name="quickpanel_autosync_text">Auto Sync</string>
    <string name="quickpanel_brightness_text">Brightness</string>
    <string name="quickpanel_screen_timeout_text">Timeout</string>
    <string name="quickpanel_lockscreen_text">Lockscreen</string>
    <string name="quickpanel_airplane_text">Airplane</string>
    <string name="quickpanel_flashlight_text">Flashlight</string>
    <string name="quickpanel_reboot_text">Reboot</string>
    <string name="quickpanel_shutdown_text">Shutdown</string>
    <string name="airplane_mode">In Flight mode</string>
    <string name="shutdown_confirm">Your phone will shut down.</string>
    <string name="screen_timeout_seconds">Screen timeout set to: %d second(s)</string>
    <string name="screen_timeout_minutes">Screen timeout set to: %d minute(s)</string>
    <string name="screen_timeout_hours">Screen timeout set to: %d hour(s)</string>
    <string name="hamster">Phone Options</string>
    <string name="yes">OK</string>
    <string name="no">Cancel</string>
    <string name="reboot">Reboot</string>
    <string name="reboot_recovery">CWM recovery</string>
    <string name="reboot_download">Download</string>
    <string name="quickpanel_usb_debugging_text">USB Debugging</string>
    <string name="quickpanel_usb_connection_mode_text">USB Conn. Mode</string>
    <string name="quickpanel_usb_current_mtp_title">Current mode: MPT</string>
    <string name="quickpanel_usb_current_msc_title">Current mode: MSC</string>
    <string name="usb_mpt_mode">MPT - Media Transfer</string>
    <string name="usb_msc_mode">MSC - Mass Storage</string>
    <string name="quickpanel_stay_awake_plugged_text">Stay Awake</string>
    <string name="quickpanel_battery_info_text">Battery Info</string>
    <string name="battery_info_info">Battery Information</string>
    <string name="battery_info_usage">Battery Power Usage</string>
    <string name="quickpanel_wifi_ap_text">Wifi AP</string>
    <string name="quickpanel_lockscreen_action_text">Lock Now</string>

- res/layout/status_bar_expanded.xml
add the red code :
MEDIATEK device
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
        <include layout="@layout/zzz_toolbar_view" />
        <include layout="@layout/zzz_toolbar_indicator" />
    </FrameLayout>
    <View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
    <RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
        <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
        <ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
        <ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
    </RelativeLayout>
    [COLOR="Red"]<com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
    <View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
    <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
        <TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
        <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
            <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
            </LinearLayout>
        </ScrollView>
        <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
    </FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>


AOSP / XPERIA
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
        <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
        <ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
        <ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
    </RelativeLayout>
    [COLOR="Red"]<com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
    <View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
    <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
        <TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
        <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
            <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
            </LinearLayout>
        </ScrollView>
        <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
    </FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>


- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali

add the blue code :
Code:
.field mPixelFormat:I

.field mPositionTmp:[I

.field mPostCollapseCleanup:Ljava/lang/Runnable;

[COLOR="Blue"].field mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]

.field private mPreviousConfigFontScale:F

.field mQueueLock:Ljava/lang/Object;

.field private mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;

NEXT still in the same smali

for MEDIATEK devices
find this method
Code:
# virtual methods
.method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
scroll down and add the blue code
Code:
 invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V

    [COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

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

    .line 601
    return-void
.end method

next find this method :
Code:
.method protected makeStatusBarView()Landroid/view/View;
scroll down and add the blue code
Code:
 const [COLOR="Red"]v11[/COLOR], 0x7f0e0041

    invoke-virtual {[COLOR="Red"]v2, v11[/COLOR]}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object [COLOR="Red"]v11[/COLOR]

    check-cast [COLOR="Red"]v11[/COLOR], Landroid/widget/ScrollView;

    iput-object [COLOR="Red"]v11, p0[/COLOR], Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;

	[COLOR="Blue"]const [COLOR="Red"]v11[/COLOR], 0x7f0e0096

    invoke-virtual {[COLOR="Red"]v2, v11[/COLOR]}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

    move-result-object [COLOR="Red"]v11[/COLOR]

    check-cast [COLOR="Red"]v11[/COLOR], Lcom/lidroid/systemui/quickpanel/PowerWidget;

    iput-object [COLOR="Red"]v11, p0[/COLOR], Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]

    .line 375
    new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;

    invoke-direct {v11, p0, v1, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V

    iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;
pay attention on the red code in the part of blue code, it has to be written the same like above it/previous part
and also every mediatek device may be have diferent code,. see my another example in here : http://xdaforums.com/showpost.php?p=44095535&postcount=7


next still in the same method, scroll down , and add the blue code
Code:
const-string v11, "android.intent.action.SIM_INFO_UPDATE"

    invoke-virtual {v9, v11}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 450
    iget-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSIMInfoReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v1, v11, v9}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

   
    [COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]

    .line 454
    return-object v6

    .line 312
    .end local v3           #filter:Landroid/content/IntentFilter;
    .end local v4           #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
    .end local v6           #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    .end local v8           #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
    .end local v9           #simInfoIntentFilter:Landroid/content/IntentFilter;
    .end local v10           #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;

for AOSP / XPERIA
find this method
Code:
# virtual methods
.method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
scroll down and add the blue code

Code:
 const-string v8, "android.intent.action.SCREEN_OFF"

    invoke-virtual {v2, v8}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 373
    iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    [COLOR="Blue"]iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;

    const v6, 0x7f0e0096

    invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/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/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

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

    invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]

    .line 375
    return-object v4

    .line 306
    .end local v2           #filter:Landroid/content/IntentFilter;
    .end local v6           #signalCluster:Lcom/android/systemui/statusbar/SignalClusterView;
    .end local v7           #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
    :catch_0
    move-exception v8

    goto/16 :goto_0
.end method

CONTINUE TO POST #2
 
Last edited:

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
2. Download source_ICS_Lidroid_SytemUI.apk
Exstract it and merge to your decompiled SystemUI.apk
NOTE !! if your device has arrays.xml in res/values/here
please do check again the source_ICS_Lidroid_SytemUI.apk and adapt the arrays.xml code in it with yours

done and Recompile your SystemUI.apk

3. Decompile the newly Recompiled APK again and go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open

next
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
with Notepad++ , control+F

MEDIATEK DEVICES
Code:
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;

	const v11, [COLOR="Red"]0x7f0e0096[/COLOR]

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

    move-result-object v11

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

    iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    .line 375
    new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;

AOSP/XPERIA
Code:
invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;

    const v6, [COLOR="Red"]0x7f0e0096[/COLOR]

    invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/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/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

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

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

    .line 375
    return-object v4

Replace 0x7f0e0096 with the new ids from second decompiled public.xml
Code:
<public type="id" name="[COLOR="Blue"]adi_quickpanel[/COLOR]" id="[COLOR="Red"]0x7fxxxxxx[/COLOR]" />

NEXT CONTINUE IN POST #3
 
Last edited:

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
4. Download ICS_Lidroid_public.xml
and open it with Notepad++
so now you have two public.xml which is opened in the Notepad++
1. second decompiled public.xml
2. ICS_Lidroid_public.xml

- go to , smali/com/lidroid/systemui/quickpanel/here...
there are a lot of smalis there

FIND ALL IDS in all that smalis THAT'S STARTED WITH
Code:
[COLOR="Red"]0x7fxxxxxx[/COLOR]

EXAMPLE :
AirplaneButton.smali
find this :
Code:
const v0, [COLOR="Red"]0x7f080089[/COLOR]

find 0x7f080089 in ICS_Lidroid_public.xml

Code:
     <public type="string" name="quickpanel_lockscreen_text" id="0x7f080088" />
    <public type="[COLOR="Blue"]string[/COLOR]" name="[COLOR="Green"]quickpanel_airplane_text[/COLOR]" id="[COLOR="Red"]0x7f080089[/COLOR]" />
    <public type="string" name="quickpanel_flashlight_text" id="0x7f08008a" />

we find that 0x7f080089 is for string .... quickpanel_airplane_text
Next, find string .... quickpanel_airplane_text new ids in your
public.xml of second decompiled SystemUI.apk
Code:
 <public type="[COLOR="Blue"]string[/COLOR]" name="[COLOR="Green"]quickpanel_airplane_text[/COLOR]" id="[COLOR="Red"]0x7fxxxxxx[/COLOR]" />

change the ids in AirplaneButton.smali with your new ids from public.xml of second decompiled systemui.apk.

Do it too, to all
Code:
[COLOR="Red"]0x7fxxxxxx[/COLOR]
in all smalis in the lidroid folder.

6. Download this QuickPanel_Settings.apk and push to system/app with right permission

Done :)
 
Last edited:

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
Additional Guide
[HOWTO] Enable 2G/3G, 2G, 3G Toggle

only for devices that support 3G/HSDPA


Go to this thread [HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher
But don't follow the lidroid step, coz we have it already :)

or Without patching Phone.apk , but with editing Lidroid and Android.manifest
go here : http://xdaforums.com/showpost.php?p=40971646&postcount=30




[Porting Guide][ICS] Mod 4.2 Statusbar tilesview (TABS, Slider, Flip Anim, Lidroid )
http://xdaforums.com/showthread.php?t=2423398




Guide How to full screen Expanded Pulldown JB style
http://xdaforums.com/showthread.php?p=45130177#post45130177
 
Last edited:

dafuqChicken

Member
Jul 30, 2013
11
3
I think that should be done before step 2 because I have the error code in PhoneStatusBar.smali 0x7f0e0096 in step 1


uploadfromtaptalk1375153267381.jpg


I made 2 previous steps then get the code received from <public type="id" name="adi_quickpanel" id="0x7fxxxxxx" /> instead PhoneStatusBar.smali then recompile and it's ok


uploadfromtaptalk1375153292741.jpg


My device is Lenovo A390



Sorry for my bad English! :D

Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
 

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
try this @grvrulz
add the blue code, but don't add <-- adi_quickpanel
Code:
    [COLOR="Red"]const v13, 0x7f0e0042

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

    move-result-object v13

    check-cast v13, Landroid/widget/ScrollView;

    move-object/from16 v0, p0

    iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;[/COLOR]

    [B]blue lines below is basically a copy from above red lines[/B]

    [COLOR="Blue"]const v13, 0x7f0e0042  <-- adi_quickpanel

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

    move-result-object v13

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

    move-object/from16 v0, p0

    iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
 
Last edited:

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
I think that should be done before step 2 because I have the error code in PhoneStatusBar.smali 0x7f0e0096 in step 1


View attachment 2152085


I made 2 previous steps then get the code received from <public type="id" name="adi_quickpanel" id="0x7fxxxxxx" /> instead PhoneStatusBar.smali then recompile and it's ok


View attachment 2152086


My device is Lenovo A390



Sorry for my bad English! :D

Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2

oke , how is the result now ?, is there any I can help :)
 
  • Like
Reactions: x-dira

grvrulz

Member
May 14, 2013
35
2
Jaipur
Still doesn't work

try this @grvrulz
add the blue code, but don't add <-- adi_quickpanel
Code:
    [COLOR="Red"]const v13, 0x7f0e0042

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

    move-result-object v13

    check-cast v13, Landroid/widget/ScrollView;

    move-object/from16 v0, p0

    iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;[/COLOR]

    [B]below is a copied from above[/B]

    [COLOR="Blue"]const v13, 0x7f0e0042  <-- adi_quickpanel

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

    move-result-object v13

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

    move-object/from16 v0, p0

    iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]

Thank you. I completed the whole guide with this, but the quickpanel doesn't show up. I tried rebooting a couple of times and placing the quickpanel widget at different points in the layout, but it still doesn't show up. I took a logcat with 'adb logcat -d > logcat2.txt' and I'm attaching it here for reference.
 

Attachments

  • logcat2.txt
    348.3 KB · Views: 56

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
Thank you. I completed the whole guide with this, but the quickpanel doesn't show up. I tried rebooting a couple of times and placing the quickpanel widget at different points in the layout, but it still doesn't show up. I took a logcat with 'adb logcat -d > logcat2.txt' and I'm attaching it here for reference.

can you attach me your modded PhoneStatusBar.smali ?
 

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
Here's my Phonestatusbar.smali. It's renamed because xda doesn't accept smali files as attachments(but you probably knew it already :p)

Code:
  const-string v13, "file"

    invoke-virtual {v6, v13}, Landroid/content/IntentFilter;->addDataScheme(Ljava/lang/String;)V

    .line 473
    move-object/from16 v0, p0

    iget-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v2, v13, v6}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

	[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]

    .line 475
    return-object v8

    .line 320
    .end local v4           #filter:Landroid/content/IntentFilter;
    .end local v5           #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
    .end local v6           #mediaEjectFilter:Landroid/content/IntentFilter;
    .end local v8           #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    .end local v10           #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
    .end local v11           #simInfoIntentFilter:Landroid/content/IntentFilter;
    .end local v12           #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
    :cond_1
    const v13, 0x7f030020

    const/4 v14, 0x0

    invoke-static {v2, v13, v14}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v8

    check-cast v8, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

    .restart local v8       #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    goto/16 :goto_0

    .line 337
    :catch_0
    move-exception v13

    goto/16 :goto_1
.end method

you havn't add the blue code
 

grvrulz

Member
May 14, 2013
35
2
Jaipur
Code:
  const-string v13, "file"

    invoke-virtual {v6, v13}, Landroid/content/IntentFilter;->addDataScheme(Ljava/lang/String;)V

    .line 473
    move-object/from16 v0, p0

    iget-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v2, v13, v6}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

	[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]

    .line 475
    return-object v8

    .line 320
    .end local v4           #filter:Landroid/content/IntentFilter;
    .end local v5           #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
    .end local v6           #mediaEjectFilter:Landroid/content/IntentFilter;
    .end local v8           #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    .end local v10           #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
    .end local v11           #simInfoIntentFilter:Landroid/content/IntentFilter;
    .end local v12           #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
    :cond_1
    const v13, 0x7f030020

    const/4 v14, 0x0

    invoke-static {v2, v13, v14}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v8

    check-cast v8, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

    .restart local v8       #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    goto/16 :goto_0

    .line 337
    :catch_0
    move-exception v13

    goto/16 :goto_1
.end method

you havn't add the blue code

After adding this, I get the error
Code:
[8180,1] The register number must be less than v16
I also tried adding
Code:
move-object/from16 v0, p0
just before that line but it's still the same..
 

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
After adding this, I get the error
Code:
[8180,1] The register number must be less than v16
I also tried adding
Code:
move-object/from16 v0, p0
just before that line but it's still the same..

try to use PhoneStatusBar.smali code for AOSP/XPERIA from OP,.
or for Touchwizz in here http://xdaforums.com/showthread.php?t=1725411
but change
Code:
Lcom/wanam/systemui/quickpanel/PowerWidget;
to :
Code:
Lcom/lidroid/systemui/quickpanel/PowerWidget;
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    HOW TO PORT LIDROID TOGGLES
    TO NON SAMSUNG ICS ROMS



    for JB you can go here : http://xdaforums.com/showthread.php?t=2381290

    Credit & Thank you :
    - @lidroid
    - Recognized themer @serajr for some additional toggles created by him.

    and we are going to port 21 Lidroid toggles :
    ( -Lock screen/screen-off action, -Reboot action, -Shutdown action, -Airplane mode, -Bluetoth, -Brightness, -GPS, -Flashlight, -Lockscreen, -MobileData, -Orientation, -ScreenTimeOut, -Sound, -Sync, -Wi-fi, -Wi-fi Hotspot, Battery info, Stay awake, USB Connection mode, USB Debugging, Network mode )


    NOTE !! , for CyanogenMod 9 do not follow this guide, you can just flash my mod for CM9 in here http://xdaforums.com/showthread.php?t=2334200
    many users from different devices reported work on their phone :)

    ok lets go to Guide:
    first of all need some requirement for this MOD-GUIDE

    REQUIREMENT:
    - BRAIN
    - Patient
    - experience
    - Know how to decompile/recompiling Apk file
    - notepad++
    - Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else




    1. Decomple SystemUI.apk
    - res/values/ids.xml
    add this to the end :
    Code:
        <item type="id" name="quickpanel_button">false</item>
        <item type="id" name="quickpanel_button_image">false</item>
        <item type="id" name="quickpanel_button_text">false</item>
        <item type="id" name="quickpanel_button_indic">false</item>
        <item type="id" name="adi_quickpanel">false</item>

    - res/values/strings.xml
    add this to the end :
    Code:
        <string name="quickpanel_wifi_text">WiFi</string>
        <string name="quickpanel_dc_text">Data</string>
        <string name="quickpanel_network_mode_text">Network</string>
        <string name="quickpanel_sound_text">Ring</string>
        <string name="quickpanel_sound_vibration_text">Ring Vibrate</string>
        <string name="quickpanel_silent_text">Silent</string>
        <string name="quickpanel_vibration_text">Vibration</string>
        <string name="quickpanel_rotation_text">Orientation</string>
        <string name="quickpanel_bluetooth_text">Bluetooth</string>
        <string name="quickpanel_gps_text">GPS</string>
        <string name="quickpanel_autosync_text">Auto Sync</string>
        <string name="quickpanel_brightness_text">Brightness</string>
        <string name="quickpanel_screen_timeout_text">Timeout</string>
        <string name="quickpanel_lockscreen_text">Lockscreen</string>
        <string name="quickpanel_airplane_text">Airplane</string>
        <string name="quickpanel_flashlight_text">Flashlight</string>
        <string name="quickpanel_reboot_text">Reboot</string>
        <string name="quickpanel_shutdown_text">Shutdown</string>
        <string name="airplane_mode">In Flight mode</string>
        <string name="shutdown_confirm">Your phone will shut down.</string>
        <string name="screen_timeout_seconds">Screen timeout set to: %d second(s)</string>
        <string name="screen_timeout_minutes">Screen timeout set to: %d minute(s)</string>
        <string name="screen_timeout_hours">Screen timeout set to: %d hour(s)</string>
        <string name="hamster">Phone Options</string>
        <string name="yes">OK</string>
        <string name="no">Cancel</string>
        <string name="reboot">Reboot</string>
        <string name="reboot_recovery">CWM recovery</string>
        <string name="reboot_download">Download</string>
        <string name="quickpanel_usb_debugging_text">USB Debugging</string>
        <string name="quickpanel_usb_connection_mode_text">USB Conn. Mode</string>
        <string name="quickpanel_usb_current_mtp_title">Current mode: MPT</string>
        <string name="quickpanel_usb_current_msc_title">Current mode: MSC</string>
        <string name="usb_mpt_mode">MPT - Media Transfer</string>
        <string name="usb_msc_mode">MSC - Mass Storage</string>
        <string name="quickpanel_stay_awake_plugged_text">Stay Awake</string>
        <string name="quickpanel_battery_info_text">Battery Info</string>
        <string name="battery_info_info">Battery Information</string>
        <string name="battery_info_usage">Battery Power Usage</string>
        <string name="quickpanel_wifi_ap_text">Wifi AP</string>
        <string name="quickpanel_lockscreen_action_text">Lock Now</string>

    - res/layout/status_bar_expanded.xml
    add the red code :
    MEDIATEK device
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
        <FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
            <include layout="@layout/zzz_toolbar_view" />
            <include layout="@layout/zzz_toolbar_indicator" />
        </FrameLayout>
        <View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
        <RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
            <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
            <ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
            <ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
        </RelativeLayout>
        [COLOR="Red"]<com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
        <View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
        <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
            <TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
            <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
                <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                    <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
                </LinearLayout>
            </ScrollView>
            <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
        </FrameLayout>
    </com.android.systemui.statusbar.phone.ExpandedView>


    AOSP / XPERIA
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
        <RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
            <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
            <ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
            <ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
        </RelativeLayout>
        [COLOR="Red"]<com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
        <View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
        <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
            <TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
            <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
                <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                    <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
                </LinearLayout>
            </ScrollView>
            <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
        </FrameLayout>
    </com.android.systemui.statusbar.phone.ExpandedView>


    - smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali

    add the blue code :
    Code:
    .field mPixelFormat:I
    
    .field mPositionTmp:[I
    
    .field mPostCollapseCleanup:Ljava/lang/Runnable;
    
    [COLOR="Blue"].field mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
    
    .field private mPreviousConfigFontScale:F
    
    .field mQueueLock:Ljava/lang/Object;
    
    .field private mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;

    NEXT still in the same smali

    for MEDIATEK devices
    find this method
    Code:
    # virtual methods
    .method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
    scroll down and add the blue code
    Code:
     invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
    
        [COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->updateWidget()V[/COLOR]
    
        .line 601
        return-void
    .end method

    next find this method :
    Code:
    .method protected makeStatusBarView()Landroid/view/View;
    scroll down and add the blue code
    Code:
     const [COLOR="Red"]v11[/COLOR], 0x7f0e0041
    
        invoke-virtual {[COLOR="Red"]v2, v11[/COLOR]}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
    
        move-result-object [COLOR="Red"]v11[/COLOR]
    
        check-cast [COLOR="Red"]v11[/COLOR], Landroid/widget/ScrollView;
    
        iput-object [COLOR="Red"]v11, p0[/COLOR], Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
    
    	[COLOR="Blue"]const [COLOR="Red"]v11[/COLOR], 0x7f0e0096
    
        invoke-virtual {[COLOR="Red"]v2, v11[/COLOR]}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
    
        move-result-object [COLOR="Red"]v11[/COLOR]
    
        check-cast [COLOR="Red"]v11[/COLOR], Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        iput-object [COLOR="Red"]v11, p0[/COLOR], Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
    
        .line 375
        new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
    
        invoke-direct {v11, p0, v1, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
    
        iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;
    pay attention on the red code in the part of blue code, it has to be written the same like above it/previous part
    and also every mediatek device may be have diferent code,. see my another example in here : http://xdaforums.com/showpost.php?p=44095535&postcount=7


    next still in the same method, scroll down , and add the blue code
    Code:
    const-string v11, "android.intent.action.SIM_INFO_UPDATE"
    
        invoke-virtual {v9, v11}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
    
        .line 450
        iget-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSIMInfoReceiver:Landroid/content/BroadcastReceiver;
    
        invoke-virtual {v1, v11, v9}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
    
       
        [COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
    
        .line 454
        return-object v6
    
        .line 312
        .end local v3           #filter:Landroid/content/IntentFilter;
        .end local v4           #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
        .end local v6           #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
        .end local v8           #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
        .end local v9           #simInfoIntentFilter:Landroid/content/IntentFilter;
        .end local v10           #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;

    for AOSP / XPERIA
    find this method
    Code:
    # virtual methods
    .method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
    scroll down and add the blue code

    Code:
     const-string v8, "android.intent.action.SCREEN_OFF"
    
        invoke-virtual {v2, v8}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
    
        .line 373
        iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
    
        invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
    
        [COLOR="Blue"]iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
    
        const v6, 0x7f0e0096
    
        invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/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/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
    
        .line 375
        return-object v4
    
        .line 306
        .end local v2           #filter:Landroid/content/IntentFilter;
        .end local v6           #signalCluster:Lcom/android/systemui/statusbar/SignalClusterView;
        .end local v7           #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
        :catch_0
        move-exception v8
    
        goto/16 :goto_0
    .end method

    CONTINUE TO POST #2
    14
    4. Download ICS_Lidroid_public.xml
    and open it with Notepad++
    so now you have two public.xml which is opened in the Notepad++
    1. second decompiled public.xml
    2. ICS_Lidroid_public.xml

    - go to , smali/com/lidroid/systemui/quickpanel/here...
    there are a lot of smalis there

    FIND ALL IDS in all that smalis THAT'S STARTED WITH
    Code:
    [COLOR="Red"]0x7fxxxxxx[/COLOR]

    EXAMPLE :
    AirplaneButton.smali
    find this :
    Code:
    const v0, [COLOR="Red"]0x7f080089[/COLOR]

    find 0x7f080089 in ICS_Lidroid_public.xml

    Code:
         <public type="string" name="quickpanel_lockscreen_text" id="0x7f080088" />
        <public type="[COLOR="Blue"]string[/COLOR]" name="[COLOR="Green"]quickpanel_airplane_text[/COLOR]" id="[COLOR="Red"]0x7f080089[/COLOR]" />
        <public type="string" name="quickpanel_flashlight_text" id="0x7f08008a" />

    we find that 0x7f080089 is for string .... quickpanel_airplane_text
    Next, find string .... quickpanel_airplane_text new ids in your
    public.xml of second decompiled SystemUI.apk
    Code:
     <public type="[COLOR="Blue"]string[/COLOR]" name="[COLOR="Green"]quickpanel_airplane_text[/COLOR]" id="[COLOR="Red"]0x7fxxxxxx[/COLOR]" />

    change the ids in AirplaneButton.smali with your new ids from public.xml of second decompiled systemui.apk.

    Do it too, to all
    Code:
    [COLOR="Red"]0x7fxxxxxx[/COLOR]
    in all smalis in the lidroid folder.

    6. Download this QuickPanel_Settings.apk and push to system/app with right permission

    Done :)
    13
    2. Download source_ICS_Lidroid_SytemUI.apk
    Exstract it and merge to your decompiled SystemUI.apk
    NOTE !! if your device has arrays.xml in res/values/here
    please do check again the source_ICS_Lidroid_SytemUI.apk and adapt the arrays.xml code in it with yours

    done and Recompile your SystemUI.apk

    3. Decompile the newly Recompiled APK again and go to
    res/values/public.xml
    open it with Notepad++
    leave it, but keep it open

    next
    - smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
    with Notepad++ , control+F

    MEDIATEK DEVICES
    Code:
    iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
    
    	const v11, [COLOR="Red"]0x7f0e0096[/COLOR]
    
        invoke-virtual {v2, v11}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
    
        move-result-object v11
    
        check-cast v11, Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        .line 375
        new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;

    AOSP/XPERIA
    Code:
    invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
    
        iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
    
        const v6, [COLOR="Red"]0x7f0e0096[/COLOR]
    
        invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/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/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
    
        .line 375
        return-object v4

    Replace 0x7f0e0096 with the new ids from second decompiled public.xml
    Code:
    <public type="id" name="[COLOR="Blue"]adi_quickpanel[/COLOR]" id="[COLOR="Red"]0x7fxxxxxx[/COLOR]" />

    NEXT CONTINUE IN POST #3
    8
    Additional Guide
    [HOWTO] Enable 2G/3G, 2G, 3G Toggle

    only for devices that support 3G/HSDPA


    Go to this thread [HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher
    But don't follow the lidroid step, coz we have it already :)

    or Without patching Phone.apk , but with editing Lidroid and Android.manifest
    go here : http://xdaforums.com/showpost.php?p=40971646&postcount=30




    [Porting Guide][ICS] Mod 4.2 Statusbar tilesview (TABS, Slider, Flip Anim, Lidroid )
    http://xdaforums.com/showthread.php?t=2423398




    Guide How to full screen Expanded Pulldown JB style
    http://xdaforums.com/showthread.php?p=45130177#post45130177
    2
    try this @grvrulz
    add the blue code, but don't add <-- adi_quickpanel
    Code:
        [COLOR="Red"]const v13, 0x7f0e0042
    
        invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
    
        move-result-object v13
    
        check-cast v13, Landroid/widget/ScrollView;
    
        move-object/from16 v0, p0
    
        iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;[/COLOR]
    
        [B]blue lines below is basically a copy from above red lines[/B]
    
        [COLOR="Blue"]const v13, 0x7f0e0042  <-- adi_quickpanel
    
        invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
    
        move-result-object v13
    
        check-cast v13, Lcom/lidroid/systemui/quickpanel/PowerWidget;
    
        move-object/from16 v0, p0
    
        iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]