Thread Deleted

[TEAM XPOSED][HOW-TO]7/18/12 SystemUI mods and how-tos (new: custom notif background)

13th July 2012, 06:15 PM   |  #1  
freeza's Avatar
OP Recognized Developer
Flag Pasadena, CA
Thanks Meter: 9,729
 
4,273 posts
Join Date:Joined: May 2006
Donate to Me
More
This thread will be about various SystemUI modifications and how to achieve them. The first post will be full of screenshots and my personal mods and the second post will be the how-tos.

First of all, here is my modified SystemUI in its current form. It has been modded to do the following:

Blue ICS icons
Blue style quick toggle icons
Blue notification shade bottom from ICS
Remove clock
Remove carrier ID
Remove quick toggle text

Upcoming mods to it will be:
Battery precentages
Charging battery animations
1x display

Attached Files
File Type: zip Galaxy-S-fre3-SysUImod.zip - [Click for QR Code] (1.22 MB, 2749 views)
Last edited by freeza; 18th July 2012 at 07:03 PM.
The Following 45 Users Say Thank You to freeza For This Useful Post: [ View ]
13th July 2012, 06:57 PM   |  #2  
freeza's Avatar
OP Recognized Developer
Flag Pasadena, CA
Thanks Meter: 9,729
 
4,273 posts
Join Date:Joined: May 2006
Donate to Me
More
HOW-TO
7/18/12: Custom notification pulldown background:
 

First, we're going to use a file that already exists in SystemUI that isn't being used by the system, so that we don't have to create IDs and anything else too difficult. Create your custom background and save it as a png. Yes, it also supports transparency right off the bat! Once you have your custom background selected, name it "status_bar_expand_default.png" and put it in the drawable-xhdpi folder in /res/drawable-xhdpi/ overwriting the current one.

Now navigate to /res/layout/tw_status_bar_tracking.xml and open it with editor

LOOK FOR:
Code:
    <FrameLayout android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
CHANGE
Code:
android:background="#ff000000"
TO:
Code:
android:background="@drawable/status_bar_expand_default"
Save & Close

Compile, push to /system/app/ and change permissions to 644 and reboot or create flashable zip to flash in recovery.



7/17/12: Remove battery full notification:
 

Navigate to /com/android/systemui/power/PowerUI$1.smali

LOOK FOR:
Code:
    iget v14, v14, Lcom/android/systemui/power/PowerUI;->mBatteryStatus:I

    if-ne v13, v14, :cond_1b3

    move-object/from16 v0, p0

    iget-object v13, v0, Lcom/android/systemui/power/PowerUI$1;->this$0:Lcom/android/systemui/power/PowerUI;

    invoke-virtual {v13}, Lcom/android/systemui/power/PowerUI;->notifyFullBatteryNotification()V

    :cond_da
    :goto_da
    const/4 v13, 0x4
REMOVE:
Code:
    invoke-virtual {v13}, Lcom/android/systemui/power/PowerUI;->notifyFullBatteryNotification()V
Save & Close

Compile, push to /system/app/ and change permissions to 644 and reboot or create flashable zip to flash in recovery.


How to decompile troublesome ICS apks on the GS3:
 

Start off by downloading the package I put together with APKTOOL v1.4.2 and v1.4.4: here

You also need to have Java installed, and WinRAR or a comparable archive manager installed.

Extract it and navigate there with a command prompt

Grab your framework-res.apk and SystemUI.apk from your ROM or ADB on your phone and place them in the same directory as your apktools

Open SystemUI with WinRAR or your archive manager and extract the META-INF folder and AndroidManifest.xml file and put them somewhere easy to find.

In command prompt type this command "apktool if framework-res.apk" and if done correct, you will have installed a dependency for whatever you're about to decompile.

The trick is to decompile with 1.4.2 which is named apktool142.jar, so rename that to apktool.jar

Now you're ready to decompile SystemUI. Type this command "apktool d SystemUI.apk" and if done correctly it will start the decompiling process and eventually finish with a new folder "SystemUI" being created.

Now you can make all of your edits.

The next trick is to recompile with 1.4.4 which is named apktool144.jar, but first rename your current apktool.jar back to apktool142.jar then rename apktool144.jar to apktool.jar.

Once done, recompile your SystemUI file by typing "apktool b SystemUI"

Once done, copy the folder and file from earlier "META-INF" and "AndroidManifest.xml" then open the "SystemUI" folder then open "build" then "apk" and paste them here, which will overwrite the current AndroidManifest.xml and create the META-INF folder in there.

Now type "apktool b SystemUI" again and this time it will build much faster than before. Once done your file is ready to be tested!

Open the "SystemUI" folder, go into "dist" and voila, your file is there, signed, and ready to be pushed back to your phone.

Go ahead and push it back with ADB, or with Root Explorer, OR create yourself a flashable zip. Whatever works for you.

Enjoy.


How to remove Quick settings toggle text or hide Quick Settinsg toggle:
 

I have seen inquiries about how to mod the quick toggle area to remove it. It's a fairly easy modification to make. Especially if you already know how to decompile and recompile SystemUI.apk

For the sake of making this HOW-TO short and to the point, I'm going to assume you already know how to successfully decompile and recompile SystemUI.apk. If you don't, I will be posting up another HOW-TO with all the necessary tools.

Let me first start out by apologizing because this is kind of sloppy. It may require less steps but once I got it, I didn't bother going back to figure out if it did require less steps or not.

Start off by decompiling SystemUI.apk

Next, navigate to /res/layout/tw_quick_setting_button.xml

Open it with your favorite editor

LOOK FOR:
Code:
<LinearLayout android:orientation="vertical" android:focusable="false" android:layout_width="fill_parent" android:layout_height="@dimen/quick_setting_button_height">
CHANGE:
Code:
android:layout_height="@dimen/quick_setting_button_height"
For complete removal of quick toggle settings:

TO:
Code:
android:layout_height="0.0dip"
For text removal like my mod:

TO
Code:
android:layout_height="50.0dip"
LOOK FOR:
Code:
<TextView android:textSize="@dimen/quick_setting_button_text_size" android:textColor="#ff9eb2c3" android:gravity="center" android:id="@id/btn_text" android:layout_width="fill_parent" android:layout_height="@dimen/quick_setting_button_text_height" android:includeFontPadding="false" android:shadowColor="#ff000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="2.0" />
CHANGE:
Code:
android:textSize="@dimen/quick_setting_button_text_size"
For complete or text removal:

TO:
Code:
android:textSize="0.0dip"
Save & close

Navigate to /res/layout/tw_status_bar_expanded.xml and open with editor

LOOK FOR:
Code:
<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" />
CHANGE:
Code:
android:layout_height="wrap_content"
For complete removal:

TO:
Code:
android:layout_height="0.0dip"
For text removal like my mod:

TO:
Code:
android:layout_height="50.0dip"
If you want to remove the carrier ID (Sprint):

LOOK FOR and REMOVE:
Code:
<com.android.systemui.statusbar.phone.CarrierLabel android:textSize="@dimen/status_bar_expanded_plmn_text_size" android:textColor="#ffd7d7d7" android:ellipsize="marquee" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/date" android:layout_alignParentLeft="true" android:layout_centerVertical="true" />
Save & close

These next parts probably aren't needed but I did them anyway. If you want to try compiling and using your SystemUI.apk, go for it and report back. If you want to follow exactly what I did, keep reading..

Navigate to /res/layout/tw_status_bar_toggle_slider.xml and open with editor

LOOK FOR:
Code:
<TextView android:textSize="15.0dip" android:textColor="#ffd7d7d7" android:id="@id/label" android:layout_width="46.0dip" android:layout_height="wrap_content" android:layout_marginRight="4.0dip" android:singleLine="false" android:layout_alignParentRight="true" android:layout_centerVertical="true" />
CHANGE:
Code:
android:textSize="15.0dip"
For complete or text removal

TO:
Code:
android:textSize="0.0dip"
Save & Close

Navigate to /res/values/dimens.xml and open with editor

LOOK FOR:
Code:
    <dimen name="quick_setting_button_text_height">30.0dip</dimen>
    <dimen name="quick_setting_button_text_size">13.0dip</dimen>
For complete or text removal:

CHANGE TO:
Code:
    <dimen name="quick_setting_button_text_height">0.0dip</dimen>
    <dimen name="quick_setting_button_text_size">0.0dip</dimen>
Save & Close

Finally, navigate to /res/values/strings.xml and open with editor

LOOK FOR:
Code:
    <string name="status_bar_settings_wifi_button">Wi-Fi</string>
    <string name="status_bar_settings_airplane">Airplane mode</string>
    <string name="status_bar_settings_auto_rotation">Auto-rotate screen</string>
    <string name="status_bar_settings_mute_label">MUTE</string>
For complete or text removal:

CHANGE TO:
Code:
    <string name="status_bar_settings_wifi_button"></string>
    <string name="status_bar_settings_airplane"></string>
    <string name="status_bar_settings_auto_rotation"></string>
    <string name="status_bar_settings_mute_label"></string>
LOOK FOR:
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_silent_mode_text">"Silent
mode"</string>
    <string name="quickpanel_silent_mode_sound">Sound</string>
    <string name="quickpanel_silent_mode_vibrate">Vibrate</string>
    <string name="quickpanel_silent_mode_mute">Mute</string>
    <string name="quickpanel_rotation_text">"Screen
rotation"</string>
    <string name="quickpanel_mobile_data_text">"Mobile
data"</string>
    <string name="quickpanel_notification_text">Notification</string>
    <string name="quickpanel_airplane_mode_text">"Flight
mode"</string>
    <string name="quickpanel_sync_text">Sync</string>
    <string name="quickpanel_wifi_display_text">"AllShare
Cast"</string>
    <string name="quickpanel_power_saving_text">"Power
saving"</string>
    <string name="quickpanel_driving_mode_text">"Driving
mode"</string>
    <string name="quickpanel_error_text">Error</string>
    <string name="quickpanel_ctwap_text">CTWAP</string>
    <string name="quickpanel_ctnet_text">CTNET</string>
For complete or text removal:

CHANGE TO:
Code:
    <string name="quickpanel_wifi_text"></string>
    <string name="quickpanel_bluetooth_text"></string>
    <string name="quickpanel_gps_text"></string>
    <string name="quickpanel_silent_mode_text"></string>
    <string name="quickpanel_silent_mode_sound"></string>
    <string name="quickpanel_silent_mode_vibrate"></string>
    <string name="quickpanel_silent_mode_mute"></string>
    <string name="quickpanel_rotation_text"></string>
    <string name="quickpanel_mobile_data_text"></string>
    <string name="quickpanel_notification_text"></string>
    <string name="quickpanel_airplane_mode_text"></string>
    <string name="quickpanel_sync_text"></string>
    <string name="quickpanel_wifi_display_text"></string>
    <string name="quickpanel_power_saving_text"></string>
    <string name="quickpanel_driving_mode_text"></string>
    <string name="quickpanel_error_text"></string>
    <string name="quickpanel_ctwap_text"></string>
    <string name="quickpanel_ctnet_text"></string>
LOOK FOR:
Code:
    <string name="quickpanel_data_roaming_text">"Data
roaming"</string>
For complete or text removal:

CHANGE TO:
Code:
    <string name="quickpanel_data_roaming_text"></string>
Save & Close

Compile, push to /system/app/ and change permissions to 644 and reboot or create flashable zip to flash in recovery.

Now, a lot of these could have simply been removed from the XML, but I decided to mod their values to preserve structure in case I want to put things back the way they were. If you want to experiment with removing the entire "LOOK FOR:" line, please report back the results.

Enjoy.


How to change carrier label:

 

Navigate to /res/values/strings.xml and open with editor

LOOK FOR:
Code:
    <string name="done">Done</string>
    <string name="edit">Edit</string>
AKA at the bottom of the file.

ADD AFTER:
Code:
<string name="custom_carrier">INSERT_CUSTOM_CARRIER_LABEL_HERE</string>
Add what you want where it says "INSERT_CUSTOM_CARRIER_LABEL_HERE"

Save & Close.

Navigate to /res/layout/tw_status_bar_expanded.xml and open with editor

If you haven't removed the carrier label already:

LOOK FOR:
Code:
<com.android.systemui.statusbar.phone.CarrierLabel android:textSize="@dimen/status_bar_expanded_plmn_text_size" android:textColor="#ffd7d7d7" android:ellipsize="marquee" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/date" android:layout_alignParentLeft="true" android:layout_centerVertical="true" />
REPLACE WITH:
Code:
        <TextView android:textSize="@dimen/status_bar_expanded_plmn_text_size" android:textColor="#ffd7d7d7" android:ellipsize="marquee" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/date" android:layout_alignParentLeft="true" android:text="@string/custom_carrier" android:layout_centerVertical="true" />
If you have removed the carrier label:

LOOK FOR:
Code:
        <com.android.systemui.statusbar.policy.DateView android:textSize="@dimen/status_bar_expanded_date_text_size" android:textColor="#ff1589d7" android:id="@id/date" android:paddingRight="12.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/settings_launch_button" android:layout_centerVertical="true" />
ADD AFTER:
Code:
        <TextView android:textSize="@dimen/status_bar_expanded_plmn_text_size" android:textColor="#ffd7d7d7" android:ellipsize="marquee" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/date" android:layout_alignParentLeft="true" android:text="@string/custom_carrier" android:layout_centerVertical="true" />
Save & Close

Compile, push to /system/app/ and change permissions to 644 and reboot or create flashable zip to flash in recovery.


Last edited by freeza; 18th July 2012 at 07:11 PM.
The Following 52 Users Say Thank You to freeza For This Useful Post: [ View ]
13th July 2012, 06:59 PM   |  #3  
KBizzle's Avatar
Recognized Contributor
Flag Knoxville
Thanks Meter: 4,189
 
4,107 posts
Join Date:Joined: Oct 2008
More
Awesome. Thank you for your contribution to the community.

Sent from my SPH-L710 using Tapatalk 2
13th July 2012, 07:14 PM   |  #4  
nest75068's Avatar
Senior Member
Flag Dallas
Thanks Meter: 120
 
905 posts
Join Date:Joined: Feb 2012
More
Wondering if this qualifies as one

http://forum.xda-developers.com/show....php?t=1740993
The Following User Says Thank You to nest75068 For This Useful Post: [ View ]
13th July 2012, 07:25 PM   |  #5  
mrvirginia's Avatar
Recognized Themer
Flag Charlotte, NC
Thanks Meter: 2,606
 
4,186 posts
Join Date:Joined: Jun 2010
Donate to Me
More
i thought that's what the theming sticky was for, stuff like this
The Following User Says Thank You to mrvirginia For This Useful Post: [ View ]
13th July 2012, 07:57 PM   |  #6  
Member
Thanks Meter: 6
 
49 posts
Join Date:Joined: Jul 2012
thx
thank you for your help, thisthread is very useful
13th July 2012, 08:50 PM   |  #7  
freeza's Avatar
OP Recognized Developer
Flag Pasadena, CA
Thanks Meter: 9,729
 
4,273 posts
Join Date:Joined: May 2006
Donate to Me
More
Quote:
Originally Posted by nest75068

Wondering if this qualifies as one

http://forum.xda-developers.com/show....php?t=1740993

You can get shutter sound controls without any modifications to sound. I don't know why it's labeled as silent camera if you can get shutter sounds without modding anything.
14th July 2012, 12:20 AM   |  #8  
Senior Member
Thanks Meter: 26
 
189 posts
Join Date:Joined: May 2012
Anyway to modify and remove the persistant wifi conmectee text from the notification bar
14th July 2012, 12:40 AM   |  #9  
_Burst_'s Avatar
Senior Member
Flag San Antonio, TX
Thanks Meter: 335
 
889 posts
Join Date:Joined: May 2010
Donate to Me
More
Awesome freeza TY
The Following User Says Thank You to _Burst_ For This Useful Post: [ View ]
14th July 2012, 12:43 AM   |  #10  
Tiffany84's Avatar
Recognized Themer
Thanks Meter: 2,879
 
5,737 posts
Join Date:Joined: Jul 2010
Donate to Me
Nice to see you here freeza.

Sent from my SAMSUNG-SGH-I747 using Tapatalk 2

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

Advanced Search
Display Modes