• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[TUTORIAL] Where to find the colors for making a theme

Search This thread

KBanause

Senior Member
Jul 27, 2010
1,991
349
Munich
Hi,

after I switched my ROM from OpenDesire to Oxygen I had to find a way to change the text colors for the status bar and notification area as the theme I'm using has a dark status bar.

With the help of str355 I was (nearly) able to change the colors to the values I want to. The most tricky part will be the color of the clock for which I only know for non-CM-AOSP-ROMs (like Oxygen) for now and only the colors Black, White and Red. Feel free to provide hints and/or links for other colors/ROMs I will update this tutorial.

Always make a backup of the files you are about to edit or do a nandroid backup. If anything goes wrong you will get a bootloop.

It seems that apktool can change the brightness of some nine patch graphics while decompiling them. I had problems with the lockscreen files (jog_tab_*) where the files extracted from the original framework-res.apk were darker.

The guide in this post is for Android 2.2 (and maybe earlier versions). An updated version for Android 2.3 is in progress. You will find it in Post 62 when it's finished.

Tools, which are used in this tutorial:
  • apkmanager. I highly recommend that you replace the apktool.jar from the apkmanager with version 1.3.1. Version 1.3.2 can create not working framework-res.apk files. Version 1.3.1 is creating *-v4 drawable-directory names. Be sure to remove the -v4 or add it to the directory names you want to keep ;)
  • text editor
  • adb
  • smali/baksmali
  • ZIP-Tool of your choice
  • Graphics editor

1. Date and notification ticker
Files that have to be edited:
  • /system/framework/framework-res.apk
  • DECOMPILED_DIR/res/layout/status_bar.xml
What you have to do:
  1. Extract the framework-res.apk from your phone/rom zip file
  2. Decompile your framework-res.apk using apkmanager
  3. Edit the file DECOMPILED_DIR/res/layout/status_bar.xml
  4. Search for <com.android.server.status.TickerView
  5. As child nodes you will see TWO <TextView> tags. If not present, you must add android:textColor="#ffffffff" to the attributes. It will set your color. the four bytes mean: transparency, Red, Green, Blue (where transparency means: FF no transparency and 00 fully transparent). You have to set the color for both <TextView>s as Android will alternate between them when the notification ticker should show more than one line.
  6. The color for the date will be in the <com.android.server.status.DateView>
  7. Save the file
  8. IN APKManager choose the option to compile your framework
  9. Answer yes when you get asked if it is a system apk and if you want to copy files from the original framework. After the original framework has been extracted, change to your "keep"-Directory and delete the files resources.arsc and res/layout/status_bar.xml.
  10. Let apkmanager continue its work.
  11. now you have a new apk file in your place-here-for-modding directory, which you can push on your phone (DO IT IN RECOVERY): adb push unsignedframework.apk-filename /system/framework/framework-res.apk


2. Notifications
Files that have to be edited:
  • /system/framework/framework-res.apk
  • DECOMPILED_DIR/res/layout/status_bar_latest_event_content.xml
What you have to do:
  1. Decompile your framework (see Point 1)
  2. Edit the file DECOMPILED_DIR/res/layout/status_bar_latest_event_content.xml
  3. Search for android:id="@id/title". This is the title of the notification
  4. Edit the android:textColor attribute to your likings (add it if it is missing)
  5. Search for android:id="@id/text". This is the description of the notification
  6. Edit the android:textColor attribute to your likings (add it if it is missing)
  7. Search for android:id="@id/time". This is the time of the notification
  8. Edit the android:textColor attribute to your likings (add it if it is missing)
  9. compile your framework (See Point 1, but now you have to delete the status_bar_latest_event_content.xml from the keep-directory) and push it to your phone.


3. Provider, Carrier, Ongoing-Title, Notifications-Title, Clear-Button, noNotificationsTitle
Files that have to be edited:
  • /system/framework/framework-res.apk
  • DECOMPILED_DIR/res/layout/status_bar_expanded.xml
What you have to do:
  1. Decompile your framework (see Point 1)
  2. Edit the file DECOMPILED_DIR/res/layout/status_bar_expanded.xml
  3. Search for android:id="@id/plmnLabel". This is the Carrier name
  4. Edit the android:textColor attribute to your likings (add it if it is missing)
  5. Search for android:id="@id/spnLabel". This is the Provider name
  6. Edit the android:textColor attribute to your likings (add it if it is missing)
  7. Search for android:id="@id/ongoingTitle". This is the Ongoing-Title
  8. Edit the android:textColor attribute to your likings (add it if it is missing)
  9. Search for android:id="@id/latestTitle". This is the Notifications-Title
  10. Edit the android:textColor attribute to your likings (add it if it is missing)
  11. Search for android:id="@id/clear_all_button". This is the text of the Clear-Button
  12. Edit the android:textColor attribute to your likings (add it if it is missing)
  13. Search for android:id="@id/noNotificationsTitle". This is the text when no notification is displayed
  14. Edit the android:textColor attribute to your likings (add it if it is missing)
  15. compile your framework (See Point 1, but now you have to delete the status_bar_expanded.xml from the keep-directory) and push it to your phone.


4. Color of the progress bars (like the one the market is using)
Files that have to be edited:
  • /system/framework/framework-res.apk
  • DECOMPILED_DIR/res/drawable/progress_horizontal.xml
What you have to do:
  1. Decompile your framework (see Point 1)
  2. Edit the file DECOMPILED_DIR/res/layout/progress_horizontal.xml
  3. The progress bar uses gradients to set the color which goes from top to bottom. You have to set three colors: start, end and middle.
  4. <item android:id="@id/background"> is for the unused part of the progress bar.
  5. <item android:id="@id/progress"> is for the used part of the progress bar.
  6. compile your framework (See Point 1, but now you have to delete the progress_horizontal.xml from the keep-directory) and push it to your phone.


5. Color of selected text within text fields
Files that have to be edited:
  • /system/framework/framework-res.apk
  • DECOMPILED_DIR/res/values/styles.xml
What you have to do:
  1. Decompile your framework (see Point 1)
  2. Edit the file DECOMPILED_DIR/res/values/styles.xml
  3. You will find the color value in the <style name="TextAppearance"> node. It's called textColorHighlight
  4. compile your framework (See Point 1, but now you have to delete the styles.xml from the keep-directory) and push it to your phone.


6. Clock
6.1. Clock Color
As already stated, this only works for pure AOSP-ROMs (at least for Oxygen). It is NOT working for Sense Roms and those based on CM.

Files that have to be edited:
  • /system/framework/services.jar
Tools you need to do the job:
  • smali/baksmali
  • text editor of your choice
  • zip tool of your choice (WinRAR, 7zip, WinZIP, ...)
What you have to do:
  1. Extract the services.jar from your phone/rom file to the same directory as your smali/baksmali jar files.
  2. Extract the classes.dex out of the services.jar using a zip tool of your choice. Only extract it. Do not extract the whole file
  3. Decompile classes.dex: java -jar baksmali.jar -o classout/ classes.dex
  4. That will create a directory classout where your decompiled files are stored
  5. move to the directory classout/com/android/server/status . There you will find a lot of .smali files
  6. Open StatusBarIcon.smali in the text editor of your choice
  7. Search for the text Landroid/widget/TextView;->setTextColor(I)V (there should be only one)
  8. In the same line you will see somethink like invoke-virtual {v4, v6}. Note second v-Value (it can be another number) and search for it.
  9. You will get something like const/high16 v6, -0x100. That's Black. To change the color to White, use const v6, -0x1, using const/high16 v6, -0x1 will turn it Red. You can use this format: const v6, 0xffRRGGBB. const v6, 0xff0000ff would turn it blue and const v6, 0xffff00ff will turn it pink
  10. Save the file and move back to your directory, where you have saved the classes.dex
  11. Rename it for having a backup file
  12. Run this command: java -Xmx512M -jar smali.jar classout/ -o classes.dex
  13. Replace the classes.dex INSIDE your services.jar with your newly created classed.dex
  14. Push the new services.jar to your phone (/system/framework/) and reboot.
  15. Don't get panic, this reboot can take several minutes.
  16. Your clock should have the new color now.


7. Transparent background Notification Drawer
I only tested this only for a pure AOSP-ROM (Oxygen).
CyanogenMod based based already have this patch integrated.
It may work for Sense Roms. Feel free to test it and report your experience.

Files that have to be edited:
  • /system/framework/services.jar
Tools you need to do the job:
  • smali/baksmali
  • text editor of your choice
  • zip tool of your choice (WinRAR, 7zip, WinZIP, ...)
What you have to do:
  1. Extract the services.jar from your phone/rom file to the same directory as your smali/baksmali jar files.
  2. Extract the classes.dex out of the services.jar using a zip tool of your choice. Only extract it. Do not extract the whole file
  3. Decompile classes.dex: java -jar baksmali.jar -o classout/ classes.dex
  4. That will create a directory classout where your decompiled files are stored
  5. move to the directory classout/com/android/server/status . There you will find a lot of .smali files
  6. Open StatusBarService.smali in the text editor of your choice
  7. Search for the text const/4 v5, 0x2 (there should be only one)
  8. Change this to: const/4 v5, -0x3.
  9. Save the file and move back to your directory, where you have saved the classes.dex
  10. Rename it for having a backup file
  11. Run this command: java -Xmx512M -jar smali.jar classout/ -o classes.dex
  12. Replace the classes.dex INSIDE your services.jar with your newly created classed.dex
  13. Push the new services.jar to your phone (/system/framework/) and reboot.
  14. Don't get panic, this reboot can take several minutes..


8. Graphics
After you have decompiled your framework-res.apk you will end up with a lot of graphoc files in res/drawable-hdpi (or res/drawable-hdpi-v4 depending on your apktool.jar version).
This is the right place to edit notification icons, the notification bar und drawer, menu item background (list, grid, etc.), buttons, etc.
Some files will have .9.png. These are Nine-Patch-files. You will find more information on those files HERE and HERE

Let's begin with the status bar and notification drawer:

8.1. Status Bar
To get a new status bar background, you have to edit the file statusbar_background. Can be .png or .9.png

8.2. Notification Drawer
The notification drawer constists of several files.
8.2.1 Carrier/Provider area
To change the background for the Carrier/Provider area you have to edit the file status_bar_header_background. Can be .png or .9.png

8.2.2 Ongoing and Notifications
To change the background for the Ongoing and Notifications area you have to edit the file title_bar_portrait. Can be .png or .9.png

8.2.3 Notifications
To change the background for the notification area you have to edit the file status_bar_item_background_normal. This will be the background if you're just look at the notifications.
When focusing a notification it will be the file status_bar_item_background_focus and when you push/press it you have to edit the file status_bar_item_background_pressed.
The notifications are divided by the file divider_horizontal_bright. Can be .png or .9.png

8.2.4 Unused area
The area where no notification is displayed will get the background file status_bar_background. Depending on your ROM it will even display transparency. Can be .png or .9.png

8.2.5 Bottom
The bottom part of the expanded drawer is status_bar_close_on. This will use transparency too. Can be .png or .9.png

8.3. Animated notification icons
8.3.1 Battery (uncharging)
Depending on your ROM there will be more or less files for the battery gauge. They begin with stat_sys_battery_ followed by a number.
The order how they are get displayed is configured in the file res/drawable/stat_sys_battery.xml.

8.3.2 Battery (charging)
Depending on your ROM there will be more or less files for the battery charging gauge. They begin with stat_sys_battery_charge_anim followed by a number.
The order how they are get displayed is configured in the file res/drawable/stat_sys_battery_charge_anim.xml.

8.3.3 Download and upload animation
The files for the upload and download animation begin with stat_sys_download_anim and stat_sys_upload_anim followed by a number.
The order how they are get displayed is configured in the files res/drawable/stat_sys_download_anim.xml and res/drawable/stat_sys_upload_anim.xml.

8.4. Other files
8.4.1 Title for detailed view in call history
You will find the background for this in the file title_bar_tall.

8.4.2 Title for contacts
You will find the background for this in the file title_bar_medium.

8.4.3 Background for the grid menu
What I mean is the grid menu when you press the menu button within an application.
The following files are used:
menu_background: This the background for one grid element.
menu_background_fill_parent_width: the whole grid
To change the text color you have to set the color for the style TextAppearance.Widget.IconMenu.Item in the file res/values/styles.xml (thanks for SimonVT for this hint)
After pressing "More" you will find another menu. The text colors for this menu can be found in the style Theme.ExpandedMenu.

9. Applications
9.1. Ongoing downloads
You should have noticed that the text color of ongoing downloads in the notification area doesn't look like the text colors for normal notifications.
To change this color you have to change the file /system/app/DownloadProvider.apk. You'll find the color values in res/layout/status_bar_ongoing_event_progress_bar.xml. It uses the same names as the one in the framework-res.apk. After you have recompiled it you can flash it to your phone. You should see the new colors at the next download.

9.1. Notifications of music player
If you are using the default music player (/system/app/Music.apk) then you can change the colors it uses for notifications as well.
After you have decompiled it, open res/layout/statusbar.xml and edit the values of @id/artistalbum and @id/trackname.


* All tools mentioned here have links to the corresponding project or forum page. If you have problems with these tools ask the creators.
* I do not take any responsibilty for any bricked phone.
* Thanks to: str355 and ClassicalGas for providing me with hints on how to change additional colors, graphics, etc.
* Thanks to: one_love_420 for giving me the tip on how to set a real custom color for the clock in the status bar and for making THIS TUTORIAL to make the background of the contact list transparent.
 
Last edited:

cCeT

Senior Member
May 9, 2010
283
9
i was looking for changing status bar of oxygen.but this is complicated for me.can anyone make an update.zip of this or do you know any status bar update compatible with this rom?
 

BumAround

Senior Member
Apr 14, 2009
2,738
58
the one in my sig works with oxygen ;)

BBSIWC.jpg


This is nice and simple!

For Oxygen, just wondering if the battery indicator can be made box/rectangular with white percentage indicator inside and dark blue drain indicator? Everything else is perfect as it is. :)
 

str355

Senior Member
Feb 18, 2007
705
99
London
www.stressed.im
BBSIWC.jpg


This is nice and simple!

For Oxygen, just wondering if the battery indicator can be made box/rectangular with white percentage indicator inside and dark blue drain indicator? Everything else is perfect as it is. :)

I'm only making the one bar nowadays, from version 0.2 the bar is black so you wont need to do all of this ;)

Sent from my Fire using Smoke Signals
 

KBanause

Senior Member
Jul 27, 2010
1,991
349
Munich
I added a section. Now it's possible to use a transparent png as in the notification drawer.
 

sakai4eva

Senior Member
Sep 23, 2010
8,363
208
Kuala Lumpur
Quick question. I like white notification bars... is there any way I can get it back? Kinda dig the white style coz it helps me differentiate from Sense ROMs.
 

str355

Senior Member
Feb 18, 2007
705
99
London
www.stressed.im
any idea where to change the colour of the text for ongoing downloads?

i've updated the ongoing items in white in statusbarexpanded.xml which has changed the text colour for all ongoing items except for the downloads as far as i can see.

when the apps are installing (still under ongoing items) the text switches back to white etc..

there are references to the ongoing items in StatusBarService.smali so i may have to do the colour change in there unless anyone knows of a .xml entry i can edit.

EDIT: PowerAmp's ongoing music notification is also affected by this, although there is a setting to reverse the status text colour in poweramp's settings
 
Last edited:

KBanause

Senior Member
Jul 27, 2010
1,991
349
Munich
Right now I can't tell you where to find it.
But maybe you can help me:
When you press the menu button when you are on the homescreen I know which file I have to change for the background. But I can't find where I can change the color of the text. I would like to use the Gingerbread background for this but it ends up with a black text color on a black background :(
 

str355

Senior Member
Feb 18, 2007
705
99
London
www.stressed.im
sorry i've not changed anything in that menu yet.

i just had a quick play around with layout\menu_item.xml but it isnt any of the text in there

EDIT: that text isnt in the actual home application is it as the icons change if i switch from launcherpro to zeam
 
Last edited:

KBanause

Senior Member
Jul 27, 2010
1,991
349
Munich
EDIT: that text isnt in the actual home application is it as the icons change if i switch from launcherpro to zeam

It must be in the framework because in other applications it's the same (black text color on black background) while in the emulator running Gingerbread the text is white.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 67
    Hi,

    after I switched my ROM from OpenDesire to Oxygen I had to find a way to change the text colors for the status bar and notification area as the theme I'm using has a dark status bar.

    With the help of str355 I was (nearly) able to change the colors to the values I want to. The most tricky part will be the color of the clock for which I only know for non-CM-AOSP-ROMs (like Oxygen) for now and only the colors Black, White and Red. Feel free to provide hints and/or links for other colors/ROMs I will update this tutorial.

    Always make a backup of the files you are about to edit or do a nandroid backup. If anything goes wrong you will get a bootloop.

    It seems that apktool can change the brightness of some nine patch graphics while decompiling them. I had problems with the lockscreen files (jog_tab_*) where the files extracted from the original framework-res.apk were darker.

    The guide in this post is for Android 2.2 (and maybe earlier versions). An updated version for Android 2.3 is in progress. You will find it in Post 62 when it's finished.

    Tools, which are used in this tutorial:
    • apkmanager. I highly recommend that you replace the apktool.jar from the apkmanager with version 1.3.1. Version 1.3.2 can create not working framework-res.apk files. Version 1.3.1 is creating *-v4 drawable-directory names. Be sure to remove the -v4 or add it to the directory names you want to keep ;)
    • text editor
    • adb
    • smali/baksmali
    • ZIP-Tool of your choice
    • Graphics editor

    1. Date and notification ticker
    Files that have to be edited:
    • /system/framework/framework-res.apk
    • DECOMPILED_DIR/res/layout/status_bar.xml
    What you have to do:
    1. Extract the framework-res.apk from your phone/rom zip file
    2. Decompile your framework-res.apk using apkmanager
    3. Edit the file DECOMPILED_DIR/res/layout/status_bar.xml
    4. Search for <com.android.server.status.TickerView
    5. As child nodes you will see TWO <TextView> tags. If not present, you must add android:textColor="#ffffffff" to the attributes. It will set your color. the four bytes mean: transparency, Red, Green, Blue (where transparency means: FF no transparency and 00 fully transparent). You have to set the color for both <TextView>s as Android will alternate between them when the notification ticker should show more than one line.
    6. The color for the date will be in the <com.android.server.status.DateView>
    7. Save the file
    8. IN APKManager choose the option to compile your framework
    9. Answer yes when you get asked if it is a system apk and if you want to copy files from the original framework. After the original framework has been extracted, change to your "keep"-Directory and delete the files resources.arsc and res/layout/status_bar.xml.
    10. Let apkmanager continue its work.
    11. now you have a new apk file in your place-here-for-modding directory, which you can push on your phone (DO IT IN RECOVERY): adb push unsignedframework.apk-filename /system/framework/framework-res.apk


    2. Notifications
    Files that have to be edited:
    • /system/framework/framework-res.apk
    • DECOMPILED_DIR/res/layout/status_bar_latest_event_content.xml
    What you have to do:
    1. Decompile your framework (see Point 1)
    2. Edit the file DECOMPILED_DIR/res/layout/status_bar_latest_event_content.xml
    3. Search for android:id="@id/title". This is the title of the notification
    4. Edit the android:textColor attribute to your likings (add it if it is missing)
    5. Search for android:id="@id/text". This is the description of the notification
    6. Edit the android:textColor attribute to your likings (add it if it is missing)
    7. Search for android:id="@id/time". This is the time of the notification
    8. Edit the android:textColor attribute to your likings (add it if it is missing)
    9. compile your framework (See Point 1, but now you have to delete the status_bar_latest_event_content.xml from the keep-directory) and push it to your phone.


    3. Provider, Carrier, Ongoing-Title, Notifications-Title, Clear-Button, noNotificationsTitle
    Files that have to be edited:
    • /system/framework/framework-res.apk
    • DECOMPILED_DIR/res/layout/status_bar_expanded.xml
    What you have to do:
    1. Decompile your framework (see Point 1)
    2. Edit the file DECOMPILED_DIR/res/layout/status_bar_expanded.xml
    3. Search for android:id="@id/plmnLabel". This is the Carrier name
    4. Edit the android:textColor attribute to your likings (add it if it is missing)
    5. Search for android:id="@id/spnLabel". This is the Provider name
    6. Edit the android:textColor attribute to your likings (add it if it is missing)
    7. Search for android:id="@id/ongoingTitle". This is the Ongoing-Title
    8. Edit the android:textColor attribute to your likings (add it if it is missing)
    9. Search for android:id="@id/latestTitle". This is the Notifications-Title
    10. Edit the android:textColor attribute to your likings (add it if it is missing)
    11. Search for android:id="@id/clear_all_button". This is the text of the Clear-Button
    12. Edit the android:textColor attribute to your likings (add it if it is missing)
    13. Search for android:id="@id/noNotificationsTitle". This is the text when no notification is displayed
    14. Edit the android:textColor attribute to your likings (add it if it is missing)
    15. compile your framework (See Point 1, but now you have to delete the status_bar_expanded.xml from the keep-directory) and push it to your phone.


    4. Color of the progress bars (like the one the market is using)
    Files that have to be edited:
    • /system/framework/framework-res.apk
    • DECOMPILED_DIR/res/drawable/progress_horizontal.xml
    What you have to do:
    1. Decompile your framework (see Point 1)
    2. Edit the file DECOMPILED_DIR/res/layout/progress_horizontal.xml
    3. The progress bar uses gradients to set the color which goes from top to bottom. You have to set three colors: start, end and middle.
    4. <item android:id="@id/background"> is for the unused part of the progress bar.
    5. <item android:id="@id/progress"> is for the used part of the progress bar.
    6. compile your framework (See Point 1, but now you have to delete the progress_horizontal.xml from the keep-directory) and push it to your phone.


    5. Color of selected text within text fields
    Files that have to be edited:
    • /system/framework/framework-res.apk
    • DECOMPILED_DIR/res/values/styles.xml
    What you have to do:
    1. Decompile your framework (see Point 1)
    2. Edit the file DECOMPILED_DIR/res/values/styles.xml
    3. You will find the color value in the <style name="TextAppearance"> node. It's called textColorHighlight
    4. compile your framework (See Point 1, but now you have to delete the styles.xml from the keep-directory) and push it to your phone.


    6. Clock
    6.1. Clock Color
    As already stated, this only works for pure AOSP-ROMs (at least for Oxygen). It is NOT working for Sense Roms and those based on CM.

    Files that have to be edited:
    • /system/framework/services.jar
    Tools you need to do the job:
    • smali/baksmali
    • text editor of your choice
    • zip tool of your choice (WinRAR, 7zip, WinZIP, ...)
    What you have to do:
    1. Extract the services.jar from your phone/rom file to the same directory as your smali/baksmali jar files.
    2. Extract the classes.dex out of the services.jar using a zip tool of your choice. Only extract it. Do not extract the whole file
    3. Decompile classes.dex: java -jar baksmali.jar -o classout/ classes.dex
    4. That will create a directory classout where your decompiled files are stored
    5. move to the directory classout/com/android/server/status . There you will find a lot of .smali files
    6. Open StatusBarIcon.smali in the text editor of your choice
    7. Search for the text Landroid/widget/TextView;->setTextColor(I)V (there should be only one)
    8. In the same line you will see somethink like invoke-virtual {v4, v6}. Note second v-Value (it can be another number) and search for it.
    9. You will get something like const/high16 v6, -0x100. That's Black. To change the color to White, use const v6, -0x1, using const/high16 v6, -0x1 will turn it Red. You can use this format: const v6, 0xffRRGGBB. const v6, 0xff0000ff would turn it blue and const v6, 0xffff00ff will turn it pink
    10. Save the file and move back to your directory, where you have saved the classes.dex
    11. Rename it for having a backup file
    12. Run this command: java -Xmx512M -jar smali.jar classout/ -o classes.dex
    13. Replace the classes.dex INSIDE your services.jar with your newly created classed.dex
    14. Push the new services.jar to your phone (/system/framework/) and reboot.
    15. Don't get panic, this reboot can take several minutes.
    16. Your clock should have the new color now.


    7. Transparent background Notification Drawer
    I only tested this only for a pure AOSP-ROM (Oxygen).
    CyanogenMod based based already have this patch integrated.
    It may work for Sense Roms. Feel free to test it and report your experience.

    Files that have to be edited:
    • /system/framework/services.jar
    Tools you need to do the job:
    • smali/baksmali
    • text editor of your choice
    • zip tool of your choice (WinRAR, 7zip, WinZIP, ...)
    What you have to do:
    1. Extract the services.jar from your phone/rom file to the same directory as your smali/baksmali jar files.
    2. Extract the classes.dex out of the services.jar using a zip tool of your choice. Only extract it. Do not extract the whole file
    3. Decompile classes.dex: java -jar baksmali.jar -o classout/ classes.dex
    4. That will create a directory classout where your decompiled files are stored
    5. move to the directory classout/com/android/server/status . There you will find a lot of .smali files
    6. Open StatusBarService.smali in the text editor of your choice
    7. Search for the text const/4 v5, 0x2 (there should be only one)
    8. Change this to: const/4 v5, -0x3.
    9. Save the file and move back to your directory, where you have saved the classes.dex
    10. Rename it for having a backup file
    11. Run this command: java -Xmx512M -jar smali.jar classout/ -o classes.dex
    12. Replace the classes.dex INSIDE your services.jar with your newly created classed.dex
    13. Push the new services.jar to your phone (/system/framework/) and reboot.
    14. Don't get panic, this reboot can take several minutes..


    8. Graphics
    After you have decompiled your framework-res.apk you will end up with a lot of graphoc files in res/drawable-hdpi (or res/drawable-hdpi-v4 depending on your apktool.jar version).
    This is the right place to edit notification icons, the notification bar und drawer, menu item background (list, grid, etc.), buttons, etc.
    Some files will have .9.png. These are Nine-Patch-files. You will find more information on those files HERE and HERE

    Let's begin with the status bar and notification drawer:

    8.1. Status Bar
    To get a new status bar background, you have to edit the file statusbar_background. Can be .png or .9.png

    8.2. Notification Drawer
    The notification drawer constists of several files.
    8.2.1 Carrier/Provider area
    To change the background for the Carrier/Provider area you have to edit the file status_bar_header_background. Can be .png or .9.png

    8.2.2 Ongoing and Notifications
    To change the background for the Ongoing and Notifications area you have to edit the file title_bar_portrait. Can be .png or .9.png

    8.2.3 Notifications
    To change the background for the notification area you have to edit the file status_bar_item_background_normal. This will be the background if you're just look at the notifications.
    When focusing a notification it will be the file status_bar_item_background_focus and when you push/press it you have to edit the file status_bar_item_background_pressed.
    The notifications are divided by the file divider_horizontal_bright. Can be .png or .9.png

    8.2.4 Unused area
    The area where no notification is displayed will get the background file status_bar_background. Depending on your ROM it will even display transparency. Can be .png or .9.png

    8.2.5 Bottom
    The bottom part of the expanded drawer is status_bar_close_on. This will use transparency too. Can be .png or .9.png

    8.3. Animated notification icons
    8.3.1 Battery (uncharging)
    Depending on your ROM there will be more or less files for the battery gauge. They begin with stat_sys_battery_ followed by a number.
    The order how they are get displayed is configured in the file res/drawable/stat_sys_battery.xml.

    8.3.2 Battery (charging)
    Depending on your ROM there will be more or less files for the battery charging gauge. They begin with stat_sys_battery_charge_anim followed by a number.
    The order how they are get displayed is configured in the file res/drawable/stat_sys_battery_charge_anim.xml.

    8.3.3 Download and upload animation
    The files for the upload and download animation begin with stat_sys_download_anim and stat_sys_upload_anim followed by a number.
    The order how they are get displayed is configured in the files res/drawable/stat_sys_download_anim.xml and res/drawable/stat_sys_upload_anim.xml.

    8.4. Other files
    8.4.1 Title for detailed view in call history
    You will find the background for this in the file title_bar_tall.

    8.4.2 Title for contacts
    You will find the background for this in the file title_bar_medium.

    8.4.3 Background for the grid menu
    What I mean is the grid menu when you press the menu button within an application.
    The following files are used:
    menu_background: This the background for one grid element.
    menu_background_fill_parent_width: the whole grid
    To change the text color you have to set the color for the style TextAppearance.Widget.IconMenu.Item in the file res/values/styles.xml (thanks for SimonVT for this hint)
    After pressing "More" you will find another menu. The text colors for this menu can be found in the style Theme.ExpandedMenu.

    9. Applications
    9.1. Ongoing downloads
    You should have noticed that the text color of ongoing downloads in the notification area doesn't look like the text colors for normal notifications.
    To change this color you have to change the file /system/app/DownloadProvider.apk. You'll find the color values in res/layout/status_bar_ongoing_event_progress_bar.xml. It uses the same names as the one in the framework-res.apk. After you have recompiled it you can flash it to your phone. You should see the new colors at the next download.

    9.1. Notifications of music player
    If you are using the default music player (/system/app/Music.apk) then you can change the colors it uses for notifications as well.
    After you have decompiled it, open res/layout/statusbar.xml and edit the values of @id/artistalbum and @id/trackname.


    * All tools mentioned here have links to the corresponding project or forum page. If you have problems with these tools ask the creators.
    * I do not take any responsibilty for any bricked phone.
    * Thanks to: str355 and ClassicalGas for providing me with hints on how to change additional colors, graphics, etc.
    * Thanks to: one_love_420 for giving me the tip on how to set a real custom color for the clock in the status bar and for making THIS TUTORIAL to make the background of the contact list transparent.
    61
    Guide for Android 2.3

    The guide in this post is for Android 2.3 and mainly for AOSP ROMs. It is working with Oxygen 2.0 RC1 by AdamG and it may work with other ROMs (CyanogenMod based, Sense) but since I don't use these ROMs I can't tell. Feel free to check and report your experience.

    Always make a backup of the files you are about to edit or do a nandroid backup. If anything goes wrong you will get a bootloop.

    Note:
    It seems that apktool can change the brightness of some nine patch graphics while decompiling them. I had problems with the lockscreen files (jog_tab_*) where the files extracted from the original framework-res.apk were darker.

    Theming got easier with Gingerbread as you don't have to decompile any classes.dex file but harder at the same time as icons, colors, etc. are now located in different files.

    If you are modifying an application and you are seeing a textAppearance, color, background or similar: If the value starts with "@android:" then you will find it in the framework-res.apk

    Tools, which are used in this tutorial:
    • apktool. I highly recommend that you replace the apktool.jar from the apkmanager with version 1.3.1 if you want to edit .xml files. Version 1.3.2 can create non-working files as it screws up some values in .xml files. Version 1.3.1 is creating *-v4 drawable-directory names. Be sure to remove the -v4 or add it to the directory names you want to keep.
      Version 1.4.1 is working now.
    • text editor
    • adb
    • smali/baksmali
    • ZIP-Tool of your choice
    • Graphics editor


    The very first thing you have to do is installing the framework of the ROM you are trying to create a theme for.
    Code:
    java -jar apktool.jar if <PATH_TO_YOUR>/framework-res.apk
    If you don't do this then decompiling of the file SystemUI.apk WILL fail. If you recompile SystemUI.apk or framework-res.apk then you should recompile these files as system apks with keeping unmodified files.

    If you are using apkmanager then you should recompile your files as system apk files with the option of keeping unmodified files. Be aware of the fact that apktool.jar version 1.3.1 creates drawable-*-v4 directories (i.e. drawable-hdpi in the original .apk will get drawable-hdpi-v4 after decompile). You have to either rename them back in your project directory or you have to rename the appropriate directories in the directory where you stored the files you want to keep.

    1. Status bar
    1.1. Clock, Date and notification ticker
    It's now much easier to modify the clock in the status bar as it is now located within a .xml-file.
    Files that have to be edited:

    • /system/app/SystemUI.apk
    • DECOMPILED_DIR/res/layout/status_bar.xml
    1.1.1. Clock
    Search for a line that begins with "<com.android.systemui.statusbar.Clock". You now have two ways for changing the font-style and color:
    1. Adding android:textColor="TEXTCOLOR" and/or android:textStyle="TEXTSTYLE", where TEXTCOLOR can be a HTML color (#TTRRGGBB - TT means transparency) and TEXTSTYLE can be "bold", "bold|italic", "italic" or ""
    2. Changing the style of android:textAppearance. This can be easier but keep in mind that this style could be used somewhere else.

    A possible new line could be:
    <com.android.systemui.statusbar.Clock android:textColor="#ffff0000" android:textStyle="italic" android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

    With this you would get an italic, red clock.


    1.1.2. Date
    The date which you can see in the status bar can be modified by editing the line beginning with "<com.android.systemui.statusbar.DateView". As with the clock, you can either add textColor and textStyle or change the android:textAppearance

    1.1.3. Notification ticker
    Search for the line containing "@id/tickerText". It is followed by two other lines which contain "android:textAppearance="@android:style/TextAppearance.StatusBar.Ticker"". As with the clock, you can either add textColor and textStyle or change the android:textAppearance


    2. Carrier, Ongoing-Title, Notifications-Title, Clear-Button, noNotificationsTitle
    Files that have to be edited:

    • /system/app/SystemUI.apk
    • DECOMPILED_DIR/res/layout/status_bar_expanded.xml
    2.1. Carrier
    Search for the line beginning with "<com.android.systemui.statusbar.CarrierLabel". This line contains the text for the carrier and its appearance.
    The background for the carrier label can be changed one line above using the "android:background" attribute. It can be a pre-defined color value (@color/NAME_OF_COLOR), a html color value (#TTRRGGBB) or even a graphics file (@drawable/NAME_OF_GRAPHIC).

    2.2. Ongoing-Title
    Search for android:id="@id/ongoingTitle". This is the Ongoing-Title. As with other texts you can add/change "android:textAppearance", "android:textColor" and "android:textStyle"
    The background is defined in the "android:background" attribute.

    2.3. Notifications-Title
    Search for android:id="@id/latestTitle". This is the Notifications-Title. As with other texts you can add/change "android:textAppearance", "android:textColor" and "android:textStyle"
    The background is defined in the "android:background" attribute.

    2.4. noNotificationsTitle
    Search for android:id="@id/noNotificationsTitle". This is the text when no notification is displayed. As with other texts you can add/change "android:textAppearance", "android:textColor" and "android:textStyle"
    The background is defined in the "android:background" attribute.

    2.5. Clear-Button
    Search for android:id="@id/clear_all_button". This is the text of the Clear-Button


    3. Notifications
    Files that have to be edited:

    • /system/frameworks/framework-res.apk
    • DECOMPILED_DIR/res/layout/status_bar_latest_event_content.xml
    In this file you find the texts for
    • the title of the notification: Search for android:id="@id/title" . Textcolor and textstyle are editable via style or directly in the xml (see point 1.1.1.)
    • the description of the notification: Search for android:id="@id/text"
    • the time of the notification: Search for android:id="@id/time"

    4. Color of the progress bars and seek bars
    4.1. progress bars (like the one the market is using while downloading)
    Files that have to be edited:

    • /system/framework/framework-res.apk
    • DECOMPILED_DIR/res/drawable/progress_horizontal.xml
    The progress bar uses gradients to set the color which goes from top to bottom. You have to set three colors: start (top of the bar), end (bottom of the bar) and middle.
    • <item android:id="@id/background"> is for the unused part of the progress bar.
    • <item android:id="@id/progress"> is for the used part of the progress bar.

    4.2. seek bars
    Files that have to be edited:

    • /system/framework/framework-res.apk
    • DECOMPILED_DIR/res/values/styles.xml
    Seek bars are progress bar like components which enables you to change a value within a range (you will see some in the sound settings (Settings -> Sound -> Volume) or when changing the brightness of the display).
    By default, the seek bars are using the color settings of the progress bar to display the current position (so it should be possible to use different ones by using another .xml than the progress bars).
    To modify it, open the styles.xml and search for <style name="Widget.SeekBar" parent="@style/Widget">. Here you can change the height (<item name="maxHeight"> and <item name="minHeight">), the appearance (<item name="indeterminateDrawable"> and <item name="progressDrawable">) and the graphic of the thumb (<item name="thumb">, res/drawable/seek_thumb.xml).
    The thumb itself comes in three files, located in res/drawable-hdpi:
    • seek_thumb_normal.png
    • seek_thumb_pressed.png
    • seek_thumb_selected.png



    5. Color of selected text within text fields
    Files that have to be edited:

    • /system/framework/framework-res.apk
    • DECOMPILED_DIR/res/values/styles.xml
    Search for <style name="TextAppearance"> in the styles.xml. The color for the selected text is the node textColorHighlight


    6. Transparency
    6.1. notification drawer
    If you use a ROM that doesn't have a transparent notification drawer by default, then you have to do this:
    Decompile your SystemUI.apk using apktool.jar (or just decompile the classes.dex using baksmali). Browse to the folder smali/com/android/systemui/statusbar/ (or com/android/systemui/statusbar/ if you have just decompiled classes.dex). Edit the file StatusBarService.smali.
    Search for the following line:
    Code:
    invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
    above that line you must have
    Code:
        const/4 v5, 0x2
    change this to
    Code:
        const/4 v5, -0x3
    After recompiling SystemUI.apk and pushing it to the phone you can get something like this (this is a screenshot out of the android emulator):
    emulator_transparency.png


    6.2. Status bar
    If you use a ROM that doesn't have a transparent status bar by default, then you have to do this:
    Decompile your SystemUI.apk using apktool.jar (or just decompile the classes.dex using baksmali). Browse to the folder smali/com/android/systemui/statusbar/ (or com/android/systemui/statusbar/ if you have just decompiled classes.dex). Edit the file StatusBarService.smali.
    Search for the following line:
    Code:
    invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
    directly above it you will find
    Code:
    const/4 v5, 0x2
    change this to
    Code:
    const/4 v5, -0x3
    Recompiling SystemUI.apk and pushing it to the phone (I tested it with the emulator).


    8. Graphics
    After you have decompiled your .apk files you will end up with a lot of graphoc files in res/drawable-hdpi (or res/drawable-hdpi-v4 depending on your apktool.jar version).
    This is the right place to edit notification icons, the notification bar und drawer, menu item background (list, grid, etc.), buttons, etc.
    Some files will have .9.png. These are Nine-Patch-files. You will find more information on those files HERE and HERE

    Let's begin with the status bar and notification drawer:

    8.1. Status Bar
    To get a new status bar background, you have to edit the file statusbar_background. You find it in the SystemUI.apk. Can be .png or .9.png

    8.2. Notification Drawer
    The notification drawer constists of several files.
    8.2.1 Carrier/Provider area
    To change the background for the Carrier/Provider area you have to edit the file status_bar_header_background. You find it in the SystemUI.apk. Can be .png or .9.png

    8.2.2 Ongoing and Notifications
    To change the background for the Ongoing and Notifications area you have to edit the file title_bar_portrait. You find it in the SystemUI.apk. Can be .png or .9.png

    8.2.3 Notifications
    To change the background for the notification area you have to edit the file status_bar_item_background_normal. You find it in the framework-res.apk. This will be the background if you're just look at the notifications.
    When focusing a notification it will be the file status_bar_item_background_focus and when you push/press it you have to edit the file status_bar_item_background_pressed.
    The notifications are divided by the file divider_horizontal_bright. Can be .png or .9.png

    8.2.4 Unused area
    The area where no notification is displayed is set in the file SystemUI.apk/res/layout/status_bar_tracking.xml.
    You have to change the attribute android:background of the View-node. It can be a color-value, a predefined color or a graphics file. Depending on your ROM it will even display transparency. Can be .png or .9.png

    8.2.5 Bottom
    The bottom part of the expanded drawer is status_bar_close_on. You find it in the SystemUI.apk. This will use transparency too. Can be .png or .9.png

    8.3. Animated notification icons
    8.3.1 Battery (uncharging)
    Depending on your ROM there will be more or less files for the battery gauge. They begin with stat_sys_battery_ followed by a number.
    The order how they are get displayed is configured in the file res/drawable/stat_sys_battery.xml. You find it in the framework-res.apk.

    8.3.2 Battery (charging)
    Depending on your ROM there will be more or less files for the battery charging gauge. They begin with stat_sys_battery_charge_anim followed by a number.
    The order how they are get displayed is configured in the file res/drawable/stat_sys_battery_charge_anim.xml. You find it in the framework-res.apk.

    8.3.3 Download and upload animation
    The files for the upload and download animation begin with stat_sys_download_anim and stat_sys_upload_anim followed by a number.
    The order how they are get displayed is configured in the files res/drawable/stat_sys_download_anim.xml and res/drawable/stat_sys_upload_anim.xml. You find it in the framework-res.apk.

    8.4. Other files
    8.4.1 Title for detailed view in call history
    You will find the background for this in the file title_bar_tall. You find it in the framework-res.apk.

    8.4.2 Title for contacts
    You will find the background for this in the file title_bar_medium. You find it in the framework-res.apk.

    8.4.3 Background for the grid menu
    What I mean is the grid menu when you press the menu button within an application.
    The following files are used and you find them in the framework-res.apk.:
    menu_background: This the background for one grid element.
    menu_background_fill_parent_width: the whole grid
    To change the text color you have to set the color for the style TextAppearance.Widget.IconMenu.Item in the file res/values/styles.xml (thanks for SimonVT for this hint)
    After pressing "More" you will find another menu. The text colors for this menu can be found in the style Theme.ExpandedMenu.

    9. Applications
    9.1. Ongoing downloads
    You should have noticed that the text color of ongoing downloads in the notification area doesn't look like the text colors for normal notifications.
    To change this color you have to change the file /system/app/DownloadProvider.apk. You'll find the color values in res/layout/status_bar_ongoing_event_progress_bar.xml. It uses the same names as the one in the framework-res.apk. After you have recompiled it you can flash it to your phone. You should see the new colors at the next download.

    9.1. Notifications of music player
    If you are using the default music player (/system/app/Music.apk) then you can change the colors it uses for notifications as well.
    After you have decompiled it, open res/layout/statusbar.xml and edit the values of @id/artistalbum and @id/trackname.


    * All tools mentioned here have links to the corresponding project or forum page. If you have problems with these tools ask the creators.
    * I do not take any responsibilty for any bricked phone.
    * Thanks to: str355 and ClassicalGas for providing me with hints on how to change additional colors, graphics, etc.
    * Thanks to: one_love_420 for giving me the link to HIS TUTORIAL to make the background of the contact list transparent.
    * Thanks to: Yorzua for a faster way to make the notifaction area transparent (your "entry" point is easier to find)
    5
    Beautiful color for beautiful theme!
    3
    Thanks, found out, just neded to navigate CMD to proper directory ;)
    All this I started to make new transparent BG on pull down status bar, since old one from JVB is having some issues.
    I changed on JVH SystemUI.apk (deodexed) const/4 v5, 0x2 to const/4 v5, -0x3 with smali...but still no transparent background on pull down status bar???
    Do I need to change any other classes.dex other than one in System.apk???

    did you change the png too?the shade_bg.png has to be a transparent png.
    also in res/layout/status_bar_tracking.xml has to be changed the following:

    <View android:background="#ff212121" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />

    to

    <View android:background="@drawable/shade_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
    2
    I'll attach two. Original (working) and Modified (not working). I've only changed stat_sys_data_connected_1x.png.

    When I compare your original SystemUI.apk with the one shipped with Oxygen 2.0 RC6 then I see that there are modified xml-files.
    I added those changes and your new stat_sys_data_connected_1x.png

    Then I compiled it, replaced all files in the new .apk with the files from the original SystemUI.apk (except for resources.arsc as xml files got changed) and it worked on my phone.
    Try the attached file.

    I had to replace all unmodified files. Without this step I haven't had a statusbar too.