[MOD][TUT] Change Pull-Down Carrier Label - Sony Ericsson XPERIA X10 Mini

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'.

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] Various Carrier Label Style

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.

[MODS](ODEXED) CDMA XT912 1% Battery & Drop Toggles (PORTING GUIDE INCLUDED)

Did this for a friend on the razr - but I'm on an Atrix 2, so it's not that much different... (original post can be found here)
Included are ODEXED versions (for your stock, rooted razr, if you so desire) of the 1% battery increments and horizontal scrollable quick panel toggles. This will also remove the carrier name from the pulldown menu (you're on your own for getting it back or removing it from the lockscreen if you want - this might help).
{
"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"
}
NOTE: CDMA ONLY - This was made from and installed on DROID RAZR System version 6.16.211.XT912.Verizon.en.US on ICS 4.0.4 - not sure about cross-system compatibility, but I wouldn't try it without a backup plan..
I am not responsible for your phone.
Download & Install:
(The following is the way I installed it using whirleye's BootMenu app - feel free to unzip and/or use your own method to install)
-Download RAZR_ICS_ODEXED_1perBatt_DropTogs.zip to your sdcard
-Boot into recovery with BootMenu
-Wipe dalvik & cache partition
-Install zip & Reboot
Credits & Thanks:
I ported these both over to ICS from GB for the A2... then moved them over to the RAZR (it involves a lot of edits, additions, deodexing and re-odexing)
-Major credit goes to nitroglycerine33 for the scrollable toggles
-Thanks also to cogeary for bringing nitro's work to the A2
-Thanks to he_stheone64 for the battery icons (except the unknown (?) batt image, that was me)
-Thanks to iwabashu for the use of the RAZR and the screenie
-----------------------------------------
Original post (but, very applicable to the RAZR variants): http://forum.xda-developers.com/showthread.php?t=1803516
PORTING THE 1% BATTERY INCREMENTS & DROPDOWN (QUICK PANEL) TOGGLES TO YOUR SYSTEM VERSION
This guide is based on moving these mods for ICS to other similar ICS-running devices. The process varies a bit going from GB to ICS. Or ICS to JB..
You will need:
Your deodexed SystemUI.apk
Your deodexed services.jar
Copies of deodexed SystemUI.apk & services.jar with the mods
Apktool /Smali/Baksmali tools
Notepad++ or similar text editor
7-zip or similar archive manager
WinMerge or Meld or similar diff/compare tool (a very useful tool that allows you to compare two folders or files side-by-side, and points out the differences for you)
Click to expand...
Click to collapse
My “get started” thread may hold some tips for accomplishing the tasks below – check it out HERE
IMPORTANT: This guide is to help you get these mods to your system, for your personal use. If you take the toggles from above and decide to use them in a ROM, be certain to credit nitroglycerine33 for his work.
Click to expand...
Click to collapse
Don't forget to install your framework for apktool by putting your framework-res.apk next to apktool, cd to that folder (or hold-shift right-click), and do a:
Code:
apktool if framework-res.apk
SystemUI.apk:
-decompile your deodexed SystemUI.apk
-rename the one with the mods to something else like SystemUI2.apk, and decompile also
For the dropdown toggles:
-add quickpanel smali
Copy the “quickpanel” folder from the modded com\android\systemui\statusbar folder to the same location in your stock
-add quickpanel_quick_settings.xml to layout folder
Open the modded SystemUI.apk\res\layout folder and copy the quickpanel_quick_settings.xml to your stock layout folder
NOTE: Some older toggle mods may not have this xml, all of the code was included in the status_bar_expanded.xml (Big thanks to nitroglycerine33 for the new xml code that is so much easier to work with)
-edit status_bar_expanded.xml or status_bar_tracking.xml for new qp xml (see below for options - some don't have the _tracking.xml - it's all in expanded, I think)
Open the modded SystemUI.apk\res\layout\status_bar_expanded.xml and add this line:
Code:
<include layout="@layout/quickpanel_quick_settings" />
(this will put the toggles between the date and notifications)
OR
(this will put the toggles above the date, directly under the status bar)
OR
delete the "include layout" line entirely from status_bar_expanded and open status_bar_tracking.xml
(this will put the toggles at the very bottom, attached to the close bar)
-add 33 quickpanel images
Add or copy the 33 .png images associated with the quickpanel toggles from the modded SystemUI.apk\res\drawable-hdpi to your stock /drawable-hdpi folder
-add qp lines to ids.xml
Open the modded SystemUI.apk\res\values\ids.xml and copy all of the quickpanel ids to your stock ids.xml (there should be 41 lines at the bottom of the xml – selected in the screenshot below)
-add qp lines to strings.xml
Open the modded SystemUI.apk\res\values\strings.xml and copy all of the quickpanel strings to your stock strings.xml (there should be 15 lines at the bottom of the xml – selected in the screenshot below)
-add qp to public.xml
(NOTE: The resource ID’s in the public.xml need to be unique – meaning that no two alpha-numeric IDs can be the same. If you are lucky, you can just use the trick below and copy the resource IDs entirely from the modded xml. So, before you copy and paste, check a few of the modded resource ID’s against your stock. If you need to assign new ID’s, just stop here, compile your SystemUI.apk, then decompile it again and look for the new IDs created in the public.xml – you will then need to copy those resource IDs over to the quickpanel smali files - with a lot of cross-referenceing.)
Open the modded SystemUI.apk\res\values\public.xml and copy the quickpanel lines from the public type = “drawable” (33 lines), “string” (15 lines), and “id” (41 lines) to your stock public.xml (do not worry about the drawables for the battery images)
For the 1% Battery:
-add stat_sys battery xmls
Open the modded SystemUI.apk\res\drawable folder and copy stat_sys_battery.xml and stat_sys_battery_charge.xml to your stock drawable folder and overwrite the existing
-204 battery images
Add or copy the 204 .png images associated with the 1% battery increments from the modded SystemUI.apk\res\drawable-hdpi to your stock drawable-hdpi folder
-compile the SystemUI.apk (make sure that you saved your original signatures (META-INF folder), and do not compress the resources.arsc - meaning, take it out of the apk and re-add it to the apk in "store" mode with 7-zip)
-it is suggested to decompile the newly modded apk, and check that all of your new edits are still there
Click to expand...
Click to collapse
services.jar
For 1% battery mod only (toggles are done):
-baksmali the classes.dex from your services.jar, and rename the folder to my_classout, or something
-baksmali the classes.dex from the modded services.jar, and rename the folder to mod_classout, or whatever
-edit BatteryService.smali
Open the modded com\android\server\BatteryService.smali and your stock BatteryService.smali with WinMerge or Meld and compare the two files.
(What..? You didn't think I'd do it all for you, did you?)
Update: See HERE
-reassemble (smali) into a new classes.dex and copy to and overwrite the existing one in your services.jar with an archive manager
Click to expand...
Click to collapse
***ATTACHED ARE THE DEODEXED STOCK & MODDED XT912 FILES FOR YOUR REFERENCE AND TO COMPARE***
If this is for an ODEXED system, you must then re-odex the SystemUI.apk and services.jar. See HERE for how to do that
These were originally ported using a similar process from GB to ICS for the Atrix 2 (except I ended up re-doing all of the resource ID's in the quickpanel smali). Since then, I have used the above method to move both mods over to the RAZR. --- UPDATE 9/13/12: I also used this method to move the 1% battery increments over to CM10/JB for the A2... watch the v3, v4, etc, notation in the BatteryService.smali... pay attention to detail.
Please post questions or PM with complaints.
Big thanks to nitroglycerine33, cogeary, and whoever else first did the smali/xml coding, and all the devs/modders who came before..
EDIT (2012.12.25): Attached a zip below to restore stock odexed xt912 ICS files and remove this mod. Wipe dalvik cache and flash in custom recovery.
Any confirmation from anyone that all toggles work? I would love to do this to my phone. Im on. 215 willing to try it. But what happens if it doesnt work. How do i revert back to normal? Sbf?
Sent from my DROID RAZR using xda app-developers app
lrlooly said:
Any confirmation from anyone that all toggles work? I would love to do this to my phone. Im on. 215 willing to try it. But what happens if it doesnt work. How do i revert back to normal? Sbf?
Sent from my DROID RAZR using xda app-developers app
Click to expand...
Click to collapse
Not sure if it will work on .215..
But, you should always have a good backup just in case something goes wrong.. sbf should be a last resort.
Or you can create another zip package with your current working copies of the 4 files that will be replaced by this zip package. You can probably just use this zip package and drop your current apk/jar/odex files in there and put it on your sdcard also... And if it bootloops, go into recovery and flash the zip to restore your original files..
This might help - there's a small section at the end about making zip packages: http://forum.xda-developers.com/showthread.php?t=1753659
Sent from my phone's mind
Just an warning for GSM Users > Crackflasher as i'm, i had to try it
Stuck on Bootanimation, so nandroid back
HSD-Pilot said:
Just an warning for GSM Users > Crackflasher as i'm, i had to try it
Stuck on Bootanimation, so nandroid back
Click to expand...
Click to collapse
Yea.. cdma only - as it's the SystemUI.apk and services.jar getting changed.
I updated the OP. Sorry bout that.
Sent from my phone's mind
No problem, I expected nothing else
I just tried it anyway.
Sent from my CustomiZed XT910
Wont install on. 215. Not sure if there is something i did wrong however.
Sent from my DROID RAZR using xda app-developers app
Did not work for me either, stock ics, rooted. I would love to get this on my phone.
Sent from my DROID RAZR using xda premium
alteredlikeness said:
NOTE: CDMA ONLY - This was made from and installed on DROID RAZR System version 6.16.211.XT912.Verizon.en.US on ICS 4.0.4 - not sure about cross-system compatibility, but I wouldn't try it without a backup plan..
I am not responsible for your phone.
Click to expand...
Click to collapse
lrlooly said:
Wont install on. 215. Not sure if there is something i did wrong however.
Sent from my DROID RAZR using xda app-developers app
Click to expand...
Click to collapse
chris3582 said:
Did not work for me either, stock ics, rooted. I would love to get this on my phone.
Sent from my DROID RAZR using xda premium
Click to expand...
Click to collapse
If it's not the system version listed, it doesn't work for you.
chris3582 - what version are you? How are you trying to install?
And you guys all have recovery on boot working before trying these things, right?
Sent from my phone's mind
chris3582 said:
Did not work for me either, stock ics, rooted. I would love to get this on my phone.
Sent from my DROID RAZR using xda premium
Click to expand...
Click to collapse
The updater script uses busybox. If you don't have busybox in sbin directory it most likely will not install.
From my ICED down MAXX!
alteredlikeness said:
If it's not the system version listed, it doesn't work for you.
chris3582 - what version are you? How are you trying to install?
And you guys all have recovery on boot working before trying these things, right?
Sent from my phone's mind
Click to expand...
Click to collapse
I am trying to flash it using safestrap.
Sent from my DROID RAZR using xda premium
chris3582 said:
I am trying to flash it using safestrap.
Sent from my DROID RAZR using xda premium
Click to expand...
Click to collapse
Yea, that's what I was afraid of.. I do not have much experience with safestrap. It might just be that the updater-script needs to be revised... it's made for cwm recovery, and I used whirleyes BootMenu to install..
If someone with experience wants to convert this mod to work with safestrap.. please feel free
Sent from my phone's mind
Awesome!
Thanks! works perfect.
I tried it with my stock rooted vzw .215. It doesnt work. My phone would just stay in the start-up animation. I had to fastboot back to. 211.
lrlooly said:
Any confirmation from anyone that all toggles work? I would love to do this to my phone. Im on. 215 willing to try it. But what happens if it doesnt work. How do i revert back to normal? Sbf?
Sent from my DROID RAZR using xda app-developers app
Click to expand...
Click to collapse
DROIDESP said:
Thanks! works perfect.
Click to expand...
Click to collapse
Finally! - Thanks for letting me know that it does work on someone else's phone! I mean, with over 30 downloads you are the first to verify it works (besides my friend who I originally made it for).. thanks.. and enjoy
Sent from my phone's mind
alteredlikeness said:
Yea, that's what I was afraid of.. I do not have much experience with safestrap. It might just be that the updater-script needs to be revised... it's made for cwm recovery, and I used whirleyes BootMenu to install..
If someone with experience wants to convert this mod to work with safestrap.. please feel free
Sent from my phone's mind
Click to expand...
Click to collapse
Can anyone let me know if this works with the Razr stock recovery and not just CWM?
Thanks!
Screenshot Included
alteredlikeness said:
Finally! - Thanks for letting me know that it does work on someone else's phone! I mean, with over 30 downloads you are the first to verify it works (besides my friend who I originally made it for).. thanks.. and enjoy
Sent from my phone's mind
Click to expand...
Click to collapse
Thanks again! Thought I would send a screenshot so you know!
DCDD85 said:
Can anyone let me know if this works with the Razr stock recovery and not just CWM?
Thanks!
Click to expand...
Click to collapse
Stock recovery? Probably not. Why not just install BootMenu?
Also, you guys can just take the apk/odex files from the zip and install them by different means.. like adb or root explorer.. just make sure that you set proper permissions, then reboot.
Sent from my phone's mind
DROIDESP said:
Thanks again! Thought I would send a screenshot so you know!
Click to expand...
Click to collapse
Thanks!
Side note: Kenosha, huh? I'm in MKE... and the guy I made it for is near Burlington.. small world
Sent from my phone's mind
Ha!
alteredlikeness said:
Thanks!
Side note: Kenosha, huh? I'm in MKE... and the guy I made it for is near Burlington.. small world
Sent from my phone's mind
Click to expand...
Click to collapse
Funny, I strongly considered removing BW before taking that screenshot.... Its a very small world! I'm up in MKE all the time. PM me sometime we can break some phones.

[GUIDE/THEME/MOD] How to switch to Light theme [Maybe for all 4.1+ Android devices]

Hello community!
Intro:
You may not know it, but Samsung(and maybe every popular Android phone manufacturers) has a ready-to-use Light theme "pre-installed" in our devices, not only the Galaxy S Advance of course, this theme probably exists in every latest firmware for Galaxies from Samsung, including Galaxy SIII, Galaxy S2 and many more I guess, the Galaxy S4 is not an exception, which also comes in the Light version already set. I found a way to switch in this light version, and it's VERY easy. Maybe newbie-friendly too. Ok maybe not so easy but it still is as simple as adding a word. Literally, it's only adding a word! Read the "Notes:" sections at the end of the post before doing anything.
Getting to the point:
These themes exist in the framework-res.apk, specifically, in the /res/values/styles.xml
You will find different themes in there including Google's "Holo(.Dark)" and "Holo.Light". These are the basic ones, which will be used by almost every application that does NOT have it's own skin, so these applications will use the either Holo(Dark) or Holo Light.
There are three(I think) more basic themes in there including the stock Android, this one is based on Gingerbread I guess.
The other two are the Device Default and Device Default Light. These two are the ones that a manufacturer, like Samsung, can edit to give it's devices a custom and unique style.
A stock application that comes pre-installed in the software(Like SecSettings.apk, MusicPlayer.apk e.t.c.) will probably use either the Device Default or Device Default Light. This is up to the manufacturer to choose. In our case, Samsung has set most of it's applications to use the Device Default.
A small "What I am talking about":
{
"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"
}
How to set the Light theme to an application:
Requirements:
The application which you want to change it's theme. (I will use SecSettings.apk as an example)
apk-tool (I use APK Multi-Tool because it's very easy to use)
Notepad++
Know how to decompile/recompile
Instructions:
Decompile the .apk.
Go to "/res/values/" folder and open the file "styles.xml" with Notepad++.
Click "Find" or press "Ctrl+F".
In the "Find What :" box enter "DeviceDefault" and hit next.
Check the first result you get, mine was this:
Now, copy this ".Light" (without the "), this is the magic word!
You will paste this exactly after every "[email protected]*android:style/blabla.DeviceDefault
Like the image below:
Even if there is something after the DeviceDefault like this:
You will still paste the ".Light" exactly after the DeviceDefault like the image below:
Make sure to paste it ONLY in "parent=" lines, and in EVERY "parent=" lines. There are exceptions though, based on the .app. But don't get confused, even if you make a mistake, will be able to find it and fix it later. For now just continue the "paste" process.
Once you have finished the "paste" process, save the file and overwrite the old one.
Recompile the .apk.
That's it! Copy the .apk on your phone, place it where it belongs and set the right permissions.
Reboot, open the application, and take a taste of a light UI that your phone's manufacturer had hidden from you.
Notes:
1. I don't even know if other manufacturers like Sony do this too. If yes, then this tutorial will work for these phones too, probably.
2. Don't try this on framework-res.apk. framework-res.apk can be used too for you to change your theme to Light, but it will probably cause many graphical errors. And it also requires a different way to change the theme. I have tried it and got both good and bad results, check the second post for more information.
3. If you tried and had any errors I could use a hand, just post your compile log and myself and maybe some other people will help you if we can.
4. Modifying the framework-res.apk in a proper way will allow every stock application to be themed without having someone to edit them. Again check the second post.
5. If you find something confusing you can freely ask by posting here.
6. I am not sure about everything that I say in the "Intro:" section. It's just my theory, excuse me if I'm wrong.
7. These themes are the main reason(probably ) for the apps to have both "holo_dark" and "holo_light" variants of .png files and colors. People who have edited SystemUI.apk's and framework-res.apk's "drawable-" folders will understand what I am saying.
Here is a modded framework-res.apk, with this I managed to theme almost every stock Samsung application without editing anything except the framework-res.apk.
I am totally sure that I changed some things without thinking first. The styles.xml is big and I almost got lost. I did everything I could for now, I'm sorry.
You can flash it only on LQB firmwares, maybe only some of them. Check the screenshots to see what I have managed so far. Expect MANY UI bugs.
P.S. It's just for you to see how a Light theme would look. Don't complain about bugs on this, please.
Light Framework
Screenshots:
Great job, Koulis!
Well done!! :good:. Must have taken you quiet some time to find how to do it. :good: :good: :good:
Still people need to understand that this won't magically invert the theme to white... You'll still get loads of UI bugs, which you of course, must fix manually.
panda00 said:
Still people need to understand that this won't magically invert the theme to white... You'll still get loads of UI bugs, which you of course, must fix manually.
Click to expand...
Click to collapse
Maybe not so many bugs, but I guess there will be some.
then change the text color for holo dark to holo light
joehanh88 themed GT-I9070
joehanh88 said:
then change the text color for holo dark to holo light
joehanh88 themed GT-I9070
Click to expand...
Click to collapse
I thought of that. But I'll try another time I'm feeling lazy now.
Sent from my Galaxy S Advance
Nice mod.
If i want the google default holo theme (like nexus) thenbi should write '.holo dark' instead of '.light'??
Sent from my GT-I9070 using xda premium
I just have one note, to make this much much easier...
When pressing Ctrl+F go the replace tab and on the find space type "DeviceDefault" and on the replace space type "DeviceDefault.Light"... Then press replace all... This should replace everything in one click, I guess.
Nice post
Sent from my GT-I9070 using xda app-developers app
panda00 said:
I just have one note, to make this much much easier...
When pressing Ctrl+F go the replace tab and on the find space type "DeviceDefault" and on the replace space type "DeviceDefault.Light"... Then press replace all... This should replace everything in one click, I guess.
Click to expand...
Click to collapse
...but the OP said "Make sure to paste it ONLY in "parent=" lines, and in EVERY "parent=" lines."
and one question: How to change the text color for holo dark to holo light?
No screens in the OP
d14gvn said:
No screens in the OP
Click to expand...
Click to collapse
It's because of Photobucket. I did some mistakes. Sorry. Also, just to let everyone know, I'm back!!! Not that I'm going to do something great but I will try to think of something.
Sent from my Galaxy SIII Mini
Koulis2000 said:
It's because of Photobucket. I did some mistakes. Sorry. Also, just to let everyone know, I'm back!!! Not that I'm going to do something great but I will try to think of something.
Sent from my Galaxy SIII Mini
Click to expand...
Click to collapse
Nice article!
Hope to see the screenshots back!!!
pathuri97 said:
Nice article!
Hope to see the screenshots back!!!
Click to expand...
Click to collapse
Will reupload them later today, maybe.
Thanks!
Sent from my Galaxy SIII Mini
Apk N't Installed???
Koulis2000 said:
It's because of Photobucket. I did some mistakes. Sorry. Also, just to let everyone know, I'm back!!! Not that I'm going to do something great but I will try to think of something.
Sent from my Galaxy SIII Mini
Click to expand...
Click to collapse
Thanks for the SCREENSHOTS.
Really useful.
I followed your steps and compiled & decompiled using VTS software. (http://www.virtuous-ten-studio.com/).
Absolutely NO ERROS before after compilation.
After copying the file to /system/app with ROOT EXPLORER (with proper permissions),
When I click SETTINGS ICON - I get a message saying "Apk N't installed".
What could be the reason - any idea???
pathuri97 said:
Thanks for the SCREENSHOTS.
Really useful.
I followed your steps and compiled & decompiled using VTS software. (http://www.virtuous-ten-studio.com/).
Absolutely NO ERROS before after compilation.
After copying the file to /system/app with ROOT EXPLORER (with proper permissions),
When I click SETTINGS ICON - I get a message saying "Apk N't installed".
What could be the reason - any idea???
Click to expand...
Click to collapse
No ideas why you get a message like this. :/
Sent from my Galaxy SIII Mini
pathuri97 said:
Thanks for the SCREENSHOTS.
Really useful.
I followed your steps and compiled & decompiled using VTS software. (http://www.virtuous-ten-studio.com/).
Absolutely NO ERROS before after compilation.
After copying the file to /system/app with ROOT EXPLORER (with proper permissions),
When I click SETTINGS ICON - I get a message saying "Apk N't installed".
What could be the reason - any idea???
Click to expand...
Click to collapse
Did you copy the META-INF and AndroidManifest.xml from the original apk to the new compiled in dist? AFAIK is it like signing. When you try to install by hand do you get a parsing error?
and2 said:
Did you copy the META-INF and AndroidManifest.xml from the original apk to the new compiled in dist? AFAIK is it like signing. When you try to install by hand do you get a parsing error?
Click to expand...
Click to collapse
Thanks for the reply!
As you can see from the enclosed screenshots - no problem with the compilation and signing.
VTS is taking care of the same.
What I'm trying to do is copy framework-res.apk, systemui.apk and settings.apk from different custom ROM to current ROM.
No problem in copying and overwriting the original files of current ROM.
TAB works fine.
NO FC's.
Only thing is I'm trying to change LIGHT theme of secsettings.apk to DARK theme.
Either I get APK n't installed or FC (SystemUI.apk etc).
Again If I replace secsettings.apk from CUSTOM ROM to current ROM - works fine. NO FC's.
Might be I need to dig deeper....

[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