Using apktool i decompiled systemUI.apk but I don't know what to edit.
Can anyone make a guide?
HyuLilium said:
Using apktool i decompiled systemUI.apk but I don't know what to edit.
Can anyone make a guide?
Click to expand...
Click to collapse
Edit two xml files to the ones indicated in red in the lines shown below, basically change #FF000000 to #00000000
1 res / layout / tw_super_status_bar.xml
<com.android.systemui.statusbar.phone.StatusBarWin dowView android:background="#00000000" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
2. res / values / drawables.xml
<item type="drawable" name="status_bar_background">#00000000</item>
This should do it, it works on stock roms
ag4751 said:
Edit two xml files to the ones indicated in red in the lines shown below, basically change #FF000000 to #00000000
1 res / layout / tw_super_status_bar.xml
<com.android.systemui.statusbar.phone.StatusBarWin dowView android:background="#00000000" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
2. res / values / drawables.xml
<item type="drawable" name="status_bar_background">#00000000</item>
This should do it, it works on stock roms
Click to expand...
Click to collapse
I tried what your suggested but it didn't work
There's no "tw_super_status_bar.xml" just "super_status_bar.xml"
and there's no <com.android.systemui.statusbar.phone.StatusBarW in dowView android:background="#FF000000" either it's <com.android.systemui.statusbar.phone.StatusBarWindowView android:background="@*android:color/transparent"
I changed it recompiled it, replaced the one in systems and when it rebooted there was no status bar at all and the wallpaper was black and I couldn't change it.
HyuLilium said:
I tried what your suggested but it didn't work
There's no "tw_super_status_bar.xml" just "super_status_bar.xml"
and there's no <com.android.systemui.statusbar.phone.StatusBarW in dowView android:background="#FF000000" either it's <com.android.systemui.statusbar.phone.StatusBarWindowView android:background="@*android:color/transparent"
I changed it recompiled it, replaced the one in systems and when it rebooted there was no status bar at all and the wallpaper was black and I couldn't change it.
Click to expand...
Click to collapse
TW Super Status Bar is on 4.1.2, if CM10.1 is 4.2.2 based then it isn't it is just the Super Status Bar and you should be able to do the same thing with it by changing to this com.android.systemui.statusbar.phone.StatusBarWindowView android:background="#00000000" and in res / values / drawables.xml this <item type="drawable" name="status_bar_background">#00000000</item>
If you have a black wallpaper then you have made an error somewhere both these changes affect the status bar only
ag4751 said:
TW Super Status Bar is on 4.1.2, if CM10.1 is 4.2.2 based then it isn't it is just the Super Status Bar and you should be able to do the same thing with it by changing to this com.android.systemui.statusbar.phone.StatusBarWindowView android:background="#00000000" and in res / values / drawables.xml this <item type="drawable" name="status_bar_background">#00000000</item>
If you have a black wallpaper then you have made an error somewhere both these changes affect the status bar only
Click to expand...
Click to collapse
Alright I'm writing every step I'm taking.
After setting up apktool (aapt.exe, apktool.bat, apktool.jar, cmd.exe, framework-res.apk...)
1 cmd.exe
2 apktool if framework-res.apk
3 apktool d SystemUI.apk
4 \SystemUI\res\layout\super_status_bar.xml Edit with Notepad++
5 changed <com.android.systemui.statusbar.phone.StatusBarWindowView android:background="@*android:color/transparent" with #00000000
6 exit and save
7 \SystemUI\res\values\drawtables.xml Edit with Notepad++
8 change <item type="drawable" name="status_bar_background">#ff000000</item> to #00000000
9 exit and save
10 go back to cmd.exe
11 type apktool b SystemUI SystemUI.apk -but before pressing enter remember to delete the old one so it doesn't overwrite or mess up somehow
12 Copying the new apk into the sd card
13 using a file browser ( i use solid explorer) with superuser permission I copy and overwrite over the old SystemUI.apk
14 The phone automatically reboots
Result: The screen is black, missing status bar, long pressing doesn't show the running apps etc.. basically the UI is crippled
Related
I wish to make transparent the contacts.apk on my streak , I have tried many guides but none of these worked for my froyo 2.2.2. Any of you tried by chance?
Have you looked here?
http://forum.xda-developers.com/showthread.php?t=990014
Seems to be a lot of transparent apps here and some instructions for editing your own.
thanks for the help (useful link), even if I meant something like
I'm sorry if you do not see too much but definitely makes the idea (sorry but taken from the web)
Now that is cool and I want it too....
I found this guide on the web,i tried many times it did not work :
What you have to do:
Extract the Contacts.apk from your phone/rom zip file
Decompile Contacts.apk
Open
call_background.xml
in res/drawable
Change
--- Code: ---<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="android:color/transparent" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="android:drawable/menuitem_checkbox_on" />
<item android:state_focused="false" android:state_pressed="false" android:drawable="android:drawable/screen_background_dark" />
</selector>
--- End code ---
To:
--- Code: ---<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="android:color/transparent" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="android:drawable/menuitem_checkbox_on" />
<item android:state_focused="false" android:state_pressed="false" android:drawable="android:color/transparent" />
</selector>
--- End code ---
Save and close.
Open
styles.xml
in res/values.
Change lines 3-6
--- Code: ---<style name="DialtactsTheme" parent="android:style/Theme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">null</item>
</style>
--- End code ---
To.
--- Code: ---<style name="DialtactsTheme" parent="android:style/Theme.Wallpaper">
<item name="android:windowBackground">drawable/custom_background_dialer</item>
<item name="android:windowNoTitle">null</item>
</style>
--- End code ---
Save and close.
Next add the transparent custom_background_dialer.png to the drawable-mdpi-finger folder.This can also be a custom image doesn't have to be a transparent one.
IN APKManager choose the option to compile your Contacts
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 everything that you changed, (i.e. call_background.xml and the styles.xml is now hidden so you can't delete that so just delete the resources.arsc & call_background.xml)
Let apkmanager continue its work.
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 unsignedContacts.apk /system/app/Contacts.apk or rename taking the unsigned out and put in your theme zip.
Now you must make the dialer buttons transparent.Change the following to be transparent,
Images are in the drawable-mdpi-finger folder:
btn_dial_action_left_disable.9
btn_dial_action_left_disable_focused.9
btn_dial_action_left_normal.9
btn_dial_action_left_pressed.9
btn_dial_action_left_selected.9
btn_dial_action_middle_disable.9
btn_dial_action_middle_disable_focused.9
btn_dial_action_middle_normal.9
btn_dial_action_middle_pressed.9
btn_dial_action_middle_selected.9
btn_dial_action_right_disable.9
btn_dial_action_right_disable_focused.9
btn_dial_action_right_normal.9
btn_dial_action_right_pressed.9
btn_dial_action_right_selected.9
btn_dial_normal.9
btn_dial_pressed.9
btn_dial_selected.9
btn_dial_textfield_activated.9
btn_dial_textfield_normal.9
btn_dial_textfield_pressed.9
btn_dial_textfield_selected.9
Screen Shot of what it looks like:
You have ideas on how to do (even call_background.xml is different )
I did ok, this is for you (although I have to change something again)
could we see a teaser screenie on the streak with this, thanks guys!
nice work!
How To Port a Theme: The Nottach Way
This first draft will probably have confusing parts so if you get stuck let me know and I'll make it clearer.
Backing Up:
The first thing you're going to want to do is backup the files you will be editing. I recommend making a CWM zip of the backed up files. That way if you bootloop you can easily flash back.
Steps To Backup:
You will most likely be theming framework-res.apk and systemui.apk at first. I will show you how to back them up. If you theme other files in the future be sure to add the original to your backup CWM update by repeating these steps. *note* this installer will only install files to the /system directory.
Pull /system/framework/framework-res.apk and /system/app/SystemUI.apk from your device using either adb or root explorer.
Download this pre-scripted zip and extract it to a folder of your choosing.
Place your original framework-res and systemui in their repective folders (framework;app).
Next zip the system and META-INF folders at the root of the extracted folder and be sure to choose a compression of "store" or "none".
Copy the new zip to your SD and try to flash it. Just to make sure it works.
File Structure of the New Zip should be:
Code:
META-INF
-(unchanged contents)
system
-app
--systemui.apk
-framework
--framework-res.apk
If it doesn't flash the most common mistake would be not choosing "store" or "none" for compression.
Once you've got your back-up working you can begin theming.
Basic Theming:
These are my steps. They may seem backwards to some but I can get a quality port out in under an hour this way.
Getting the needed files.
Find a hdpi theme of your choosing.
Using winRAR extract the themes framework-res.apk and systemui.apk (if present).
Extract each apk to its own folder.
You should now have all the icons you should need inside each drawable-hdpi folder you just extracted, one for framework-res and one for systemui.
Have a look through the drawable-hdpi folders. These are the only two folders you'll need so you can delete the others if you wish.
Prepping.
Extract your back-up Zip to a new folder and name that folder after the theme you are working on.
First open framwork-res.apk with winrar.
Navigate to /res/drawable-hdpi
Copying Images.
You'll want to set both your winRAR window and the themes drawable folder side by side.
Next overwrite the icons/images in winRAR with the icons/images in the themes folder. Make sure to only choose the icons/images that are in the /res/drawable-hdpi winRAR. Dont just drag them all in, this will undoubtly leave you with unused icons that will bloat your framework.
Once youve copied over all the images you need, overwriting the originals.
Close the archive (winRAR).
Do the same for systemui.apk, only choosing the needed files.
Tips: If porting a CM7 theme a lot of file renaming will be required. First, sort all the files based on their prefixes (eg. framework-res_; com_android_systemui_; etc). Then, use all file renamer to easily delete XX characters from the left side. You'll need to have a look at what I mean to really get it.
Tips: Some themes lack a systemui.apk but will instead have the images needed for systemui.apk inside their framework-res.apk.
Tips: If a theme doesnt have enough battery icons you will have to make more to suit your framework-res. Do this by spanning the gaps with copies. For instance, if there are only 20 icons and you need 100, make 5 copies of each and name appropriately. This is the biggest pain about a 1% battery.
Once you've overwriten all the images in framework-res and sytemui go ahead and zip up your package following the same steps as the backup, naming the zip appropriately. Don't forget the "store" or "none" compression.
Now try to flash it. If it works it most likely won't be perfect, this is a first draft.
If it doesn't work, again check your compression and zip file structure.
Now take notes of things that are wrong or need fixing, text colors particularly. We will fix them in the next steps.
Editing the status bar.
Now that you can see what needs fixing in the status bar we will decompile your original (backup) systemui.apk and edit the xmls. I will assume you have apkmanager and know how to use it. There are other guides for that so I won't go to deep into it. Look here for a video tutorial on apkmanager.
Decompile systemui.apk
Make edits to XMLs.
These are the edits I make most often.
/res/layout/status_bar.xml -
Code:
<TextView android:textSize="16.0sp" android:textStyle="bold" android:gravity="left|center" android:id="@id/onsText" android:paddingLeft="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="[COLOR="Red"]0[/COLOR]" /> [COLOR="red"]///HIDES CARRIER TEXT[/COLOR]
Click to expand...
Click to collapse
/res/layout/status_bar_expanded.xml -
Code:
<com.android.systemui.statusbar.DateView android:textAppearance="?android:textAppearanceLarge" android:textColor="[COLOR="Red"]#ffffffff[/COLOR]" android:layout_gravity="center_vertical" android:id="@id/dateLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" /> [COLOR="red"]///DATE TEXT COLOR[/COLOR]
Click to expand...
Click to collapse
/res/values/drawable.xml -
Code:
<item type="drawable" name="shade_bgcolor">[COLOR="Red"]#ff162939[/COLOR]</item> [COLOR="red"]///NOTIFICATION TITLE BACKGROUND (eg. Ongoing)[/COLOR]
Click to expand...
Click to collapse
/res/values/style.xml -
Code:
<style name="TextAppearance.StatusBar.Title" parent="@android:style/TextAppearance.StatusBar">
<item name="android:textAppearance">?android:textAppearanceSmall</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///NOTIFICATION TITLE TEXT (eg. No Notifications)[/COLOR]
</style>
Click to expand...
Click to collapse
After making your xml edits recompile, be sure to delete the edited files and resources.arsc from the keep folder during recompiling. If you don't you won't see any changes.
If you compiled with no errors you're good to go. If you have errors then you have a mistake in your code. You can check the apkmanager log for line number errors.
Once recompiled you will have unsignedSystemUI.apk in your place_here_for_modding folder. Open it in winRAR along with your previous version of SystemUI.apk from the first draft and drag the images from the first draft drawable-hdpi folder into the new unsignedSysemUI.apk's corresponding folder, overwriting the images there. Now rename unsignedSystemUI.apk to SystemUI.apk and overwrite your first draft version. This is your second draft SystemUI.apk and we will create a second draft framework-res.apk in the next step using these same steps.
Editing the framework.
We will now decompile your original (backup) framework-res.apk and edit the xmls. Again using apkmanager.
Decompile systemui.apk
Make edits to XMLs.
These are the edits I make most often.
/res/drawable/progress_horizontal.xml - sliders & volume bars
Code:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@id/background">
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#ff262223" android:endColor="#ff414042" android:angle="270.0" android:centerY="0.13" android:centerColor="#ff262223" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</item>
<item android:id="@id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#80[COLOR="red"]547f8c[/COLOR]" android:endColor="#a0[COLOR="red"]87cce2[/COLOR]" android:angle="-90.0" android:centerY="0.13" android:centerColor="#80[COLOR="red"]547f8c[/COLOR]" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</clip>
</item>
<item android:id="@id/progress">
<clip>
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#ff[COLOR="red"]547f8c[/COLOR]" android:endColor="#ff[COLOR="red"]87cce2[/COLOR]" android:angle="-90.0" android:centerY="0.13" android:centerColor="#ff[COLOR="Red"]547f8c[/COLOR]" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</clip>
</item>
</layer-list>
Click to expand...
Click to collapse
/res/values/styles.xml - text colors
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">[COLOR="red"]#ff555555[/COLOR]</item> [COLOR="red"]///POP UP MENU TEXT COLOR[/COLOR]
</style>
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="textColor">[COLOR="red"]#ff555555[/COLOR]</item> [COLOR="red"]///SECONDARY MENU TEXT COLOR[/COLOR]
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
[COLOR="red"]///DELETED LINE[/COLOR]
</style>
Code:
<style name="TextAppearance.WindowTitle" parent="@style/TextAppearance">
<item name="textSize">14.0sp</item>
<item name="textStyle">bold</item>
<item name="textColor">[COLOR="Red"]#ffffffff[/COLOR]</item> [COLOR="red"]///WINDOW TITLE TEXT (App Title Bar)[/COLOR]
</style>
Code:
<style name="TextAppearance.StatusBar.Title" parent="@style/TextAppearance.StatusBar">
<item name="textStyle">bold</item>
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///STATUS BAR TITLE (May be same as SystemUI?)[/COLOR]
</style>
Code:
<style name="TextAppearance.StatusBar.EventContent.Title" parent="@style/TextAppearance.StatusBar.EventContent">
<item name="textSize">16.0sp</item>
<item name="textStyle">bold</item>
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///FIRST LINE OF NOTIFICATION[/COLOR]
</style>
Code:
<style name="TextAppearance.StatusBar.EventContent" parent="@style/TextAppearance.StatusBar">
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///2ND LINE OF NOTIFICATION[/COLOR]
</style>
Code:
<style name="Widget.Button" parent="@style/Widget">
<item name="textAppearance">?textAppearanceSmallInverse</item>
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///BUTTON TEXT COLOR[/COLOR]
<item name="gravity">center</item>
<item name="background">@drawable/btn_default</item>
<item name="focusable">true</item>
<item name="clickable">true</item>
</style>
Click to expand...
Click to collapse
After making your xml edits recompile, be sure to delete the edited files and resources.arsc from the keep folder during recompiling. If you don't you won't see any changes.
If you compiled with no errors you're good to go. If you have errors then you have a mistake in your code. You can check the apkmanager log for line number errors.
Now following the same steps as we did for SystemUI we will overwrite the images in the new unsignedframework-res.apk with those from the first draft framework-res.apk. By dragging from one winRAR window to the other. Once you've done that rename the new apk and overwrite the first draft version. Create a new update zip, using "store" or "none", and flash it. You should now see the text edits you just made.
Advanced Tips
.9 Images.
--If a .9.png is all (every pixel) one color then the .9 patch does not matter.
Hex editing.
--It is not always necessary to decompile to make text color or slider edits. Instead if know what color you're looking for you can use a hex editor to make the edits.
--For instance, to change text colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract resources.arsc
Open resources.arsc in a hex editor.
Search for the color in this format BB GG RR AA, as opposed to usual aarrggbb. (Red = ffff0000 = 00 00 FF FF)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
--To change slider colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract /res/drawable/progress_horizontal.xml
Open progress_horizontal.xml in a hex editor.
Search for 08 00 00 1C.
After each instance examine the next four pairs.
The first few will be grey but eventually youll come to a color.
That's where you start editing. (6 total)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
Undoing Moto's Status Bar Edits.
Post #15
Adding an Animated PullDown Shade.
[RESOURCES] - Theming the Atrix 4G: tools, processes, locations, etc.
Spot on work! Thanks a lot! I am planning to see if I can make a clean minimalistic theme once I can figure out how to do theming correctly
Motorola Atrix 2.3.4 bl unlocked full debian weptop and themed
Small donation on it's way to you for all your hard work!
Confirmation number: 3W612387P3801853H.
Awesome work! Hopefully I will get some time to understand this and port a theme or two
Nottach said:
Advanced Tips
.9 Images.
--If a .9.png is all (every pixel) one color then the .9 patch does not matter.
Hex editing.
--It is not always necessary to decompile to make text color or slider edits. Instead if know what color you're looking for you can use a hex editor to make the edits.
--For instance, to change text colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract resources.arsc
Open resources.arsc in a hex editor.
Search for the color in this format BB GG RR AA, as opposed to usual aarrggbb. (Red = ffff0000 = 00 00 FF FF)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
--To change slider colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract /res/drawable/progress_horizontal.xml
Open progress_horizontal.xml in a hex editor.
Search for 08 00 00 1C.
After each instance examine the next four pairs.
The first few will be grey but eventually youll come to a color.
That's where you start editing. (6 total)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
Click to expand...
Click to collapse
Can i ask you a question seeing though you know abit about framework modding can you see were i have gone wrong here - http://forum.xda-developers.com/showthread.php?t=1195549
I can live with it but i would rather change it to a light gray or a different color? Or if not how would i be able to change the text in these pop up windows so i can see them properly? Any help would be very nice & not had a reply about this yet? Can you help? you can private message me if you would prefer
Thanks in advance
Png sizes
Okay do the PNG/.9.png from the ported theme have to be the same size as the ones in the Atrix drawable-hdpi?
Thanks a lot on the tutorial it helped me figure out how to edit the XMl files.
D$G said:
Okay do the PNG/.9.png from the ported theme have to be the same size as the ones in the Atrix drawable-hdpi?
Thanks a lot on the tutorial it helped me figure out how to edit the XMl files.
Click to expand...
Click to collapse
Not necessarily. As long as the .9 patch is ok then it should work. though it may look weird if theres a themed background. such as a aosp buuton on motoblur background. trial and error is your best bet there.
I'm guessing that this is a generic tutorial for most, if not all android devices?
XCellPhoneSalesRep said:
I'm guessing that this is a generic tutorial for most, if not all android devices?
Click to expand...
Click to collapse
You are correct.
If I change some icons in other .apks like the blur-res.apk, will the updater script you posted include that when it updates?
redz22 said:
If I change some icons in other .apks like the blur-res.apk, will the updater script you posted include that when it updates?
Click to expand...
Click to collapse
Yes, those are in the /system directory so it will work. Just make sure to put them in the right folder (framework). That disclaimer is more for those editing something in /data.
How to "undo" MotoBlurs Status Bar
As many of you themers out there have mostly likely noticed, Moto has screwed with the Status Bar layout in GingerBread which makes theming difficult. I will show you how to revert to the way it was in Froyo.
I will show you you how to perform these edits:
Change the Date Background back to status_bar_header_background.
Change the Title Background back to title_bar_portrait.
{
"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"
}
1. Decompile SystemUI.apk
2. Open /res/layout/status_bar_expanded.xml
---First we'll change the Date Background.
---Out of the box it calls the drawable title_bar_portrait. In Froyo its called status_bar_header_background. So in order to go back to that we will change:
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">
---to:
Code:
<LinearLayout android:orientation="horizontal" [COLOR=Red]android:background="@drawable/status_bar_header_background"[/COLOR] android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
Click to expand...
Click to collapse
---And add your status_bar_header_background png to drawables-hdpi. It can be either .png or .9.png. If it's a .9.png make sure it's in decompiled form, with the 1 pixel border, or else you will get an error during recompiling.
Click to expand...
Click to collapse
---Next we'll have the title background use the existing title_bar_portrait image instead of the shade_bgcolor.
---So we change:
Code:
<com.android.systemui.statusbar.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/noNotificationsTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/ongoingTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_ongoing_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/ongoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/priorityTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_priority_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/priorityItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/latestTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_latest_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.NotificationLinearLayout>
---To:
Code:
<com.android.systemui.statusbar.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/noNotificationsTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/ongoingTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_ongoing_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/ongoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/priorityTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_priority_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/priorityItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/latestTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_latest_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.NotificationLinearLayout>
Click to expand...
Click to collapse
---No need to add an image as it already exists.
Click to expand...
Click to collapse
3. Compile SystemUI.apk, be sure to delete the old status_bar_expanded.xml from the keep folder.
4. Done.
Hi,
Very cool to see someone documenting what they are doing! Keep up the good work.
Cheers!
I've been waiting for this! Love you so much...in brotherly way
I came into this android world with guns.blazing. a fresh newb and learnt to flash/root/oc etc. At one point I had stayed up 4 days in a row (using a different,but similar guide) trying to tweak a theme. Hell I was only trying to change the battery icon! I never got it,till this day. In gonna give it another shot (havent tried in months) using this guide. If finally get it,ill post a very detailed step by step video on youtube. One question though,when adding the icon I want to the framework folder,do I delete the one already there,or just let it overwrite? Thats one thing I never understood fully
Sent from my MB860 using XDA Premium App
brd912 said:
I came into this android world with guns.blazing. a fresh newb and learnt to flash/root/oc etc. At one point I had stayed up 4 days in a row (using a different,but similar guide) trying to tweak a theme. Hell I was only trying to change the battery icon! I never got it,till this day. In gonna give it another shot (havent tried in months) using this guide. If finally get it,ill post a very detailed step by step video on youtube. One question though,when adding the icon I want to the framework folder,do I delete the one already there,or just let it overwrite? Thats one thing I never understood fully
Sent from my MB860 using XDA Premium App
Click to expand...
Click to collapse
Im thinking you mean in the decompiled projects folder. you overwrite the image in that folder but during recompiling when given the prompt, you delete the old one from the keep folder. if you delete it from keep it will replace it with the one from the project.
When I decompile systemui.apk, it gave me 'an error occured'. Is it normal?
Hello all
As stated in the title I would like to know where exactly the default homescreen wallpaper image is stored on the ICS file system?
I am using version 4.0.3
Say for example I have a friend with a cool background wallpaper and that I want a copy of it.
Where exactly would I look in the android file system on his phone to get a copy of it?
Note: I do not want to download an app which manages my wallpaper images I want to find out how it works on ICS so that I can manage it myself.
I googled a bit and found the tutorial below at the end of this email.
It would appear that (on Gingerbread) wallpaper is managed by framework-res.apk
When I looked however at the different png files in "framework-res/res/drawable-hdpi" on my ICS installation I nothing what so ever that looks like my current home screen.
Another thread suggests the the wallpaper is stored under the system/media
On ICS I have 4 folders at that level
alarms
notifications
ringtones
ui
On ICS there are no images in any of these folders. The above was most likely true for Gingerbread but not ICS.
Is wallpaper managed by the launcher or by ICS itself?
Am I the only one who had this problem on ICS?
Can any one please help or provide a few clues?
# tutorial start
One of the most interesting leads I found is the tutorial below
http://forum.xda-developers.com/showthread.php?t=1057132&page=2
Difficulty level: Medium
1. Decompile framework-res.apk
2. Navigate to res/values and open styles.xml
3. Locate <style name="Theme">
4. Replace
<item name="colorBackground">@color/background_dark</item>
with
<item name="colorBackground">@color/transparent</item>
5. Replace
<item name="windowBackground">@drawable/screen_background_dark</item>
with
<item name="windowBackground">@drawable/mybackground</item>
6. Locate <style name="Theme.Black" parent="@style/Theme">
7. Replace
<item name="colorBackground">@color/black</item>
with
<item name="colorBackground">@color/transparent</item>
8. Replace
<item name="windowBackground">@color/black</item>
with
<item name="windowBackground">@drawable/mybackground</item>
9. Create a 480x800 png to your liking, name it mybackground.png and place it in drawable-hdpi folder
9. Recompile framework-res.apk
# tutorial end
TIA
@+
On your pc or in root explorer unzip the rom
then system\app\TwWallpaperChooser\res\drawable-hdpi
Unzip as you go..
stock wallpapers are in drawable-hdpi
Hope this helps
Ok, so we have a couple of threads in the Atrix Forums, that have helped us themers along, and with the custom Roms coming along for the Prime, I have started to see a need for this type of thread here.
The goal of this thread is to have a place for us to discus themeing questions, locations, problems, etc.; that way we are not cluttering up the individual theme or rom threads with questions or problems.
As we are unable to let successively recompile the stock Asus TF201 SystemUI.apk, this thread is primarily intended for custom roms like AOKP, CM9, etc.
If you are looking to theme your stock SyetemUI, you can simply copy the apk to your computer, open the .apk file with a zip program (like Winrar) pull out the following folder: /res/drawable-mdpi
Look through the folder, find .png files that you would like to replace, and then add your new .png files to the .apk (using Winrar or other) in the same location the original one is at. ---> Read the following rules first! <---
- Make sure to select "store" for the compression method, when replacing/adding the .png files.
- The new .png file you are using should roughly be the same dimensions as the original you are replacing.
- Leave .9.png files alone. .9.png files have to be decompiled/recompiled for them to work properly. Since, you can not successfully recompile the stock Asus systemui.apk, you can not replace .9.pngs!!!!
All that being said, lets move on to the Roms we can actually theme...
Below, I have quoted the OP from two Atrix threads that have always helped me.
*Note: These locations are for Gingerbread, however, there is some continuity between Gingerbread & ICS; although it seems a lot of the stuff that was in the framework-res for Gingerbread, it now in the systemui for ICS.
Also, if you change something in a xml file and it doesn't change, you may want to see if the same xml line is in the same file & folder in both the framework-res & systemui, and change both.
Things you should know before you get started:
- If you are replacing a 9.png or editing a xml, you will have to deompile your apk, edit, and then recompile it.
- Recompiling the camera.apk seems to break the camcorder function, and will result in a FC.
Besides the Post Below this one, here is another up-to-date guide on using APK Tools, specifically for ICS:
http://forum.xda-developers.com/showthread.php?t=1511752
Use this web page to get your custom Hex Colors:
http://www.colorpicker.com/
Main XDA General Theme Thread (get more exposure/help for your question):
http://forum.xda-developers.com/showthread.php?t=468254
***If you have any other helpful guides, webpages, etc. that you think will help us, post them, and I'll add them to the OP.***
(This quote is from: http://forum.xda-developers.com/showthread.php?t=1060199 and thanks should go to that OP).
jimbush3 said:
I know that there are a good number of Atrix users who are new to android, new to theming with android, or like me - both. It can take hours to find the right information to make the changes that you want to make, only to find out that those types of changes are phone specific and that guide that you finally found after hours of searching doesn't even apply. I ask that all Atrix themers contribute to this thread with their knowledge, processes, and best practices for theming the Atrix. This way, we can share knowledge amongst each other as well as set up some accurate guide for other Atrix themers just getting started.
Contents:
Post 1 of this thread:
apk Manager Guide
Framework Assistant - tool to push/pull framework-res.apk
Editing OR removing the status bar clock color in services.jar
Post 2 of this thread:
Setting the notification dropdown shade to transparent
I'll start off with a post that I made yesterday in response to someone's question about apk Manager.
1. apk Manager Atrix Guide
The file I am going to discuss here is /system/framework/framework-res.apk. This file contains most of the elements involved in theming your phone. There are many other smaller locations to edit, but this file contains the bulk.
Before we get started on using apk Manager, we should understand a few things about framework-res apk. This file consists of a few important elements:
regular png image files - these are standard png images and can be edited with your image editing program and saved without any problems.
draw-9 png image files - these are special types of png images denoted by a .9.png in the filename. The android system reads these filenames and recognizes the image as a stretchable image. The system knows how to stretch the image based on a 1px wide border that the image has. This border contains black dots/lines along each of the four edges that tell the system how to stretch it - if you mess with this border then the way the image stretches will changes and you may not be able to decompile/recompile the apk. The following link provides info on editing draw-9s, but I found it easiest to extract them with apk Manager, edit in gimp without touching the border, and then recompiling with apk M. More info on draw-9 pngs
xml files - these files are in binary code in the framework-res.apk. The apk needs to be decompiled in order to return these to human readable code. Also, many of your xml files are hidden within the resources.arsc file in the framework-res.apk and cannot be accessed unless you decompile.
In order to make any changes to the xml files or the draw-9 pngs within framework-res.apk you need to decompile it rather than extract it. Extracting the framework-res.apk with a program like winzip simply unzips the file and does not break the code back down to an editable format. Decompiling the framework-res.apk with a program like apk Manager will actually break down the resources.arsc file into the sepereate xmls folders (values, etc.) and also restore the instructions border to draw-9 pngs.
Draw-9 images not edited correctly will not stretch properly in the system and may cause decompilation/recompilation errors. XML files not edited correctly may also cause recompilation errors. It is very important to pay attention to the log.txt file for any errors that may be occurring during your decompilation/recompilation process.
Download apk Manager
Now here is what I've learned about apk Manager:
put framework-res.apk in the place-apk-here-for-modding folder
run the script
enter 22 to select an apk, then 1 to select your apk
press 9 to decompile the apk
go into the projects/framework-res.apk/res/drawable-hdpi folder and edit your pngs or xmls (maintain the border)
go back to the script once your done editing and enter 11 to compile
when asked if it is a system apk enter y
when asked if you want to extract other files too enter y Do not skip this step, apk Manager will seem to produce a working framework-res.apk if you skip this step but when I did it soft bricked my phone
go into the keep folder that was created and delete any pngs that you changed in the projects folder
if you change any xml files, you will also need to delete the resources.arsc file from the keep folder (this is because mane of the xml files are compiled into this resources.arsc, so to tell apk manager to rebuild it with the new xml, we need to delete the original)
go back to the script and press any key to continue
your recompiled framework-res will be in the place-apk-here-for-modding as unsigned-framework-res.apk
extract unsigned-framework-res.apk using winzip, or similar program (this is being it is compressed incorrectly)
go into the folder where you just unzipped the framework and zip it up with the compression mode set to Store - call it framework-res.apk
you are ready to go with a properly editing framework-res.apk, put it on your phone any way you like
Make sure that you have no errors when de-compiling or re-compiling. It might seem like everything is going ok, but you could end up soft bricking your phone if you don't check the log.txt in the apk Manager main folder. Check the log.txt after every decompile and recompile to ensure that you don't have a damaged framework-res.apk.
The output in log.txt should like like this for a proper decompile:
Code:
--------------------------------------------------------------------------
|Sun 05/01/2011 -- 20:11:47.57|
--------------------------------------------------------------------------
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
Could Not Find C:\Users\jbush\Documents\Custom Atrix\Programs\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
I: Loading resource table...
I: Decoding resources...
I: Copying assets and libs...
And like this for a proper recompile:
Code:
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
(skipping index file 'C:\Users\jbush\Documents\Custom Atrix\Programs\apk_manager_4.9\other\..\projects\framework-res.apk\assets\images\Thumbs.db')
(skipping index file 'C:\Users\jbush\Documents\Custom Atrix\Programs\apk_manager_4.9\other\..\projects\framework-res.apk\assets\webkit\Thumbs.db')
The system cannot find the file specified.
If you get any errors about your images or xml then you need to fix them before you can recompile.
#framework-assistant2. Framework-res.apk Assistant
Here is a tool which I use regularly to pull the current framework-res.apk from my phone, as well as to push any updated framework-res.apk to my phone. To use this batch program you need to:
Download the View attachment 584667
Extract the zip to whereever you want the program to reside
To pull your current framework-res.apk - run the Framework-Assistant.bat and tell it to pull
To push an updated framework-res.apk - place the updated framework-res.apk in the bin/push folder, run the Framework-Assistant.bat and tell it to push the updated framework-res.apk
It is always a good idea to tell it to back up the current before pushing a new
As with any and all framework-res.apk pushes, this has the ability to soft brick your phone depending on the framework-res.apk you push, or anything else for that matter. Use at your own risk.
Here are my steps to edit framework-res.apk from start to finish which might help those unfamiliar with the process:
Run Framework-Assistant.bat and answer y to pull the current framework-res.apk from the phone, but n to push the latest version (this will simply retrieve the current framework-res.apk from your phone)
Copy that framework-res.apk from the Framework Assistant/bin/pull fodler into the place-apk-here-for-modding folder of apk Manager
rename framework-res.apk to something distinguishable, I add the current time (ex: framework-res-1016.apk). Trust me, things can get messy if you end up making a few passes with different edits, you need to keep your stuff straight.
Run Script.bat in the apk Manager folder, 22 to select which apk to use, then 9 to decompile
Go into the projects/framework-res-1016.apk folder and make any changes you wish. Most png changes will be in drawable-hdpi, xmls are pimarily located in the values and layout folders.
Once I've finished making updates, run Script.bat again, 22 to select the proper apk, then compile with 11 - follow all compilation steps above all the way through zipping it as store.
Place the new framework-res.apk in the Framework Assistant/bin/push folder and run Framework-Assistant.bat
Choose y to both pull and push the framework-res.apk (I find its always a good idea to pull your latest working framework-res.apk from the phone before dropping a new one in)
If you anticipate more edits, go back to apk Manager and paste the new framework-res.apk in the place-apk-here-for-modding fodler of apk Manager and rename it with the current time attached (ex: framework-res-1023.apk)
Delete the unsignedframework-res-1016.apk and the unsignedframework-res.apk fodler (just to keep things clean)
You now have an edited framework-res.apk on your phone and are set to fix this little issues you missed on this pass, just run the apk Manager Script.bat again, enter 22 to access your latest framework-res.apk (framework-res-1023.apk) and repeat the process.
#framework-assistant3. Editing OR removing the status bar clock in services.jar
You will need:
Some zip program, I use winrar
JDK - Java Development Kit Get the JDK
baksmali to decompile and recompile the classes.dex file - View attachment 587999
Notepad++ free editor for code editing (I recommend this program for any/all code editing, apart from hex)
Here is how to change the status bar clock color:
Install the JDK
Extract baksmali to your computer
Retrieve services.jar from the /system/framework folder
Extract services.jar using your zip program (right click on the file and choose to extract)
One of the extracted files is classes.dex, copy it into the baksmali folder
Run decompile.bat in the baksmali folder - this will decompile classes.dex and place the contents in a new folder called classout
Navigate to classout\com\android\server\status
The next step involves changing clock color:
open StatusBarIcon.smali with Notepadd++ and find this entry
Code:
.line 61
const v6, -0x1
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V
const v6, -0x1 identifies the color of the status bar clock. I changed this value to "const v6, -0xff000000 to set my clock to black. Essentially the last 6 digits of this entry will determine the color of the clock. Set the last six to any html color code (google it) to set your clock color. I have only tried black here as it is all I needed, so I can't personally guarantee that anything else will work.
The next step involves removing the clock:
open StatusBarPolicy.smali with Notepadd++ and find this entry
Code:
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V
It should be under ".line 592", now add this line underneath the line just mentioned:
Code:
invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
Once your done editing, save the file
Navigate back to the baksmali folder and run recompile.bat - this will rename the original classes.dex file to orig-classes.dex, and the recompiled file is saved as classes.dex
Zip up the new classes.dex along with the META-INF folder that was extracted from services.jar as, you guessed it, services.jar Leave the compression setting on Normal
Put services.jar back in your system/framework folder
This is all that I know how to do with servies.jar right now, if anyone has some additional good info please post it to this thread and I will add it on.
Can't believe I forgot to thank all those who have contributed both directly and indirectly to my knowledge thus far: Nottach, NyugenHuu, KennethPenn, riral, tonecreationz, gera4eva, HFHimself, and many random threads I found on the wonderful xda forums.
Click to expand...
Click to collapse
(This quote is from: http://forum.xda-developers.com/newreply.php?do=newreply&p=16008460 and thanks should go to that OP).
*Again, these are from Gingerbread, but may be in the same xml/location as ICS (haven't checked them all yet).
Nottach said:
Editing the status bar.
Now that you can see what needs fixing in the status bar we will decompile your original (backup) systemui.apk and edit the xmls. I will assume you have apkmanager and know how to use it. There are other guides for that so I won't go to deep into it. Look here for a video tutorial on apkmanager.
1. Decompile systemui.apk
2. Make edits to XMLs.
These are the edits I make most often.
/res/layout/status_bar.xml -
Code:
<TextView android:textSize="16.0sp" android:textStyle="bold" android:gravity="left|center" android:id="@id/onsText" android:paddingLeft="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="0" /> ///HIDES CARRIER TEXT
/res/layout/status_bar_expanded.xml -
Code:
<com.android.systemui.statusbar.DateView android:textAppearance="?android:textAppearanceLarge" android:textColor="[color="Red"]#ffffffff[/color]" android:layout_gravity="center_vertical" android:id="@id/dateLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" /> [color="red"]///DATE TEXT COLOR[/color]
/res/values/drawable.xml -
Code:
<item type="drawable" name="shade_bgcolor">[color="Red"]#ff162939[/color]</item> [color="red"]///NOTIFICATION TITLE BACKGROUND (eg. Ongoing)[/color]
/res/values/style.xml -
Code:
<style name="TextAppearance.StatusBar.Title" parent="@android:style/TextAppearance.StatusBar">
<item name="android:textAppearance">?android:textAppearanceSmall</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">[color="red"]#ffffffff[/color]</item> [color="red"]///NOTIFICATION TITLE TEXT (eg. No Notifications)[/color]
After making your xml edits recompile, be sure to delete the edited files and resources.arsc from the keep folder during recompiling. If you don't you won't see any changes.
If you compiled with no errors you're good to go. If you have errors then you have a mistake in your code. You can check the apkmanager log for line number errors.
Once recompiled you will have unsignedSystemUI.apk in your place_here_for_modding folder. Open it in winRAR along with your previous version of SystemUI.apk from the first draft and drag the images from the first draft drawable-hdpi folder into the new unsignedSysemUI.apk's corresponding folder, overwriting the images there. Now rename unsignedSystemUI.apk to SystemUI.apk and overwrite your first draft version. This is your second draft SystemUI.apk and we will create a second draft framework-res.apk in the next step using these same steps.
Click to expand...
Click to collapse
Nottach said:
Editing the framework.
We will now decompile your original (backup) framework-res.apk and edit the xmls. Again using apkmanager.
1. Decompile systemui.apk
2. Make edits to XMLs.
These are the edits I make most often.
/res/drawable/progress_horizontal.xml -
Code:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@id/background">
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#ff262223" android:endColor="#ff414042" android:angle="270.0" android:centerY="0.13" android:centerColor="#ff262223" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</item>
<item android:id="@id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#80[color="red"]547f8c[/color]" android:endColor="#a0[color="red"]87cce2[/color]" android:angle="-90.0" android:centerY="0.13" android:centerColor="#80[color="red"]547f8c[/color]" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</clip>
</item>
<item android:id="@id/progress">
<clip>
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#ff[color="red"]547f8c[/color]" android:endColor="#ff[color="red"]87cce2[/color]" android:angle="-90.0" android:centerY="0.13" android:centerColor="#ff[color="Red"]547f8c[/color]" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</clip>
</item>
</layer-list>
/res/values/styles.xml - text colors
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">[color="red"]#ff555555[/color]</item> [color="red"]///POP UP MENU TEXT COLOR[/color]
</style>
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="textColor">[color="red"]#ff555555[/color]</item> [color="red"]///SECONDARY MENU TEXT COLOR[/color]
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
[color="red"]///DELETED LINE[/color]
</style>
Code:
<style name="TextAppearance.WindowTitle" parent="@style/TextAppearance">
<item name="textSize">14.0sp</item>
<item name="textStyle">bold</item>
<item name="textColor">[color="Red">#ffffffff[/color]</item> [color="red"]///WINDOW TITLE TEXT (App Title Bar)[/color]
</style>
Code:
<style name="TextAppearance.StatusBar.Title" parent="@style/TextAppearance.StatusBar">
<item name="textStyle">bold</item>
<item name="textColor">[color="red"]#ffffffff[/color]</item> [color="red"]///STATUS BAR TITLE (May be same as SystemUI?)[/color]
</style>
Code:
<style name="TextAppearance.StatusBar.EventContent.Title" parent="@style/TextAppearance.StatusBar.EventContent">
<item name="textSize">16.0sp</item>
<item name="textStyle">bold</item>
<item name="textColor">[color="red"]#ffffffff[/color]</item> [color="red"]///FIRST LINE OF NOTIFICATION[/color]
</style>
Code:
<style name="TextAppearance.StatusBar.EventContent" parent="@style/TextAppearance.StatusBar">
<item name="textColor">[color="red"]#ffffffff[/color]</item> [color="red"]///2ND LINE OF NOTIFICATION[/color]
</style>
Code:
<style name="Widget.Button" parent="@style/Widget">
<item name="textAppearance">?textAppearanceSmallInverse</item>
<item name="textColor">[color="red"]#ffffffff[/color]</item> [color="red"]///BUTTON TEXT COLOR[/color]
<item name="gravity">center</item>
<item name="background">@drawable/btn_default</item>
<item name="focusable">true</item>
<item name="clickable">true</item>
</style>
After making your xml edits recompile, be sure to delete the edited files and resources.arsc from the keep folder during recompiling. If you don't you won't see any changes.
If you compiled with no errors you're good to go. If you have errors then you have a mistake in your code. You can check the apkmanager log for line number errors.
Now following the same steps as we did for SystemUI we will overwrite the images in the new unsignedframework-res.apk with those from the first draft framework-res.apk. By dragging from one winRAR window to the other. Once you've done that rename the new apk and overwrite the first draft version. Create a new update zip, using "store" or "none" and flash it. You should now see the text edits you just made.
Click to expand...
Click to collapse
Nottach said:
Advanced Tips
.9 Images.
--If a .9.png is all (every pixel) one color then the .9 patch does not matter.
Hex editing.
--It is not always necessary to decompile to make text color or slider edits. Instead if know what color you're looking for you can use a hex editor to make the edits.
--For instance, to change text colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract resources.arsc
Open resources.arsc in a hex editor.
Search for the color in this format BB GG RR AA, as opposed to usual aarrggbb. (Red = ffff0000 = 00 00 FF FF)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
--To change slider colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract /res/drawable/progress_horizontal.xml
Open progress_horizontal.xml in a hex editor.
Search for 08 00 00 1C.
After each instance examine the next four pairs.
The first few will be grey but eventually youll come to a color.
That's where you start editing. (6 total)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
Click to expand...
Click to collapse
Reserved!!
Awesome. Thanks!
Great guides for the noobies Swiftks =) Also i think i might have a work around for the patch9 pngs, Ill msg you on GChat
great stuff, thanks for sharing mate.
Sent from my TF201
Hello all,
Just thought i would drop you all a quick guide i will add to this as much as i can.. Drop me a message if you need anything else.
For Transparent NavBar - Decompile Prism.apk
Once decompiled navigate to \Prism\res\drawable-xxhdpi look for home_nav_bg
Just modify the above image to your liking color, transparency etc
For modified app drawer - 4 x 5 etc - Decompile Prism.apk
Once decompiled navigate to \Prism\res\integers - the below are the modifications you need to make
<integer name="config_allAppsTabbedCellCountX">4</integer>
<integer name="config_allAppsTabbedCellCountY">5</integer>
<integer name="config_allAppsTabbedCellCountXAlt">5</integer>
<integer name="config_allAppsTabbedCellCountYAlt">6</integer>
Once made you need to head over to the arrays XML and change - The below to match the above
<string-array name="apps_grid_option">
<item>4 × 5</item>
<item>5 × 6</item>
</string-array>
Please note modding the app drawer may require you to mod the dimensions in values to have it all fit nicely.
Ill check shortly but i am pretty sure its the below you need to modify for a better fit.
<dimen name="page_view_icon_cell_width">90.0dip</dimen>
<dimen name="page_view_icon_cell_height">97.0dip</dimen>
<dimen name="page_view_icon_cell_width_alt">75.0dip</dimen>
<dimen name="page_view_icon_cell_height_alt">90.0dip</dimen>
Statusbar Mods [Colors/Transparency etc] - Decompile SystemUI.apk
Navigate to \SystemUI\res\layout - Open Status_Bar.xml
Look at Line 2 where it says - android:background="@drawable/status_bar_background"
The Red is what we are going to modify
1. You will find in the drawables folder and image labeled status_bar_background open this and mod this to whatever you wish
2. Alternatively you can also mod this by changing the green text to "#FF000000" This is a Hex color - FF is level of Transparency and 000000 is the Color White
App Drawer / Blink Feed Clock Backgrond - Decompile Prism.apk
Navigate to \Prism\res\drawable-xxhdpi
Change automotive_common_app_bkg_top.png to whatever you wish
Recent Apps Pull Down Background - Decompile SystemUI.apk
To Change the Statusbar Pull-down Shade Background Color/Transparency
• First Decompile SystemUI.apk and navigate to the "res/layouts" and find "status_bar_expanded.xml"
• Next, find where it says android:background="@*android:color/black" and change it to android:background="@color/transparent_black" and save it.
• Now go to "res/values" and open "colors.xml"
• We are going to add a new color to this by adding this <color name="@color/transparent_black">#A5000000</color>
• Save that and recompile and now your pull-down shade is semi-transparent
#00000000 is 100% Transparent.
#40000000 is 75% Transparent.
#80000000 is 50% Transparent.
#B0000000 is 25% Transparent.
#FF000000 is 0% Transparent.
XML QUICK COLOR GUIDE
• When you see a Hex color in xml it will probably look like #FF1A2B3C (I will be explaining this from LEFT to RIGHT following the # sign)
• The First two digits represents the level of Transparency 00 is Transparent and FF is Opaque
• The Second two digits represents the level of RED where 00 is No Red (0) and FF is Full Red (255)
• The Third two digits represents the level of GREEN where 00 is No Green (0) and FF is Full Green (255)
• The Fourth two digits represents the level of BLUE where 00 is No Blue (0) and FF is Full Blue (255)
App Drawer Transparency - Decompile Prism.apk
Next navigate to \Prism\smali\com\htc\launcher
Go to Launcher . Smali and CTRL + F and search for .method public updateWallpaperVisibility(Z)V
Highlight this line and highlight everything below until you see end method. just to clarify we are deleting From .method to .end method
.method public updateWallpaperVisibility(Z)V
.end method
after this CTRL + F and search for updateWallpaperVisibility - remove any line that has this
[We now have to clean the code navigate to the 3 files below - for each CTRL + F and search for updateWallpaperVisibility and remove all lines which include this
Launcher$21.Smali
Launcher$22.Smali
Launcher$25.Smali
Workspace.smali
Now navigate to DragLayer.Smali
CTRL + F and search for const/high16 v2, -0x100, change this line to const/high16 v2, 0x0
Navigate to Prism/smali/com/htc/launcher/pageview
Open AllAppsPagedViewHost.smali - CTRL + F and search for const/high16 v2, -0x100, change this line to const/high16 v2, 0x0
When complete it looks like a small glitch but its a duplication transition animation to make this less glitchy navigate to Values/ Dimens and Modify the below till you achieve your desired results
<integer name="config_appsCustomizeZoomInTime">150</integer>
<integer name="config_appsCustomizeZoomOutTime">100</integer>
<integer name="config_appsCustomizeZoomInScaleFactor">200</integer>
<integer name="config_appsCustomizeZoomOutScaleFactor">133</integer>
<integer name="config_appsCustomizeFadeInTime">100</integer>
<integer name="config_appsCustomizeFadeOutTime">150</integer>
App Drawer / Blink Feed Background - Decompile Prism.apk
First of all to add backgrounds to either of these we need to achieve transparency (see guide below) App Drawer Transparency
Add the below to achieve a background for whatever you wish
res/layouts/feed_view.xml - Blinkfeed
<com.htc.launcher.feeds.view.FeedScrollView - At this line add android:background="@drawable/12345"
res/layout/all_apps_pagedview.xml - App Drawer
<com.htc.launcher.pageview.AllAppsPagedView - At this line add android:background="@drawable/12345"
\Prism\res\values\colors.xml - BlinkFeed Tiles - Change the red color below to your desired Color / Transparency
<color name="feedview_background">#ff33b5e5</color>
12345 - This refers to the name of your Background image - Once the tags have been added add the images to drawable-xxhdpi
#ff33b5e5 - 33b5e refers to the color and the FF refers to transparency, FF = non transparent / 00 = Fully Transparent / 68 = 50% i believe)
Remove App Drawer / Blinkfeed Clock - Decompile Prism.apk
!!!Please note this is a work in Progress!!!
SO FAR:
Navigate to Prism\smali\com\htc\launcher\masthead
Open Masthead.Smali
Remove this whole method - .method private attachToContainer(Landroid/view/ViewGroupV
We need to then navigate to Values Dimens and modify the following for the correct fitting
Remove Carrier Label - Decompile SystemUI.apk
Navigate to \SystemUI\res\layout - Open Status_Bar_Expanded.xml
At line <com.android.systemui.statusbar.phone.CarrierLabel where is says android:visibility="invisible change to "android:visibility="gone"
Center Clock - Decompile SystemUI.apk
Navigate to SystemUI\res\layout - Status_Bar.xml
Step 1. First of all locate and delete this line
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
Step 2. Next locate the following line - Change this to replicate the line below
Code:
Original - <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
New - <LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" >
Step 3. Copy the following above your modified line in Step 2
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="@*android:color/white" android:gravity="center" android:id="@id/clock" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
Step 4. Check it resembles the below
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="@*android:color/white" android:gravity="center" android:id="@id/clock" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" >
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<ViewStub android:id="@id/signal_cluster" android:inflatedId="@id/signal_cluster_tree" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="@*android:color/white" android:gravity="center_vertical" android:id="@id/battery_text" android:paddingLeft="1.0dip" android:paddingRight="1.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
<ImageView android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
Remove Status Bar Icons - Thanks to .torrented
To make statusbar icons disappear you must decompile SystemUI.apk navigate to the "res" folder and then into the "drawable - xxhdpi" folder and there you will see a bunch of png's.
From there locate which statusbar image you wish to make disappear and copy its exact name, change the tranparant png's name to whatever the original name was and replace it with the newly transparent version.
Just replicate this for any statusbar image you wish (delete the old ones are you are done with them)
Recompile SystemUI.apk and replace the one on the device, your statusbar images will now be GONE!
Settings Background - Decompile framework-res.apk
Coming Soon
Hello,
Thank you for this... Could you also add how to achieve a transparent app drawer? I am still using Nos2.03 and not interested in moving to the 4.2.2 version just yet. I see you have a zip already for this.
Cheers
Will post shortly
Sent from my HTC6435LVW using XDA Premium 4 mobile app
xvicedice said:
Will post shortly
Sent from my HTC6435LVW using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Rock on, editing smali leaves no room for error :good:
Updated
Sent from my HTC6435LVW using XDA Premium 4 mobile app
Hi,
Thanks for your guide, could you please try to port the following
http://forum.xda-developers.com/showthread.php?t=2138654
or guide which files to be modded to get the big photo on calling screen.
thanks
:thumbup:
Remove/Edit Some Statusbar Images
this is an xxhdpi resource
To make statusbar icons disappear you must decompile SystemUI.apk navigate to the "res" folder and then into the "drawable - xxhdpi" folder and there you will see a bunch of png's.
From there locate which statusbar image you wish to make disappear and copy its exact name, change the tranparant png's name to whatever the original name was and replace it with the newly transparent version.
Just replicate this for any statusbar image you wish (delete the old ones are you are done with them)
Recompile SystemUI.apk and replace the one on the device, your statusbar images will now be GONE!
Hope this helps anyone!
*** There probably are other ways of doing this but I find this the easiest (aka Quick'n'Dirty), OP is allowed to post this in the OP if he desires
Thank you for the help .torrented (OP updated)
I will update this shortly to show modifications for 4.3 and 4.4
Ashle said:
Please edit me ..... :crying:
Click to expand...
Click to collapse
Please backup first and then push this to the phone, let me know what happens.
https://dl.dropboxusercontent.com/u/67055555/SystemUI.apk
[QUOTxvicedice;49055500]Please backup first and then push this to the phone, let me know what happens.
https://dl.dropboxusercontent.com/u/67055555/SystemUI.apk[/QUOTE]
No ....systemui has stopped
To Change the Statusbar Pull-down Shade Background Color/Transparency
First Decompile SystemUI.apk and navigate to the "res/layouts" and find "status_bar_expanded.xml"
Next, find where it says android:background="@*android:color/black" and change it to android:background="@color/transparent_black" and save it.
Now go to "res/values" and open "colors.xml"
We are going to add a new color to this by adding this <color name="@color/transparent_black">#A5000000</color>
Save that and recompile and now your pull-down shade is semi-transparent
#00000000 is 100% Transparent.
#40000000 is 75% Transparent.
#80000000 is 50% Transparent.
#B0000000 is 25% Transparent.
#FF000000 is 0% Transparent.
XML QUICK COLOR GUIDE
When you see a Hex color in xml it will probably look like #FF1A2B3C (I will be explaining this from LEFT to RIGHT following the # sign)
The First two digits represents the level of Transparency 00 is Transparent and FF is Opaque
The Second two digits represents the level of RED where 00 is No Red (0) and FF is Full Red (255)
The Third two digits represents the level of GREEN where 00 is No Green (0) and FF is Full Green (255)
The Fourth two digits represents the level of BLUE where 00 is No Blue (0) and FF is Full Blue (255)
xvicedice said:
Drop me a message if you need anything else.
Click to expand...
Click to collapse
Thanks, this is all very useful information. Can you by any chance put a guide to which files need altering to change the home screen grid size and spacing in prism.apk?
Many Thanks
Of course I'm away from my pc today but I'll get that up for you tomorrow
Sent from my HTC Droid DNA using XDA Premium 4 mobile app
Hello I'm looking to decompile prism.apk to try and change values to enable me to have more then 4 app in my locksceeen dock and home screen dock. I have a HTC one max so it won't look out of place just hoping someone can help thanks.
Hi if you wish to do this you have to navigate to the values folder and find the integers.xml.
Once you are there look for hotseat_cell_count (think that’s the one) increase the value to what you like should be 5 as standard I think.
Once you increase it though bear in mind things will look squashed so you will need to modify the padding either side, so in the Values folder look for a file called dimens.xml look for 2 lines button_bar_width_left_padding & button_bar_width_right_padding decrease both values on these to suit.
Hope that helps
Jamie