[MOD][TUT] Change Pull-Down Carrier Label

Ticklefish

Recognized Themer
Oct 27, 2011
6,742
8,533
263
Hampshire, UK
The carrier label is that piece of text that says which mobile network you're using. I'm on Vodafone and I'm in the UK, so when I pull down my notification screen, I used to see this all the time..



Now, I don't need to know which network's signal I'm currently using. The UK's relatively small so Vodafone covers pretty much everywhere I go and if I'm abroad, I still pay them regardless of whether I'm using Orange's signal or anyone else's.

So I decided to change the carrier label to something else.

And I thought I'd let you know how to do it as well.

First, you need to decompile framework-res.apk. If you're on Gingerbread or above, decompile SystemUI.apk as well. SystemUI.apk sometimes has the files we'll need for this and sometimes doesn't, it depends on the rom. If you've got it, decompile it just in case you need it. If you haven't got it, don't worry about it.

(There are a few different ways you can do this. Personally, I'd suggest using Tickle My Android which is available here: http://forum.xda-developers.com/showthread.php?t=1568713 But then...I might be biased..lol)

In the layout folder of either framework-res.apk or SystemUI.apk, find and open status_bar_expanded.xml for editing.

Now, to change the carrier label would actually be quite tricky because you'd dig deep into the smali code. It's far easier just to replace it.

In the .xml file, find this line of code or one similar to it:

<TextView android:textAppearance="?textAppearanceLarge" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/plmnLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
The "plmnLabel" is the carrier label so this is the one that displays it.
For some reason, if you just delete the line, your phone won't work and you'll get FC after FC after FC.

So we can't hide the carrier label, we need to hide it instead.

Change the "textAppearance" part to "android:textAppearance="@style/invisible" and delete the "android:textColor="#ffffffff"" part. Then change the "layout_width" and "layout_height" to "0.0dip".

This will now give you the line:

<TextView android:textAppearance="@style/InvisibleText" android:layout_gravity="center_vertical" android:id="@id/plmnLabel" android:paddingLeft="4.0dip" android:layout_width="0.0dip" android:layout_height="0.0dip" />
Now add another line just beneath that one that says:

<TextView android:textAppearance="?textAppearanceLarge" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:text="@string/MyText" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
Save the file and close.
This will now apply the style "InvisibleText" to the carrier label and display the string "Mytext" next to it.

Neither the string not the style exist yet, so next we need to make those.

In the values folder of either framework-res.apk or SystemUI.apk, find and open strings.xml for editing.

In that file, add a new line between the lines that say "<resources>" and "</resources>" That new line should say:

<string name="MyText">Your Text Here</string>
(Where it says "Your Text Here", replace that with your own text. Don't make it too long.)

Save and close.

Finally, in the values folder, find and open styles.xml

Add these lines, again between "<resources>" and "</resources>":

<style name="InvisibleText" parent="@style/TextAppearance">
<item name="textSize">1.0sp</item>
<item name="textStyle">normal</item>
<item name="textColor">@color/transparent</item>
<item name="visibility">invisible</item>
</style>
Save and close.

Now recompile the app's and push them back to your phone. Only do this with the phone in recovery mode and the /system partition mounted. Do NOT push while the phone's running!

Wait for it to load and that's it. Now, when you pull down the notifications screen, you should see something like this..



(Obviously, with your own theming!)
 

cowsquad

Senior Member
Aug 31, 2009
1,345
320
83
Portland, Oregon
nice guide, but i cant find any of those lines on my current framework-res.apk. im trying to modify the verizon wireless manually, but i cant seem to find the stupid "verizon wireless" text
any suggestions?
 

SmG67

Senior Member
May 2, 2012
2,147
855
0
nice guide, but i cant find any of those lines on my current framework-res.apk. im trying to modify the verizon wireless manually, but i cant seem to find the stupid "verizon wireless" text
any suggestions?
That is because the "verizon wireless" text is not in any of the files.
There is an Android-system veriable that is called "@id/plmnLabel" you need to search for. Whenever an app, widget or part of the system displays that variable it will automatically be replaced by the carriertext. On your phone it would return verizon wireless, on mine it will say hi :)

If youŕe on a cyanogenmod-based rom, you might check in:

Settings - CyanogenMod - Interface - Statusbartweaks, it might have an option in there to change your carrierlabel to a self-defined one, negating the need to edit systemfiles yourself.

Hope i have helped :)
 

thegearhead

Senior Member
Jul 28, 2011
107
14
0
sanmikeville
If youŕe on a cyanogenmod-based rom, you might check in:

Settings - CyanogenMod - Interface - Statusbartweaks, it might have an option in there to change your carrierlabel to a self-defined one, negating the need to edit systemfiles yourself.

Hope i have helped :)
Exactly, with minicm7 you don't need to do all that circus
 

Ticklefish

Recognized Themer
Oct 27, 2011
6,742
8,533
263
Hampshire, UK
Exactly, with minicm7 you don't need to do all that circus
I'd forgotten about this thread! I've even deleted the screenshots..sorry!

This is all for the stock 2.1 rom. CyanogenMod roms have a lot of cool features which makes stuff like this a lot simpler. But I kept my X10 Mini Pro on stock, simply for the battery consumption.
 

SahilC

Senior Member
Jun 14, 2012
2,023
873
0
Amherst
I'm so sorry, I'm pretty uneducated in this case, I'm not really sure what to do. When I open TMA and plug in my device, and I chose to pull in framework-res.apk from my phone, it says there are more than one emulators running. anything wrong here?
 

kid1519

Senior Member
Feb 4, 2013
75
13
0
Ha Noi
www.facebook.com
1. In the layout folder of SystemUI.apk, i find and open status_bar_expanded.xml for editing: i can not find line same your line. i attachment. Can you help me, please.
2. In the values folder of SystemUI.apk, i find and open strings.xml for editing: successful
3. In the values folder of SystemUI.apk, i find and open styles.xml for editing: successful
 

Attachments

Ticklefish

Recognized Themer
Oct 27, 2011
6,742
8,533
263
Hampshire, UK
I'm so sorry, I'm pretty uneducated in this case, I'm not really sure what to do. When I open TMA and plug in my device, and I chose to pull in framework-res.apk from my phone, it says there are more than one emulators running. anything wrong here?
Do you have more than one Android device attached to your computer?

Sent from my Xperia Z using XDA Premium
..Have you tried Tickle My Android yet?
 
  • Like
Reactions: SahilC

Ticklefish

Recognized Themer
Oct 27, 2011
6,742
8,533
263
Hampshire, UK
1. In the layout folder of SystemUI.apk, i find and open status_bar_expanded.xml for editing: i can not find line same your line. i attachment. Can you help me, please.
2. In the values folder of SystemUI.apk, i find and open strings.xml for editing: successful
3. In the values folder of SystemUI.apk, i find and open styles.xml for editing: successful
I can take a look. What did you want to change the carrier label to?

Sent from my Xperia Z using XDA Premium
..Have you tried Tickle My Android yet?
 
  • Like
Reactions: kid1519 and SahilC

Ticklefish

Recognized Themer
Oct 27, 2011
6,742
8,533
263
Hampshire, UK
now, I must to start from where and how???
can you show me, please.
thanks. :X
Okay, first thing, can you share a screenshot of your screen with the carrier label showing please? That way I can tell you what file to edit.

Sent from my Xperia Z using XDA Premium
..Have you tried Tickle My Android yet?
 

Ticklefish

Recognized Themer
Oct 27, 2011
6,742
8,533
263
Hampshire, UK
Now there's a subtle lockscreen background..lol

I can definitely take it off the statusbar. Not sure about the lockscreen but I can have a look for you.

Sent from my Xperia Z using XDA Premium
..Have you tried Tickle My Android yet?
 
  • Like
Reactions: kid1519 and SahilC

sssomnath474

Senior Member
Mar 9, 2012
210
302
0
mars :P
www.facebook.com
The carrier label is that piece of text that says which mobile network you're using. I'm on Vodafone and I'm in the UK, so when I pull down my notification screen, I used to see this all the time..



Now, I don't need to know which network's signal I'm currently using. The UK's relatively small so Vodafone covers pretty much everywhere I go and if I'm abroad, I still pay them regardless of whether I'm using Orange's signal or anyone else's.

So I decided to change the carrier label to something else.

And I thought I'd let you know how to do it as well.

First, you need to decompile framework-res.apk. If you're on Gingerbread or above, decompile SystemUI.apk as well. SystemUI.apk sometimes has the files we'll need for this and sometimes doesn't, it depends on the rom. If you've got it, decompile it just in case you need it. If you haven't got it, don't worry about it.

(There are a few different ways you can do this. Personally, I'd suggest using Tickle My Android which is available here: http://forum.xda-developers.com/showthread.php?t=1568713 But then...I might be biased..lol)

In the layout folder of either framework-res.apk or SystemUI.apk, find and open status_bar_expanded.xml for editing.

Now, to change the carrier label would actually be quite tricky because you'd dig deep into the smali code. It's far easier just to replace it.

In the .xml file, find this line of code or one similar to it:



The "plmnLabel" is the carrier label so this is the one that displays it.
For some reason, if you just delete the line, your phone won't work and you'll get FC after FC after FC.

So we can't hide the carrier label, we need to hide it instead.

Change the "textAppearance" part to "android:textAppearance="@style/invisible" and delete the "android:textColor="#ffffffff"" part. Then change the "layout_width" and "layout_height" to "0.0dip".

This will now give you the line:



Now add another line just beneath that one that says:



Save the file and close.
This will now apply the style "InvisibleText" to the carrier label and display the string "Mytext" next to it.

Neither the string not the style exist yet, so next we need to make those.

In the values folder of either framework-res.apk or SystemUI.apk, find and open strings.xml for editing.

In that file, add a new line between the lines that say "<resources>" and "</resources>" That new line should say:



(Where it says "Your Text Here", replace that with your own text. Don't make it too long.)

Save and close.

Finally, in the values folder, find and open styles.xml

Add these lines, again between "<resources>" and "</resources>":



Save and close.

Now recompile the app's and push them back to your phone. Only do this with the phone in recovery mode and the /system partition mounted. Do NOT push while the phone's running!

Wait for it to load and that's it. Now, when you pull down the notifications screen, you should see something like this..



(Obviously, with your own theming!)
C:\AndroidMultitool\Decompiled_apk\SystemUI\res\values\styles.xml:20: error: Error: No resource found that matches the given name: attr 'textColor'.
C:\AndroidMultitool\Decompiled_apk\SystemUI\res\values\styles.xml:18: error: Error: No resource found that matches the given name: attr 'textSize'.
C:\AndroidMultitool\Decompiled_apk\SystemUI\res\values\styles.xml:19: error: Error: No resource found that matches the given name: attr 'textStyle'.
C:\AndroidMultitool\Decompiled_apk\SystemUI\res\values\styles.xml:21: error: Error: No resource found that matches the given name: attr 'visibility'.