[Galaxy Note GT-N7000 Android Development] majdinj:
Continue moddings!!

SMS hack: SMS 200 recipients, stop SMS to MMS auto-converting, increase SMS hour limit, 1000 slides, group messages, scheduled messages and save/restore messages

I. SMS 200 recipients:

1) Backsmali SecMMs.apk

2) Navigate to and open classout\com\android\mms\MmsConfig.smali

3) Search for ".method public static getRecipientLimit()I" and do these changes:

.method public static getRecipientLimit()I
.registers 1

.prologue
.line 656
[B][COLOR="Red"]sget v0, Lcom/android/mms/MmsConfig;->mRecipientLimit:I[/COLOR][/B]

return v0
.end method

to:

.method public static getRecipientLimit()I
.registers 1

.prologue
.line 656
[B][COLOR="Blue"]const/16 v0, 0xc8[/COLOR][/B]

return v0
.end method

Save changes and recompile (smali) your apk.

II. Stop SMS to MMS auto-converting:

1)	Backsmali SecMMs.apk

2)	Navigate to and open classout\com\android\mms\MmsConfig.smali

3)	Search for "Lcom/android/mms/MmsConfig;->mMaxImageWidthRestrictedMode:I" and do these changes:

sput v0, Lcom/android/mms/MmsConfig;->mMaxImageWidthRestrictedMode:I

.line 153
[B][COLOR="Red"]sput v7, Lcom/android/mms/MmsConfig;->mRecipientLimit:I[/COLOR][/B]

.line 154
[B][COLOR="Red"]const/16 v0, 0xc8[/COLOR][/B]

sput v0, Lcom/android/mms/MmsConfig;->mDefaultSMSMessagesPerThread:I

to:

sput v0, Lcom/android/mms/MmsConfig;->mMaxImageWidthRestrictedMode:I

.line 153
[B][COLOR="Blue"]const/16 v0, 0x3e8
[/COLOR][/B]
.line 154
[B][COLOR="Blue"]sput v0, Lcom/android/mms/MmsConfig;->mRecipientLimit:I[/COLOR][/B]

sput v0, Lcom/android/mms/MmsConfig;->mDefaultSMSMessagesPerThread:I

4)	Then search for "Lcom/android/mms/MmsConfig;->mAllowAttachAudio:Z" and do these changes:

.line 161
sput-boolean v2, Lcom/android/mms/MmsConfig;->mAllowAttachAudio:Z

.line 164
[B][COLOR="Red"]const/4 v0, 0x4[/COLOR][/B]

sput v0, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I

to:

.line 161
sput-boolean v2, Lcom/android/mms/MmsConfig;->mAllowAttachAudio:Z

.line 164
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]

sput v0, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I

5)	Then search for ".method public static getMaxRecipientLength()I" and do these changes:

.method public static getMaxRecipientLength()I
.registers 1

.prologue
.line 2259
[B][COLOR="Red"]sget v0, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I[/COLOR][/B]

return v0
.end method

to:

.method public static getMaxRecipientLength()I
.registers 1

.prologue
.line 2259
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]

return v0
.end method

6)	Then search for ".method public static getMmsMaxRecipient()I" and do these changes:

.method public static getMmsMaxRecipient()I
.registers 1

.prologue
.line 2498
[B][COLOR="Red"]sget v0, Lcom/android/mms/MmsConfig;->mMmsRecipientLimit:I[/COLOR][/B]

return v0
.end method

to:

.method public static getMmsMaxRecipient()I
.registers 1

.prologue
.line 2498
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]

return v0
.end method

7)	Then search for ".method public static getSmsToMmsTextThreshold()I" and do these changes:

.method public static getSmsToMmsTextThreshold()I
.registers 1

.prologue
.line 585
[B][COLOR="Red"]sget v0, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I[/COLOR][/B]

return v0
.end method

to:

.method public static getSmsToMmsTextThreshold()I
.registers 1

.prologue
.line 585
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]

return v0
.end method

8)	Then search for "Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I" and add this line above it (the blue one):

move-result v10

[B][COLOR="Blue"]const/16 v9, 0x3e8[/COLOR][/B]

sput v10, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I

.line 1638
sget v10, Lcom/android/mms/MmsConfig;->mMinRecipientLength:I

9)	Then search for "Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I" and add this line above it (the blue one):

move-result v1

[B][COLOR="Blue"]const/16 v1, 0x3e8[/COLOR][/B]

sput v1, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I

.line 1817
const-string v1, "Mms/MmsConfig"

10)	Then search for "Lcom/android/mms/MmsConfig;->mRecipientLimit:I" add this line above it (the blue one):

invoke-interface {v0, v1, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

move-result v1

[B][COLOR="Blue"]const/16 v1, 0x3e8[/COLOR][/B]

sput v1, Lcom/android/mms/MmsConfig;->mRecipientLimit:I

11) Save changes and recompile (smali) your apk.. phewww wow we finished :D

III. Increase SMS hour limit:

1) Backsmali SecMMs.apk

2) Navigate and open classout\com\android\mms\util\RateController.smali

3) Look for this line:

.field private static final RATE_LIMIT:I = [B][COLOR="Red"]0x64[/COLOR][/B]

and change it to:

.field private static final RATE_LIMIT:I = [B][COLOR="Blue"]0x3e8[/COLOR][/B]

4) Save changes and recompile (smali) your apk

VI. 1000 slides for MMS:

- Baksmali SecMms.apk

- Go to classout\com\android\mms folder and open MmsConfig.smali

- Now Search for ".method public static getMaxSlideCount()I" and do the following change..

Before:

.method public static getMaxSlideCount()I
.registers 1

.prologue
.line 825
[B][COLOR="Red"]sget v0, Lcom/android/mms/MmsConfig;->mMaxSlideCount:I[/COLOR][/B]

return v0
.end method

After:

.method public static getMaxSlideCount()I
.registers 1

.prologue
.line 825
[B][COLOR="Blue"]const/16 v0, 0x3e8[/COLOR][/B]

return v0
.end method

Save changes and smali your SecMms.apk and push it to phone and fix permissions to rw-r--r-- (644)

V. Group messages, scheduled messages and save/restore messages:

Already a great tutorial by [MENTION=4454815]jovy23[/MENTION] is here.

23 toggles notification panel (Lidroid way)

1. Decompile SystemUI.apk by APK-Multi-Tool.

2. Navigate to res\layout folder and open tw_status_bar_expanded.xml and do these changes (delete red lines, add blue lines, and modify the green one to be like it):

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/tw_close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
<TextView android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_marginTop="@dimen/tw_notification_panel_header_height" />
[B][COLOR="Blue"]<HorizontalScrollView android:id="@id/quicksetting_scroller" android:visibility="gone" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
<com.wanam.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height" />
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip" android:layout_marginTop="@dimen/notification_panel_quicksettingbtn_height">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>[/COLOR][/B]
[B][COLOR="SeaGreen"]<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/notification_panel_notification_top_margin" android:overScrollMode="ifContentScrolls">[/COLOR][/B]
<LinearLayout android:orientation="vertical" android:id="@id/scrollCart" android:layout_width="fill_parent" android:layout_height="wrap_content">
[B][COLOR="Red"]<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>[/COLOR][/B]
<LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/noNotificationsText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height" android:text="@string/status_bar_no_notifications_title" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<LinearLayout android:orientation="vertical" android:id="@id/notificationCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/latestNotificationText" android:paddingLeft="11.0dip" android:layout_width="180.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_alignParentLeft="true" />
<TextView android:textSize="@dimen/status_bar_expanded_notification_clear_button_text_size" android:textColor="@color/tw_status_bar_clear_btn_text" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/notificationItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
</LinearLayout>
</ScrollView>
</FrameLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:src="@drawable/tw_status_bar_close" android:scaleType="fitXY" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:layout_marginBottom="10.0dip" />
</RelativeLayout>
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>

To make life easy, you can simply download the modified tw_status_bar_expanded.xml file and paste it over the original one.

3. Navigate to res\values\ folder and open ids.xml and add the following line at the end before </resources> line:

<item type="id" name="exp_power_stat">false</item>

4. Navigate to and open smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali file, now search for ".field mPostCollapseCleanup:Ljava/lang/Runnable;" and add this line bellow it (the blue one here):

.field mPostCollapseCleanup:Ljava/lang/Runnable;

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

.field mQueueLock:Ljava/lang/Object;

5. Still in PhoneStatusBar.smali, search for ".method public addIcon" and add these lines (the blue ones) at the end of this method before the "return-void" line:

invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V

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

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

return-void
.end method

6. Still in PhoneStatusBar.smali, search for ".method protected makeStatusBarView", then search for "Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V" and add these lines (the blue ones) bellow it:

invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V

[B][COLOR="Blue"]move-object/from16 v0, p0

iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

const v10, [COLOR="Purple"]0x7fxxxxxx[/COLOR]

invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

move-result-object v9

check-cast v9, Lcom/wanam/systemui/quickpanel/PowerWidget;

move-object/from16 v0, p0

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

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

7. Still in PhoneStatusBar.smali, search for "Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;" and add these lines bellow it (the blue ones):

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

[B][COLOR="Blue"] move-object/from16 v0, p0

iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;

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

.line 875
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useTouchWizGUI:Z

Now save changes and close.

8. Now we need to edit the head of AndroidManifest.xml in SystemUI.apk and add system status to the main core (this is important step to make Torch and Reboot toggles work!!).

Before:

<?xml version="1.0" encoding="utf-8"?>
[B][COLOR="Red"]<manifest android:versionCode="16" android:versionName="4.1.2-N7000XXLSZ" package="com.android.systemui" coreApp="true"[/COLOR][/B]
xmlns:android="http://schemas.android.com/apk/res/android">

After:

<?xml version="1.0" encoding="utf-8"?>
[B][COLOR="Red"]<manifest android:versionCode="16" android:versionName="4.1.2-N7000XXLSZ" package="com.android.systemui" coreApp="true" [COLOR="Blue"]android:sharedUserId="android.uid.system" android:process="system"[/COLOR][/COLOR][/B]
xmlns:android="http://schemas.android.com/apk/res/android">

9. Download the following smalis and add them to smali folder in SystemUI.apk (there are 2 wanam folders, put the correct one inside its corresponding folder inside SystemUI.apk\smali folder).

10. Now we have finished from modifying SystemUI.apk, Recompile AND SIGN the finished project!!!.

11. Now since SystemUI.apk is signed, it will not work properly until we disable signature check on "services.jar". So backsmali services.jar file and navigate to classout\com\android\server\pm folder and open PackageManagerService.smali and search for ".method static compareSignatures" and change the entire method to:

.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.registers 9
.parameter "s1"
.parameter "s2"

.prologue
const/4 v6, 0x0

const-string v3, "Wanam: PackageManager"

const-string v4, "Skip signature check."

invoke-static {v3, v4}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I

return v6

.end method

Save changes and recompile (smali) services.jar file.

12. Download the following system app and resource (LidroidSettings.apk and lidroid-res.apk)

13. Push all files to your phone and... look to the results :D

Notification panel lock screen and recent apps

1. Decompile SystemUI.apk by APK-Multi tool

2. Navigate to res\drawable-xhdpi folder and put these new resource images there.

3. Navigate to res\layout folder and open tw_status_bar_expanded_header.xml and add the following lines (the blue ones):

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="39.0dip" android:baselineAligned="false"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:textColor="#ffffffff" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:layout_marginTop="-3.0dip" android:singleLine="true" systemui:ampmSmall="true" />
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:textColor="#ffffffff" android:ellipsize="none" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="4.0dip" android:maxLines="2" />
<com.android.systemui.statusbar.RotationToggle android:id="@id/rotation_lock_button" android:visibility="gone" android:clickable="true" android:layout_width="32.0dip" android:layout_height="32.0dip" android:layout_margin="8.0dip" android:button="@drawable/ic_notify_rotation" android:contentDescription="@string/accessibility_rotation_lock_off" />
<Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" />
[B][COLOR="Blue"]<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:paddingLeft="2.0dip" android:paddingRight="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_toLeftOf="@id/back" android:contentDescription="@string/accessibility_recent" systemui:keyCode="187" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:paddingLeft="2.0dip" android:paddingRight="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lock" android:layout_toLeftOf="@id/settings_button" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:glowBackground="@drawable/ic_sysbar_highlight" />[/COLOR][/B]
<ImageView android:layout_width="1.0dip" android:layout_height="25.0dip" android:layout_marginTop="7.0dip" android:layout_marginBottom="7.0dip" android:src="@drawable/tw_quick_panel_plnm_setting_dv" />
<RelativeLayout android:id="@id/settings_button" android:background="@drawable/tw_quick_panel_setting_button_bg" android:focusable="true" android:visibility="visible" android:layout_width="@dimen/status_bar_expanded_setting_width" android:layout_height="39.0dip">
<ImageView android:id="@id/settings_button_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_quickpanel_icon_settings" android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@string/accessibility_settings_button" />
</RelativeLayout>
</LinearLayout>

4. Save changes, recompile and push to your phone.

Results: