[MOD] Various Carrier Label Style - Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A

I dont know if there's any other thread has been created for this but i didnt see it.
So just want to share this little thing to whoever want it. Anyone are welcome to improvise it and make it even better/nicer.
This is just one quick mod i did during my 1 hour lunch time.
This only for stock ROM or Custom ROM based on STOCK. You already have "compact carrier label" features if you are using cm7.
NOTE: 1st thing 1st, please BACKUP the file that we will change (SystemUI.apk from /system/app/)!
STYLE #1:
How it looks:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The "No notification" and "On going" Title is covered by carrier label intentionally.
The easy way:
- Download the file from attachment,extract it and put the compiled xml file inside into your SystemUI.apk at res/layout/
- if you are linux user, then just open that apk file, drag and drop that xml to the stated folder (res/layout)
- I dont know how to do it from windows box since i didnt use windows but i believe you need to open the apk using 7zip.
DIY way (you need to know how to use apktool, decompiling/recompiling an apk. It is easy, trust me ):
If you wish to do it yourself, then you need to decompile SystemUI.apk.
(i use apktool and method by TheGrammarFreak HERE that also applied for centering the date and clock)
- open status_bar_expanded.xml from layout folder.
- on the line 4, you will see
Code:
<LinearLayout android:orientation="horizontal" android:background="@drawable/title_bar_portrait" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
highlight the whole line until line 7 that consist
Code:
</LinearLayout>
and delete it (yes, delete!)
so it will looks like these
find line start with
Code:
<LinearLayout android:orientation="vertical" android:id="@id/latestItems"
create new line below it and paste this code into that new line
Code:
<TextView android:layout_gravity="right|center" android:id="@id/clear_all_button" android:background="@android:drawable/btn_default_small" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@string/status_bar_clear_all_button" style="?android:attr/buttonStyle" />
That is for "clear button". We repositioned it to the bottom.
Now, find line consist
Code:
</ScrollView>
and paste these code exactly below it
Code:
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.CarrierLabel android:textAppearance="@style/TextAppearance.StatusBar.Title" android:gravity="bottom|center|center" android:background="@drawable/shade_bgcolor" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</LinearLayout>
It should look like this;
That is for the Carrier Label. I made it centered by this line
Code:
android:gravity="bottom|center|center"
Save it and recompile back. I use TheGrammarFreak method to replace the compiled xml file.
Enjoy..
STYLE #2:
How it looks like:
How to apply:
Download file carrier_label_mod2.zip in attachment,
unzip/extract it,
drag and drop files extracted into your SystemUI.apk, inside folder res / layout
** Lazy to add ** Ask me if anyone want to try it themself, want to change any line etc. **

feed3 said:
I dont know if there's any other thread has been created for this but i didnt see it.
So just want to share this little thing to whoever want it. Anyone are welcome to improvise it and make it even better/nicer.
This is just one quick mod i did during my 1 hour lunch time.
This only for stock ROM. You already have "compact carrier label" features if you are using cm7.
NOTE: 1st thing 1st, please BACKUP the file that we will change (SystemUI.apk from /system/app/)!
How it looks:
The "No notification" and "On going" Title is covered by carrier label intentionally.
The easy way:
- Download the file from attachment,extract it and put the compiled xml file inside into your SystemUI.apk at res/layout/
- if you are linux user, then just open that apk file, drag and drop that xml to the stated folder (res/layout)
- I dont know how to do it from windows box since i didnt use windows but i believe you need to open the apk using 7zip.
DIY way (you need to know how to use apktool, decompiling/recompiling an apk. It is easy, trust me ):
If you wish to do it yourself, then you need to decompile SystemUI.apk.
(i use apktool and method by TheGrammarFreak HERE that also applied for centering the date and clock)
- open status_bar_expanded.xml from layout folder.
- on the line 4, you will see
Code:
<LinearLayout android:orientation="horizontal" android:background="@drawable/title_bar_portrait" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
highlight the whole line until line 7 that consist
Code:
</LinearLayout>
and delete it (yes, delete!)
so it will looks like these
find line start with
Code:
<LinearLayout android:orientation="vertical" android:id="@id/latestItems"
create new line below it and paste this code into that new line
Code:
<TextView android:layout_gravity="right|center" android:id="@id/clear_all_button" android:background="@android:drawable/btn_default_small" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@string/status_bar_clear_all_button" style="?android:attr/buttonStyle" />
That is for "clear button". We repositioned it to the bottom.
Now, find line consist
Code:
</ScrollView>
and paste these code exactly below it
Code:
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.CarrierLabel android:textAppearance="@style/TextAppearance.StatusBar.Title" android:gravity="bottom|center|center" android:background="@drawable/shade_bgcolor" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</LinearLayout>
It should look like this;
That is for the Carrier Label. I made it centered by this line
Code:
android:gravity="bottom|center|center"
Save it and recompile back. I use TheGrammarFreak method to replace the compiled xml file.
Enjoy..
Click to expand...
Click to collapse
Hey could you attach your statusbar.xml with centered date?

Thank you

Black_jackss said:
Hey could you attach your statusbar.xml with centered date?
Click to expand...
Click to collapse
Sure.. SystemUI.apk attached. But, it is a bit messed inside.
and, many things are added to my like such as statusbar background. Im pretty sure you know which xml file to take if you only need the centered clock and date right?
As a side note, the background for date when you expand the statusbar will be black because i dont like it being overlapping with other icons,clock etc. Let me know if you need to find which line to change for that.
EDIT: Opss.. didnt read your post carefully. My head become a bit blur for the very long hours in front of my workstation. statusbar.xml in zip file attached.

meme nin said:
Thank you
Click to expand...
Click to collapse
Welcome..

feed3 said:
Sure.. SystemUI.apk attached. But, it is a bit messed inside.
and, many things are added to my like such as statusbar background. Im pretty sure you know which xml file to take if you only need the centered clock and date right?
As a side note, the background for date when you expand the statusbar will be black because i dont like it being overlapping with other icons,clock etc. Let me know if you need to find which line to change for that.
EDIT: Opss.. didnt read your post carefully. My head become a bit blur for the very long hours in front of my workstation. statusbar.xml in zip file attached.
Click to expand...
Click to collapse
I edited a few line,hope u will be okay with that,
Thanks,im so lazyyy

Black_jackss said:
I edited a few line,hope u will be okay with that,
Thanks,im so lazyyy
Click to expand...
Click to collapse
Totally okay with it.. Im not the one who invent it and this xda is exist initially for sharing, isnt it?
Care to share what you have changed? How does it look?

feed3 said:
Totally okay with it.. Im not the one who invent it and this xda is exist initially for sharing, isnt it?
Care to share what you have changed? How does it look?
Click to expand...
Click to collapse
I reverted it back,because it's not like i want
Thanks man

Black_jackss said:
I reverted it back,because it's not like i want
Thanks man
Click to expand...
Click to collapse
I assume you made the carrier background to transparent, then align it to the right (to make it exactly like in cm7)?
I have done it before, but once you have many notifications, it will just stay there (i dont like it), but putting it into scrollview doesnt work either. Thats why I made it just centered since "no notification" and "on going" title doesnt serve any purpose to me personally.
Sent from my SK17i using XDA App

feed3 said:
I assume you made the carrier background to transparent, then align it to the right (to make it exactly like in cm7)?
I have done it before, but once you have many notifications, it will just stay there (i dont like it), but putting it into scrollview doesnt work either. Thats why I made it just centered since "no notification" and "on going" title doesnt serve any purpose to me personally.
Sent from my SK17i using XDA App
Click to expand...
Click to collapse
Close one
Please continue sharing the progress in ths thread
Sent from my SK17i

Black_jackss said:
Close one
Please continue sharing the progress in ths thread
Sent from my SK17i
Click to expand...
Click to collapse
Sure.. I just dont have many free times in hand..
Sent from my SK17i using XDA App

Another style for carrier label added to the first post (scroll to the bottom of the first post to see how it looks like). Files required are attached as well in the first post.

Related

[SMALI GUIDE] How to add extended Quicksettings

As many GSM Users may noticed ther is not much development in the GSM section yet - hope it's just because the kernel sources aren't released yet..
So there was still missing a extended notification bar for GSM Users.
I tried to get the extended Quicksettings from a cdma rom and some themes...but everytime i got bootloops, or my statusbar was missing.
Seems, that the gsm and cdma framework is a bit different...
After much blabla, here my guide, how to add your own extenden quicksettings bar yourself.
I've tested it on mdj's GSM virtuous rom..so if you want, you can just grab it and press the Thanks button =P.
May work also on other gsm roms.
Before trying this out, pls ensure, you`ve got a working cwm backup, I'm not responsible if you lose any data, because you didn't make one.
This is my Quicksettingsbar
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
..so let's begin.
Requirements:
apktool for decompiling and compiling:
Download
For windows:
apktool-install-windows-r04-brut1.tar.bz2
and
apktool1.4.1.tar.bz2
Click to expand...
Click to collapse
notepad++ for comparing files
Download
7Zip or something similar
Download
Steps to get your extendend Quicksettingbar
1. Extract the downloaded apktool files to the same folder
2. Pull required files from device
located under system/framework
com.htc.resources.apk
located under system/app
SystemUI.apk
Put it to the extracted apktool files:
3. Install ressources.apk
- open the cmd and browse to the apktool folder
- type:
apktool if com.htc.resources.apk
Click to expand...
Click to collapse
in cmd
4.Decompiling
- type:
apktool d SystemUI.apk
Click to expand...
Click to collapse
in cmd
5. Edit quick_settings.xml
It's located unter SystemUI/res/layout:
..and it should look like:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.preference.QuickSettings android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:textAppearance="?android:textAppearanceLarge" android:textSize="@dimen/status_bar_title_font_size" android:textColor="#ffffffff" android:gravity="center_vertical" android:id="@id/title_bar" android:background="@drawable/status_bar_header_background" android:paddingLeft="9.0sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scaleType="fitXY" android:text="@string/status_bar_quick_settings" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include android:id="@id/volume" layout="@layout/status_bar_preference" />
<include android:id="@id/brightness" layout="@layout/status_bar_preference" />
<include android:id="@id/rotation" layout="@layout/status_bar_preference" />
<include android:id="@id/wifi" layout="@layout/status_bar_preference" />
<include android:id="@id/hotspot" layout="@layout/status_bar_preference" />
<include android:id="@id/network" layout="@layout/status_bar_preference" />
<include android:id="@id/bluetooth" layout="@layout/status_bar_preference" />
<include android:id="@id/gps" layout="@layout/status_bar_preference" />
<include android:id="@id/settings" layout="@layout/status_bar_preference" />
<include android:id="@id/task_manager" layout="@layout/status_bar_preference" />
</LinearLayout>
</ScrollView>
</com.android.systemui.statusbar.preference.QuickSettings>
Please copy the whole code and overwrite it with your existing one.
You can rearrange the different settings like you want.
But DON'T delete a line!
6. The funny part, edit the f** smali file, costs me days! =D
Download the attached Quicksettings.zip and extract it somewhere, and open it with noetpad++.
Now navigate to your decompiled SystemUI.apk:
.../SystemUI\smali\com\android\systemui\statusbar\preference
Click to expand...
Click to collapse
...and open the Quicksettings.smali here in notepad too:
Click on Addons->Compare->Compare: (Don't know the exact translation)
..after then it should look like this:
Explanations:
notepad++ compares both files and marks the differences, what we have to do know, is to go trough this differences and adapt our file with mine.
But attention!
Don' adapt the ressource id's, how ressource ids looks like is shown in the picture. If you change them, it won't work and will cause some bootloops and a missing statusbar.
The ressource ids are listed in the public.xml (.../SystemUI/res/values) and have to match with the ids in the code.
One example:
Let's search for an ID, to do this double click on an id, press Ctrl+Shift+F, browse to ".../SystemUI", then search:
As you can see, the id from your quicksettings smali is linked to other files, so changing them isn't good thing
So lets see for important differences, you need to change:
NOT THE ID's =P
You need really to change everything EXCEPT the Ressource ID's
Breaks and different row numbers are irrelevant.
After you are ready, save the file and make the diff again:
Addons->Compare->Compare
...to ensure, you got all changes and ONLY the Ressource ID's are different.
6. Compiling:
-Type:
apktool b SystemUI SystemUI_new.apk
Click to expand...
Click to collapse
in cmd
8.7zip/Winrar
-open both, the orignal and the new SystemUI.apk's and drag&drop the classes.dex from SystemUI_new to SystemUI and overwrite it
Do the same with the the file quick_settings.xml located under .../SystemUI/res/layout
Now transfer the SysytemUI.apk back to your device.
Paste it, i have used root explorer, in /system and change the permissons to 644 (just like all in system/app).
After setting the correct permission, overwrite the original SystemUI.apk in System/app with yours.
Or just push it via ab in /system/app
Reboot, done:
Pls don't post here, if it don't work for the first time..just try it a second time..and perhaps a third time.
Believe me, to understand how this all works and get all this working I spend a lot of time.
I've got no experience in decompiling and smali editing before, okay, I'm a c# and c++ coder, so perhaps it was a bit easier to me...what i want to say with that DON'T give up, when it doesnt work at the first go (;
...if someone post his 2.3.3 or 2.3.4 SystemUI.apk for me, I can attach the modified SytemUI.apk in the OP.
But before i can attach them, someone need to test hem first
j4n87 said:
As many GSM Users may noticed ther is not much development in the GSM section yet - hope it's just because the kernel sources aren't released yet..
So there was still missing a extended notification bar for GSM Users.
I tried to get the extended Quicksettings from a cdma rom and some themes...but everytime i got bootloops, or my statusbar was missing.
Seems, that the gsm and cdma framework is a bit different...
After much blabla, here my guide, how to add your own extenden quicksettings bar yourself.
I've tested it on mdj's GSM virtuous rom..so if you want, you can just grab it and press the Thanks button =P.
May work also on other gsm roms.
Click to expand...
Click to collapse
h there.. i got 2 questions for you:
1) i got tmobile gsm with an unlocked and rooted phone. will this work on the 'virtuous unity' ROM 2.35 with sense 3.0?
2) is there a more simpler way of adding extensions? theres got to be.
trapzz said:
h there.. i got 2 questions for you:
1) i got tmobile gsm with an unlocked and rooted phone. will this work on the 'virtuous unity' ROM 2.35 with sense 3.0?
2) is there a more simpler way of adding extensions? theres got to be.
Click to expand...
Click to collapse
I'm new to Android and use a CDMA device so I can't help you with your first question, but as far as no. 2... I doubt there's an easier way (to do it yourself). One thing I've learned about Android thus far is that modding it is a pain in the ass all around.
sharkie405 said:
I'm new to Android and use a CDMA device so I can't help you with your first question, but as far as no. 2... I doubt there's an easier way (to do it yourself). One thing I've learned about Android thus far is that modding it is a pain in the ass all around.
Click to expand...
Click to collapse
thanks.. and i agree.. modding on an android is a pain. right now, i'm looking into how to increase the system font of my phone, especially, on my stock sms. i wish i knew how though.
trapzz said:
h there.. i got 2 questions for you:
1) i got tmobile gsm with an unlocked and rooted phone. will this work on the 'virtuous unity' ROM 2.35 with sense 3.0?
2) is there a more simpler way of adding extensions? theres got to be.
Click to expand...
Click to collapse
If there is already a rom with 2.3.5 gsm with extendend quicksettings, you can just copy the SystemUI.apk to you rom.
If not, you have to port it yourself as described in the 1st post.
My suggestion would be to decompile your 2.3.5 rom and one 2.3.4/2.3.3 rom/theme with extended quicksetiings already included and decompile both.
Now have compare /res/values/id.xml and public xml from both roms. If they match you can just copy the quicksettings.smali and add it to your rom.
If you want, you can post me your SystemUI.apk of your sense rom and I try my best to get it working
Edit: to increase system font size you can use spare parts from market
trapzz said:
thanks.. and i agree.. modding on an android is a pain. right now, i'm looking into how to increase the system font of my phone, especially, on my stock sms. i wish i knew how though.
Click to expand...
Click to collapse
btw..can you post me the link to the rom yo are talking about?
Where is a GSM virtuous unity 2.3.5 bases Sense 3.0 rom?
@j48n7
thanks for the detailed guide
I am using a runnymede port (sense 3.5) on desire without the full quick settings menu in the dropdown. I tried to enable all the options on the menu using your guide, but it didnt work out. The sense 3 QS was very different from sense 3.5 QS smali..
So i extracted the QS smali from another sense 3.5 rom (bliss for evo 3d) with all options enabled.. will use it as per your guide.
sorry for the long rant, my question is that would it be feasible to just replace the smali on my phone? or would there be some impact of different phone models
I am not at all versed with smali..
schandra1480 said:
@j48n7
thanks for the detailed guide
I am using a runnymede port (sense 3.5) on desire without the full quick settings menu in the dropdown. I tried to enable all the options on the menu using your guide, but it didnt work out. The sense 3 QS was very different from sense 3.5 QS smali..
So i extracted the QS smali from another sense 3.5 rom (bliss for evo 3d) with all options enabled.. will use it as per your guide.
sorry for the long rant, my question is that would it be feasible to just replace the smali on my phone? or would there be some impact of different phone models
I am not at all versed with smali..
Click to expand...
Click to collapse
Yeah, it is possible to just copy the quicksettings.smali, but you have to ensure, that all resource ids match with your ressource ids in your res/values/public.xml.
You also have to add the smali files in statusbar/preferences which are missing in your project - here you also have to ensure, that the resource ids match.
Also make a diff of res/values/strings.xml, id.xml and res/layout/quicksettings.xml
Thanks OP! Are any of the zips you attached flashable?
The pictures are down for this, can you put them up again please
Yeah, accidently deleted them :-s
...but I think theres no need to do this stuff on your own.
Nearly all roms got them already included or there are themes out with em.
Someone who wants to port this to another device where are no extended quicksettings at the moment should have enough know how to do this witouth this tutorial/pics in this tutorial.
On the device i have, incredible 2, all the roms that include extra quick settings also change other things. I like my basically stock rom, but i would like to have the extra settings close.
And i am only asking for the two bottom pictures that are part of the step 6, because they show steps and are not just examples of what you wrote out.
p.s. if i mess up i will not ask for help, as you are right that i dont know enough but i would like to try. So i will not take up any of your time
..just copy the SystemUI\smali\com\android\systemui\statusbar\preference folder to your systemui from a systemui with extended quicksettings.
same goes for res/layout and res/values
..and continue with the next steps.
Should work
Sent from my HTC EVO 3D X515m using xda premium
If you got problems or need help, just pm me
I will when I get the time to, I had a heavy week in school. Will try today when I get home.
How to mod HTC Sense 3.5 Quick Settings?
Hey j4n87 - thanks for the tutorial on Quick Settings - this is the most comprehensive thing I've found on the web.
I am trying to do the same thing for my HTC Thunderbolt here in the US. I am on CDMA, but it seems different in Sense 3.5. I was wondering if you have any wisdom to share with me
Steps I've done so far:
using APK Manager 5.0.2 decompiled SystemUI.apk with dependencies (option 10)
dragged com.htc.resources.apk as the dependency
compared SystemUI.apks from the original ROM, and one with Quick Settings I like
found resources pointing to needing to edit QuickSettings.xml and the QuickSettings.smali
read up on ViewStub, which looks like it's being used instead of include for the QuickSettings.xml in Sense 3.5
So I can't tell what is used to inflate the ViewStubs in QuickSettings.xml which is what I presume I need to do to get all the quick settings I need.
Any help would be greatly appreciated! Sorry for the long-winded post...
shenaenae said:
Hey j4n87 - thanks for the tutorial on Quick Settings - this is the most comprehensive thing I've found on the web.
I am trying to do the same thing for my HTC Thunderbolt here in the US. I am on CDMA, but it seems different in Sense 3.5. I was wondering if you have any wisdom to share with me
Steps I've done so far:
using APK Manager 5.0.2 decompiled SystemUI.apk with dependencies (option 10)
dragged com.htc.resources.apk as the dependency
compared SystemUI.apks from the original ROM, and one with Quick Settings I like
found resources pointing to needing to edit QuickSettings.xml and the QuickSettings.smali
read up on ViewStub, which looks like it's being used instead of include for the QuickSettings.xml in Sense 3.5
So I can't tell what is used to inflate the ViewStubs in QuickSettings.xml which is what I presume I need to do to get all the quick settings I need.
Any help would be greatly appreciated! Sorry for the long-winded post...
Click to expand...
Click to collapse
Mhh, i think I would take a look at the sensation or evo 3d cdma forum for a sense 3.5 rom with extended quicksettings and use this as base instead the one in the op.
didnt work with sense 3.5 yet, sry. Will take a look at it tomorrow.
Sent from my HTC EVO 3D X515m using xda premium
Hey,
Love you guide. I have a rom that has few extended settings and i want to add more from another rom. I'm almost done (thanks to your guide). Please put the pictures back! It might help others
pix down. reup???

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

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..
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
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" androidaddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
Click to expand...
Click to collapse
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" androidaddingLeft="4.0dip" android:layout_width="0.0dip" android:layout_height="0.0dip" />
Click to expand...
Click to collapse
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" androidaddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
Click to expand...
Click to collapse
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>
Click to expand...
Click to collapse
(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>
Click to expand...
Click to collapse
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!)
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?
cowsquad said:
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?
Click to expand...
Click to collapse
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
SmG67 said:
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
Click to expand...
Click to collapse
Exactly, with minicm7 you don't need to do all that circus
thegearhead said:
Exactly, with minicm7 you don't need to do all that circus
Click to expand...
Click to collapse
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.
Ticklefish said:
But I kept my X10 Mini Pro on stock, simply for the battery consumption.
Click to expand...
Click to collapse
I'm on MiniCM7-2.2.0 and the battery lasts a lot longer (almost twice) than with stock ROM.
收件人: [MOD][TUT] Change Pull-Down Carrier Label
thx for the guide
Sent from my HTC X515d using xda premium
i will try
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?
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
SahilC said:
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?
Click to expand...
Click to collapse
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?
kid1519 said:
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
Click to expand...
Click to collapse
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?
Ticklefish said:
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?
Click to expand...
Click to collapse
I think it is different from your room.
I want to remove or hide Carrier.
kid1519 said:
I think it is different from your room.
I want to remove or hide Carrier.
Click to expand...
Click to collapse
No problem. That's even easier!
Sent from my Xperia Z using XDA Premium
..Have you tried Tickle My Android yet?
now, I must to start from where and how???
can you show me, please.
thanks. :X
kid1519 said:
now, I must to start from where and how???
can you show me, please.
thanks. :X
Click to expand...
Click to collapse
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?
you can see with 2 image(.png) i attachments. Red squares,I do not like them. That is same AT&T of US.
how to make it not show????
i try ChangerCarrierName.apk but it ineffective.
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?
Thanks but I think my room is different with yours
i Attachments 3 files, if you have free time. can you decompile and read them.
Thanks and i am wating for you.
:X
Ticklefish said:
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!)
Click to expand...
Click to collapse
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'.

[4.2] [QuickSettings] How to add new toggles to 4.2 Android

This is just going to be a quick rundown on what do to add new toggles to android new QuickSettings system. This will take place in SystemUI.
Custom QuickSettings Toggles
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Path: frameworks/base/packages/SystemUI
Files:
src/com/android/systemui/statusbar/phone/QuickSettings.java
There are two options when creating a toggle.
addSystemTiles:380 - Static tiles with useful information.
addTemporaryTiles:571 - This type of tile will get removed without activity, for example, the alarm quick setting is a temp tile.
I used SystemTiles
Code:
// CpuInfo tile
QuickSettingsTileView cpuInfoTile = (QuickSettingsTileView)
inflater.inflate(R.layout.quick_settings_tile, parent, false);
cpuInfoTile.setContent(R.layout.quick_settings_tile_cpuinfo, inflater);
cpuInfoTile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startSettingsActivity(Intent.ACTION_POWER_USAGE_SUMMARY);
}
});
mModel.addCpuInfoTile(cpuInfoTile, new QuickSettingsModel.RefreshCallback() {
@Override
public void refreshView(QuickSettingsTileView view, State state) {
ImageView iv = (ImageView) view.findViewById(R.id.cpuinfo_image);
TextView tva = (TextView) view.findViewById(R.id.cpuinfoa_textview);
TextView tvb = (TextView) view.findViewById(R.id.cpuinfob_textview);
Drawable d = mContext.getResources().getDrawable(R.drawable.ic_settings_performance);
String GOV = fileReadOneLine(GOV_FILE);
String FREQ = fileReadOneLine(SCALE_CUR_FILE);
iv.setImageDrawable(d);
tva.setText(GOV);
tvb.setText(FREQ);
view.setContentDescription(
mContext.getString(R.string.accessibility_quick_settings_cpuinfo, GOV));
}
});
parent.addView(cpuInfoTile);
src/com/android/systemui/statusbar/phone/QuickSettingsModel.java:174
This is needed for the widget inside the toggle to get updated. You can view other definitions in here to update various states.
Code:
private QuickSettingsTileView mCpuInfoTile;
private RefreshCallback mCpuInfoCallback;
private State mCpuInfoState = new State();
res/layout/quick_settings_tile_cpuinfo.xml
This is where we create the layout of the tile and call it from java.
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/cpuinfo_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingBottom="10dp"
/>
<TextView
style="@style/TextAppearance.QuickSettings.TileView"
android:id="@+id/cpuinfoa_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#287AA9"
android:gravity="center"
/>
<TextView
style="@style/TextAppearance.QuickSettings.TileView"
android:id="@+id/cpuinfob_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#287AA9"
android:gravity="center"
/>
</LinearLayout>
res/values/strings.xml
Needed to setContentDescription()
Code:
<string name="accessibility_quick_settings_cpuinfo">CpuInfo <xliff:g id="meminfo" example="CpuInfo">%s</xliff:g>.</string>
I know this is a very general overview, but the actuality is there is so much that can be done with this, it would be hard to go into extreme detail. Would be better to just simply leave that stuff for questions in this thread.
If you want to know more, please just ask. Lets make android OURS!​
Would root be required to implement this?
Sent from my SGH-I997 using xda premium
marty331 said:
Would root be required to implement this?
Sent from my SGH-I997 using xda premium
Click to expand...
Click to collapse
It would be since you have to push the file back onto the system.
Hi , great tutorial:thumbup:
Can you show us the smali version?
Thanks
Ofeliax said:
Hi , great tutorial:thumbup:
Can you show us the smali version?
Thanks
Click to expand...
Click to collapse
No idea, I have no experience using smali. You can just compile SystemUI from source.
Lithid ur the man. Once I can get this inline kernel building accomplished for aosp for my device, I can compile it. Then I will be playing with this for sure!! I can't wait!
lithid-cm said:
It would be since you have to push the file back onto the system.
Click to expand...
Click to collapse
Or just create a flashable zip. Then flash the new modded app
Peteragent5 said:
Or just create a flashable zip. Then flash the new modded app
Click to expand...
Click to collapse
Not really the point of this thread.
Geest tutorial, this is gonna be my first thing to do when I come back from school lol!
Sent from my Galaxy Nexus using Tapatalk 2
How did you decompile your SystemUI?
When I try to do that with mine it's giving an error ..
Sent from my Galaxy Nexus using Tapatalk 2
mDroidd said:
How did you decompile your SystemUI?
When I try to do that with mine it's giving an error ..
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
From source.
Code:
time make -j8 SystemUI
Will this work with CM10 4.1.2?
No, 4.2 only, as stated by OP
Sent from my Galaxy Nexus using Tapatalk 2
Mlopik said:
Will this work with CM10 4.1.2?
Click to expand...
Click to collapse
mDroidd said:
No, 4.2 only, as stated by OP
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
I'd assume he process would be very similar as cm is based off aosp...
Anyways I'm currently downloading the 4.2 aosp, gonna be making (trying) my own rom and will definitely be using this guide in the near future after Im sure I can get everything built. Thanks for the guide, if I'm successfully with what I plan to do, you will definitely be linked and credited.
Sent from my SGH-I997 using Tapatalk 2
mg2195 said:
I'd assume he process would be very similar as cm is based off aosp...
Anyways I'm currently downloading the 4.2 aosp, gonna be making (trying) my own rom and will definitely be using this guide in the near future after Im sure I can get everything built. Thanks for the guide, if I'm successfully with what I plan to do, you will definitely be linked and credited.
Sent from my SGH-I997 using Tapatalk 2
Click to expand...
Click to collapse
I was thinking about putting myself in front of a rom recently. If you are at all interested in teaming up for a rom project, PM. You seem legit and wouldn't mind it one bit.
This is badass!! Thank you so much lithid!!!!
EDIT: Question, What are the numbers representing?
addSystemTiles:380
addTemporaryTiles:571
Click to expand...
Click to collapse
I assumed they were line numbers but when I checked source it didn't look like anything was referring to addSystemTiles or addTemporaryTiles on those line numbers.
I might have to revisit that, those line numbers are from my file, which is already been edited.
Sent from my Galaxy Nexus using xda premium
lithid-cm said:
I might have to revisit that, those line numbers are from my file, which is already been edited.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Makes sense. Thanks.
nice tutorial
btw, 4.1.2 and 4.2.1 quicksettings are not same dear Mlopik.
You can do this with stock 4.2.1 (rooted) ?

[HOWTO][MOD] Remove Battery, No AMPM, Center Clock and more...

This is a howto thread ... Copied from the one I had opened in Butterfly Themes/Apps Section to help others ...
Tools Required :
1. apktool (For Decompile/Compile)
2. Notepad++ (My preferred smali/xml editor)
3. 7zip (Windows) or Text Editor (Mac)
4. Java Runtime
MOD 1 - Remove Battery Icon from Status Bar
This technique applies to ALL ROMs.
This will remove the ugly green battery icon totally from the Status Bar. Then you can use your own apps to show battery % etc and it looks very clean imo.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
Manual Steps
File to modify - /system/app/SystemUI.apk
Tools needed - 7zip
Steps -
1. Copy over your SystemUI.apk to your Computer
2. Open (Do not extract) using 7zip
3. Browse to folder "/res/drawable"
4. Delete files "stat_sys_battery.xml" & "stat_sys_battery_charge.xml" (Keep backup if you like)
5. Close 7zip (No option to save, etc.. just close the application)
6. Either push this SystemUI.apk file back to your phone or best is to download one of my zips below, open using 7zip and then copy over your SystemUI.apk overwriting the one in the zip. Then simply flash in CWM or TWRP.
All Done !
Click to expand...
Click to collapse
MOD 2 - Remove AM/PM From Status Bar Clock
This mod removes the AM/PM totally from the Status Bar Clock.
Click to expand...
Click to collapse
Steps -
1. Need to extract /system/app/SystemUI.apk to your computer and decompile with your favourite tool
2. Edit file - smali/com/android/systemui/statusbar/policy/Clock.smali (I use Notepad++)
3. Change 1st instance of const/4 v0, 0x1 to const/4 v0, 0x2
4. Save file and recompile the apk
5. Push apk back onto phone
Click to expand...
Click to collapse
MOD 3 - Centre Status Bar Clock
This mod centres the Status Bar Clock
Click to expand...
Click to collapse
Steps -
1. Extract all files for apktool into a folder (Lets say C:\apktool for this example)
2. Extract files from your phone and copy into c:\apktool :
/system/framework/framework-res.apk
/system/framework/com.htc.resources.apk
/system/app/SystemUI.apk
3. Open a command prompt at c:\apktool
4. Run following commands :
apktool if framework-res.apk
apktool com.htc.resources.apk
apktool d SystemUI.apk
5. This should decompile the SystemUI apk successfully and create folder SystemUI in c:\apktool
6. Change into SystemUI folder. Edit file - res/layout/status_bar.xml (I use Notepad++)
7. Find the first "LinearLayout Area".
8. Remove everything between the 2 LinearLayout tags (Only the first one, not the ticker ones)
9. Add following between the tags :
Code:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:layout_alignParentLeft="true" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
<com.android.systemui.statusbar.phone.IconMerger android:layout_toRightOf="@id/moreIcon" android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
<com.android.systemui.statusbar.policy.Clock android:layout_centerInParent="true" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="@*android:color/white" android:gravity="center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<ImageView android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" />
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" android:layout_toLeftOf="@id/battery" />
<LinearLayout android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center_vertical" android:layout_toLeftOf="@id/signal_cluster" />
</RelativeLayout>
10. Save file and recompile the apk using command prompt :
apktool b SystemUI
11. New compiled apk will be available in c:\apktool\SystemUI\dist
12. You can use attached template zip and open (DO NOT EXTRACT) using 7z
13. Change into system/app folder in 7z and drag the new compiled SystemUI.apk into it. Answer YES if you get prompt in 7z
14. Similarly use the template to create an original zip for your untouched SystemUI.apk for reverting back to original
15. Flash away in Recovery and Enjoy!
Click to expand...
Click to collapse
Thanks a lot man its nice to see someone actually share some knowledge for a change.
Nice to see this. Went ahead and found the required changes to remove the E911/Location reticle from the status bar as well...instead of starting a new thread thought I would just toss them in here.
1. Decompile SystemUI.apk with apktool
2. Navigate to smali/com/android/systemui/statusbar/policy and open HtcCdmaStatusBar.smali
3. Find the two instances of:
Code:
invoke-virtual {v0, v1, v3}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
and change to
Code:
invoke-virtual {v0, v1, [COLOR="Red"]v2[/COLOR]}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
4. Recompile and place SystemUI.apk in an already working mod file that can be flashed in recovery using 7-zip or a similar app
5. Flash in recovery...
Ooh.. Good one
Is it possible to provide a flashable zip for these? Or would it vary from rom to rom?
Will vary for each rom because of underlying framework files... This is more of a guide to self-help
Sent from my HTC Butterfly using xda premium
Thanks for posting this much needed mod. I hate when everything is all cluttered on one side. This mod is the only thing left on my phone i would like to change. Unfortunately i am too stupid to attempt this myself. I'm willing to pay $20 if someone could do it for me!!!!!!! Its killing me i want this bad. If anyone knows of the center clock mod for Clean Rom Lite 1.5 Verizon PLEASE let me know. I'll even pay for the link to it. I swear.
No need to pay. Just post the required files ill try it out tonight.
Sent from my HTC6435LVW using Tapatalk 2
dhemke17 said:
Nice to see this. Went ahead and found the required changes to remove the E911/Location reticle from the status bar as well...instead of starting a new thread thought I would just toss them in here.
1. Decompile SystemUI.apk with apktool
2. Navigate to smali/com/android/systemui/statusbar/policy and open HtcCdmaStatusBar.smali
3. Find the two instances of:
Code:
invoke-virtual {v0, v1, v3}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
and change to
Code:
invoke-virtual {v0, v1, [COLOR="Red"]v2[/COLOR]}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
4. Recompile and place SystemUI.apk in an already working mod file that can be flashed in recovery using 7-zip or a similar app
5. Flash in recovery...
Click to expand...
Click to collapse
Not that there was any doubt but this worked fine on Sense 4. Thanks.
Awesome!
Sent from my HTC6435LVW using Tapatalk 2
First off, thank you so much for taking the time to do a write up to help people out...such as myself. I did the center clock mod on the Sense 5 NOS M7 rom by newt. Everything works great except for when watching youtube and switching to landscape, an error pops up saying "Unfortunately SystemUI has stopped" or something like that. Have you experienced this before or possibly have any idea what the problem is? Thanks for the help.
Thankyou for this tut. Do you know how to remove the signal bar? I have a dual sim phone and I don't use my 2nd slot so my 2nd signal bar is always displaying with a questionmark, I wonder if you could help me remove that one. Thanks.

[GUIDE][GB]How to place a custom icon on the title bar of a certain app

Hey guys!
After some of @SpaceCaker 's modifications, we found out how to place a custom icon on the title bar of any app. Its not a style method but a whole new different method which is much workingproof. You can use your app's icon for reference. So, one of the synonyms that could be said for this guide is JellyBean Title Bar. The modification is very easy though, but the hard part is whether you find the right file which controls the title bar on a specified window. But, I can help you in this.
After following the guide, if you didn't understand it properly, just give me the app and I will place the custom JB title bar on it as per your request.
Requirments :
- Basic XML knowledge
- APK Multi TOOL/Whichever decompiling tool
- Sources on attachments
Click to expand...
Click to collapse
There are 2 different methods to make this.
First method means that the custom windows are located on layouts folder.
Second method means that the windows are located on XML folder.
The first method is very good and is bugfree, but unfortunately it depends on the app. If whether he has the windows located
on layouts folder or XML folder
The second method is not fully bugfree. If the app's windows are located on XML folder then the title bar is going to be scrolled with the chooserboxes too. The only way to fix it is to create a layout for the window.
Click to expand...
Click to collapse
Screenshots of both methods:
One of HelpCentre (1st method) example given below and the second of DSP manager (2nd method).
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
1. Decompile the app you want to place the custom title bar. I will take a custom built app "HelpCentre.apk"
2. Download the sources on the attachments and place the layout "title" on the layout folder
and the custom id on ids.xml file on values folder.
Code:
<item type="id" name="imageView1">false</item>
Click to expand...
Click to collapse
3.
a) In the first method the windows are located on the layouts. So see the following :
Go to layouts folder and now find the layout which is responsible for the first window
Let's use an example :
I have credits.xml file on the layout folder. Now on this window, i want to place a custom title bar.
To do this i should include the custom title on layout folder on the first lines.
To make this, paste this code after xmlns:android="http://schemas.android.com/apk/res/android">
Code:
<include android:layout_width="fill_parent" android:layout_height="50.0dip" layout="@layout/title" />
Be sure to place it on the correct order.
I also, have FAQ.xml too. If i want edit this file too, there will be no title bar as on the end of the guide we will add
NoTitleBar theme on AndroidManifest.xml So, therefore i have to place the same value on it too.
Again, after the code xmlns:android="http://schemas.android.com/apk/res/android"> place this one :
Code:
<include android:layout_width="fill_parent" android:layout_height="50.0dip" layout="@layout/title" />
What if you want to use a custom title for the another window?
Easy, we are going to create another exact file as title.xml just that we will rename it different, like titleFAQ.xml.
On this XML we will change the android:icon value. We can use whatever value for the icon. For example,
"@drawable/ic_credits" Then, we will paste the png you want to place on the drawable-ldpi.
Now in the FAQ.xml file you want to place another icon title we should change the layout target so according to what I did so far on the file, this is the target i should place.
Code:
<include android:layout_width="fill_parent" android:layout_height="50.0dip" layout="@layout/titleFAQ" />
Click to expand...
Click to collapse
b) In the second method the windows are located on the XML folder. So follow below :
Go to XML folder and now find the XML which is responsible for the window.
So I will use the same example.
So let's say that the Credits.xml is on the XML folder. Now instead of including <include android:layout_width="fill_parent"......
you should include this code below xmlns:android="http://schemas.android.com/apk/res/android">
Code:
<CheckBoxPreference android:layout="@layout/title" android:title="Help Centre" android:key="Help_title_Centre" />
Android:title is the name of the title bar. You can set it to whatever name you want. Same goes with android:key.
To use another icon for the another title bar which is located on FAQ.xml like i mentioned before, change
Code:
<CheckBoxPreference android:layout="@layout/titleFAQ" android:title="Help Centre" android:key="Help_title_Centre" />
Click to expand...
Click to collapse
4. Now the final step is to go to AndroidManifest.xml and after the specified activity place the NoTitleBar theme
I edited Credits.xml and FAQ.xml so let's find their activity in there.
Code:
<activity android:name="Credits">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity android:name="FAQ">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
I now will add the theme value on both activities. This is the code
Code:
android:theme="@*android:style/Theme.Black.NoTitleBar"
After all it will look like this
Code:
<activity android:theme="@*android:style/Theme.Black.NoTitleBar" android:name="Credits">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity android:theme="@*android:style/Theme.Black.NoTitleBar" android:name="FAQ">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
Now we're done working.
5. Recompile the apk
6. Sign it (Always sign if you edit AndroidManifest.xml)
Click to expand...
Click to collapse
Credits :
Full credits goes to the most amazing themer I have ever seen, @SpaceCaker!
He made many works for Touchwiz Resurrection ROM and I have based the guide upon that modifications just that I have edited
the code and fully explained it.
Also, Touchwiz Resurrection Team members @Vishnu pv and @radichification for their support!
Click to expand...
Click to collapse
Enjoy!
Regards,
Teddy
B]If you want to change the background target you should change something on title.xml or any other title xml you have created for your window.[/B]
Find :
Code:
<LinearLayout android:gravity="center_vertical"
Change :
Code:
android:background="@drawable/title_background"
to a different png target like :
Code:
android:background="@drawable/ics_title_background"
or :
Code:
android:background="@drawable/touchwiz_title_background"
And put the png on drawable-ldpi.
Also, I have included a normal icon for the title bar, but you can change it anytime, just replace it with another icon.
If you want to change the target of the icon find :
Code:
<ImageView android:id="@id/imageView1"
Change :
Code:
android:background="@drawable/title_icon"
To :
Code:
android:background="@drawable/ics_title_icon"
Or :
Code:
android:background="@drawable/touchwiz_title_icon"
And then like I mentioned before put the png on drawable-ldpi
I don't exactly know the title bar's size on LDPI but i think 50.0dip is alright. If someone tries it and the title bar is overlapped just reduce its size on the layout or XML on xml folder that you have edited.
Currently on the zip source I have included a Touchwiz title background as that's what I have atm, but you can get another one ICS or JB themed. I will provide them later. As per now, only touchwiz title background is available.
Download ZIP on attachments.
Don't forget to put correct credits if you are going to include this into your ROM/MOD/Theme.
Great Job Bro. Awesome Guide
Reserved. Awesome guide. Nice
Sent from my GT-S5360 using xda app-developers app
Very nice guide. Expecting more from you..
Sent from my GT-S5360 using Tapatalk 2
Wow! Very nice guide... Btw you have stated that "Download ZIP on attachments" but i dont find any zip attached here.
MuSaddiq said:
Wow! Very nice guide... Btw you have stated that "Download ZIP on attachments" but i dont find any zip attached here.
Click to expand...
Click to collapse
Whut?
I thought I uploaded xD
Or maybe it just is unavailable on tapatalk to be downloaded. Let me check it.
EDIT : Oh damn.. Internet had might been the problem. Wait will add the source as soon as possible. Sorry for the inconvience"
EDIT 2 : Added attachments. Sorry for inconvience again!
Sent from my GT-S5830i using Tapatalk 2
Good good good !!!
Sent from my GT-S5830i using Tapatalk 2
Hello!
Thank you for this guide. I was looking exactly for something like this because I've added a title_bar, on framework-res.apk, with the "Settings.apk" icon that, not only, added the title bar on Settings.apk but other apps receive the same title bar icon as well, which is lame.
And so, I've decided to follow your guide, not to change the title bar on every app that received the same title bar, because of the cahnges I've made on on framework, but simply to change it on Settings.apk, because that was my primary goal since the beginning.
All windows xml files are on xml folder. So I had to go with second method. Faced the expected bug (title bar scrolls with the window).
Sniper Killer said:
The second method is not fully bugfree. If the app's windows are located on XML folder then the title bar is going to be scrolled with the chooserboxes too. The only way to fix it is to create a layout for the window.
Click to expand...
Click to collapse
Err...could you be more specific? I'm sorry but I didn't quite understand how to fix it.
Can you help me?
Thank you!
Typhus_ said:
Hello!
Thank you for this guide. I was looking exactly for something like this because I've added a title_bar, on framework-res.apk, with the "Settings.apk" icon that, not only, added the title bar on Settings.apk but other apps receive the same title bar icon as well, which is lame.
And so, I've decided to follow your guide, not to change the title bar on every app that received the same title bar, because of the cahnges I've made on on framework, but simply to change it on Settings.apk, because that was my primary goal since the beginning.
All windows xml files are on xml folder. So I had to go with second method. Faced the expected bug (title bar scrolls with the window).
Err...could you be more specific? I'm sorry but I didn't quite understand how to fix it.
Can you help me?
Thank you!
Click to expand...
Click to collapse
Actually, creating a new layout for a random window tab requires creating new smalis something not easy to do. You could try to do some experiments and tests and follow any possible guide for it. I cannot help at the moment as I have really been busy with school and my personal stuff. Sorry! :/
OK Sniper.
Thanks anyway.
I'll try to figure it out.
How to place the icon on all apps ?
GSculerlor said:
How to place the icon on all apps ?
Click to expand...
Click to collapse
You should replace the icon with activity_title_bar.9.png on framework-res.apk/res/drawable-xdpi/. The png which you are going to replace must be a 9 patch png and also must be renamed to "activity_title_bar".
Sniper Killer said:
You should replace the icon with activity_title_bar.9.png on framework-res.apk/res/drawable-xdpi/. The png which you are going to replace must be a 9 patch png and also must be renamed to "activity_title_bar".
Click to expand...
Click to collapse
In our case its deawable-ldpi or mdpi in most of the roms instead of xdpi.:thumbup::thumbup::thumbup:
Sent from my GT-S5360 using Tapatalk 2
san122 said:
In our case its deawable-ldpi or mdpi in most of the roms instead of xdpi.:thumbup::thumbup::thumbup:
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
I wrote xdpi so it could be every density. X -> l, m, h.
Sent from my GT-S5830i using Tapatalk 2
Sniper Killer said:
I wrote xdpi so it could be every density. X -> l, m, h.
Sent from my GT-S5830i using Tapatalk 2
Click to expand...
Click to collapse
Oh sorry i took it as xhdpi
Sent from my GT-S5360 using Tapatalk 2
actually it doesnt really matter if u place pngs in xhdpi or hdpi.
only they need the proper size ofhdpi
this way we can also use a lot of xhdpi pngs on our little devices without resizing
why?
android very clever
they have their own resizing already inside only png needs proper size for its dpi.
Sent from my S500 using xda app-developers app
How to resize title bar ?
Sent from my GT-S5360 using xda app-developers app
GSculerlor said:
How to resize title bar ?
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
If you placed rhis title bar only in settings then you need to add attribute windowtitlesize in your style.
If you did this via framework then open res/values/styles.xml abd search windowtitlesize and increase its value.
50.0 dip will look good for your titlebar.
Sent from my GT-S5360 using Tapatalk 2

Categories

Resources