Team Xposed at it again with another mod for all of you. This time it is transparent notification pulldowns. "Sharing is caring."
Step 1: Decompile SystemUI.apk with apktool, apk manager, or baksmali.
Step 2: Navigate to \com\android\systemui\statusbar\StatusBarService.smali
Step 3: Open StatusBarService.smali in Notepad++ or any other qualified text editor.
NOTE: Notepad and Wordpad will not edit the file properly.
Step 4: Search for:
Code:
.local v7, view:Lcom/android/systemui/statusbar/StatusBarView;
Look below at:
Code:
const/4 v1, 0x2
Replace 0x2 with -0x3
Next, search for:
Code:
.line 1797
Directly below, look for:
Code:
const/4 v5, 0x2
Replace 0x2 with -0x3
Step 5: Save and close the file.
Step 6: Navigate to \res\layout\status_bar_tracking.xml
Step 7: Open status_bar_tracking.xml in qualified text editor.
Step 8: Replace the 2 instances of "list_item_background" with "status_bar_background"
Step 9: Look for:
Code:
<LinearLayout android:orientation="horizontal" android:background="#ff000000"
Replace #ff000000 with #00000000
Step 10: Save and close file.
Step 11: Grab the existing status_bar_background.png from \res\drawable-hdpi\status_bar_background.png
Step 12: Edit it with your photo editor of choice and add your transparency.
Step 13: Save the file, and replace status_bar_background.png in \res\drawable-hdpi\status_bar_background.png with the one you just edited.
Step 14: Recompile SystemUI and flash it to your phone from recovery.
End result:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
NOTE: You may notice that the entire thing is transparent, and that the text is black. If this is not to your liking, you can make items appear white (or any other color) by looking at this line:
Code:
<View android:id="@id/tab_header"
This is the second of the lines that you changed to status_bar_background in Step 8. Change that back to list_item_background to get your white item list back while still maintaining a transparent background.
To change text color, look for this line:
Code:
<TextView android:textSize="@com.htc:dimen/list_primary_m" android:textStyle="bold" android:textColor="#ff000000"
Look for #ff000000 and change that to your desired color. The same applies to quicksettings, which is a line below.
Great tutorial. I have one question, how do you get the Notification text from black to white.
I highlighted the exact text I am referring to in the attachment.
scrosler said:
Great tutorial. I have one question, how do you get the Notification text from black to white.
I highlighted the exact text I am referring to in the attachment.
Click to expand...
Click to collapse
NOTE: You may notice that the entire thing is transparent, and that the text is black. If this is not to your liking, you can make items appear white (or any other color) by looking at this line:
Code:
<View android:id="@id/tab_header"
This is the second of the lines that you changed to status_bar_background in Step 8. Change that back to list_item_background to get your white item list back while still maintaining a transparent background.
To change text color, look for this line:
Code:
<TextView android:textSize="@com.htc:dimen/list_primary_m" android:textStyle="bold" android:textColor="#ff000000"
[code]
Look for #ff000000 and change that to your desired color. The same applies to quicksettings, which is a line below.
theimpaler747 said:
NOTE: You may notice that the entire thing is transparent, and that the text is black. If this is not to your liking, you can make items appear white (or any other color) by looking at this line:
Code:
<View android:id="@id/tab_header"
This is the second of the lines that you changed to status_bar_background in Step 8. Change that back to list_item_background to get your white item list back while still maintaining a transparent background.
To change text color, look for this line:
Code:
<TextView android:textSize="@com.htc:dimen/list_primary_m" android:textStyle="bold" android:textColor="#ff000000"
[code]
Look for #ff000000 and change that to your desired color. The same applies to quicksettings, which is a line below.[/QUOTE]
I tried that and its still not white. Could you try it and see if it works?
EDIT: Even took a sys UI that has white text and replaced the entire file and its still not white. Could there be a smali edit or am I just going crazy?
Click to expand...
Click to collapse
scrosler said:
I tried that and its still not white. Could you try it and see if it works?
EDIT: Even took a sys UI that has white text and replaced the entire file and its still not white. Could there be a smali edit or am I just going crazy?
Click to expand...
Click to collapse
Oops.... The text font color is probably located in layout or values folder under ids or public.xml
freeza said:
Oops.... The text font color is probably located in layout or values folder under ids or public.xml
Click to expand...
Click to collapse
Been looking for it all night... lol
I knew that I didn't misread your post! Thanks for confirming that before I went crazy, lol
There are a few changes that need to be made. If you want all transparent background then there are text color edits that need to be made in three or four systemui xmls, download provider.apk and download provider ui .apk. also a text change in framework. This is a good thread. I'll type up something coherent when I get home to add to it.
Sent from my PG86100 using xda premium
for white text color on transparent background
this is just adding to what freeza has already written
decompile systemui. go to res/values/colors
<color name="white">#ffffffff</color>
<color name="black">#ffffffff</color>
<color name="half_white">#7fffffff</color>
<color name="half_black">#7fffffff</color>
<color name="primary_text_color">#ffffffff</color>
<color name="secondary_text_color">#ffffffff</color>
this is what you want
then to res/values/drawables
<item type="drawable" name="notification_header_text_color">#ffffffff</item>
<item type="drawable" name="notification_number_text_color">#ffffffff</item>
<item type="drawable" name="list_item_background">#00000000</item>
<item type="drawable" name="list_item_background_gray">#00000000</item>
this is what you want
go to res/colors/bright_text_dark_focused
make sure all colors are ffffffff
go to res/color/list_item_primary_text and change ff888888 to ffffffff
go to res/color/list_item_secondary_text and change ffb8b8b8 to ffffffff
also cant remember if this was covered but status_bar_item_background_normal.9 needs to be made transparent.
go to res/layout/status_bar
where you see this and it appears twice
android:textAppearance="@android:style/TextAppearance.StatusBar.Icon
change to android:textColor="#ffffffff"
where you see this and it appears twice
android:textAppearance="@android:style/TextAppearance.StatusBar.Ticker"
change to android:textColor="#ffffffff"
also any textcolor in the xml in html should be android:textColor="#ffffffff"
go to status_bar_expanded
make sure all android:textColor= is ffffffff we do not need to change the style
android:textAppearance="@style/TextAppearance.StatusBar.Title"
because we have already referenced this in values/drawables
i status_bar_icon there is one text color reference. make sure it is white
in status_bar_tracking as i believe was mentioned change text color values from ff000000 to ffffffff
decompile framework-res
go to res/layout/status_bar_latest_event_content
change all text color from ff000000 to ffffffff
go to res/drawable-hdpi and make status_bar_item_app_background_normal.9 transparent
do the same with
status_bar_item_background_normal.9
decompile DownloadProvider.apk
go to res/layout/status_bar_ongoing_event_progress_bar
change all ff000000 to ffffffff
decompile DownloadProviderUI.apk
go to res/layout/download_list_item
where you see
android:textAppearance="?android:textAppearanceSmall"
make
android:textAppearance="?android:textAppearanceSmall" android:textColor="#ffffffff"
there are five instances of this. you are adding a text color value after the refernced text appearence. make sure your syntax and spacing are right
go to res/layout/list_group_header
where you see
android:textAppearance="?android:textAppearanceMedium"
add at the end as before
android:textAppearance="?android:textAppearanceMedium" android:textColor="#ffffffff"
that is it
Cool thing about this is you can now easily change the color to blue or cyan or red much more easily. You can open the whole res folder by highlighting res and an xml like the manifest. I use notepad ++. Then under search/ replace look for ffffffff and change with whatever color value you want. BAM instant color change!
example with blue text
fernando sor said:
for white text color on transparent background
Click to expand...
Click to collapse
You sir are the BOMB!
This was what I was looking for. I was changing line by line to see what woudl happen but eventually gave up and modded someone else mod... To get it the way I want.
This is getting save in favorites for next time!
Thanks!
scrosler said:
You sir are the BOMB!
This was what I was looking for. I was changing line by line to see what woudl happen but eventually gave up and modded someone else mod... To get it the way I want.
This is getting save in favorites for next time!
Thanks!
Click to expand...
Click to collapse
thanks ! you can even go further into framework/res/values/styles and com.htc.resources but i found that these changes cover most notifications
Pulled the SystemUI.apk from my phone and when I decompiled with Apktool I receive this.....any ideas what is the problem?
Did you install the framework to decompile with. You need to use the -t (framework) command. Make a folder in your sdk/tools folder and name it, "framework" I named mine "234" then place framework-res.apk and com.htc.resources.apk in that folder and in Adb type "apktool if (your framework-res) 234 (or what ever you named the folder)" and then type "apktool if (your resources) 234 (folder name)" and then to properly decompile type "apktool d -t 234 (folder name) .APK. Try that.
Sent from my PG86100 using xda premium
fernando sor said:
thanks ! you can even go further into framework/res/values/styles and com.htc.resources but i found that these changes cover most notifications
Click to expand...
Click to collapse
To add to your changes, I also had to change text in the voicemail apk. Mostly in res/ layout/in about 5 notificaton .xmlsIll write the exact changes when I get to a computer
Sent from my PG86100 using xda premium
steal25 said:
Did you install the framework to decompile with. You need to use the -t (framework) command. Make a folder in your sdk/tools folder and name it, "framework" I named mine "234" then place framework-res.apk and com.htc.resources.apk in that folder and in Adb type "apktool install (your framework-res) if 234 (or what ever you named the folder)" and then type "apktool install (your resources) if 234 (folder name)" and then to properly decompile type "apktool d -t 234 (folder name) .APK. Try that.
I did not install the framework initially. Followed your directions but received errors once I tried compiling the apk. I think maybe I used the wrong adb command to install framework even though it said successfully installed. Could you provide me with additional detail, step by step.
Click to expand...
Click to collapse
HackDPlanet said:
steal25 said:
Did you install the framework to decompile with. You need to use the -t (framework) command. Make a folder in your sdk/tools folder and name it, "framework" I named mine "234" then place framework-res.apk and com.htc.resources.apk in that folder and in Adb type "apktool install (your framework-res) if 234 (or what ever you named the folder)" and then type "apktool install (your resources) if 234 (folder name)" and then to properly decompile type "apktool d -t 234 (folder name) .APK. Try that.
I did not install the framework initially. Followed your directions but received errors once I tried compiling the apk. I think maybe I used the wrong adb command to install framework even though it said successfully installed. Could you provide me with additional detail, step by step.
Click to expand...
Click to collapse
in your apk folder place the framework-res.apk and your com.htc.resources.
in command window navigate to your apktool folder and type <apktool if framework-res.apk> hit enter
then type <apktool if com.htc.resources.apk> hit enter.
that simple
Click to expand...
Click to collapse
fernando sor said:
HackDPlanet said:
in your apk folder place the framework-res.apk and your com.htc.resources.
in command window navigate to your apktool folder and type <apktool if framework-res.apk> hit enter
then type <apktool if com.htc.resources.apk> hit enter.
that simple
Click to expand...
Click to collapse
I did exactly that and was able to decompile the .apk successfully. I received errors when I attempted to compile and recreate the apk.
Click to expand...
Click to collapse
HackDPlanet said:
fernando sor said:
I did exactly that and was able to decompile the .apk successfully. I received errors when I attempted to compile and recreate the apk.
Click to expand...
Click to collapse
That would be what you edited then. Whats the error?
Sent from my PG86100 using xda premium
Click to expand...
Click to collapse
fernando sor said:
HackDPlanet said:
That would be what you edited then. Whats the error?
Sent from my PG86100 using xda premium
Click to expand...
Click to collapse
Check out the image of the cmd prompt.
Click to expand...
Click to collapse
HackDPlanet said:
fernando sor said:
Check out the image of the cmd prompt.
Click to expand...
Click to collapse
if youlook at apktools error log it is pointing you to status_bar_tracking
it looks look you have a color value after text size. you cant do that.
Click to expand...
Click to collapse
if your adding a text color the line should read < android:textColor="#ffffffff">
i just used white as an example
Related
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 baksmali.zip
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.
1. Setting the notification dropdown shade to transparent
Instructions:
Download Baksmali Tool - directions for use are at the end of post 1
Open the services.jar file for example with winzip, 7z, winRar, or whatever. Unzip the classes.dex file into the folder with decompile.bat and recompile.bat from the Baksmali Tool zip.
Run decompile.bat - this will decompile classes.dex into a new folder called classout folder. Browse to classout/com/android/server/status and open the file called StatusBarService.smali with a text editor like notepad.
Search for "const/4 v5, 0x2", it should be under ".line 1629". Just change this to "const/4 v5, -0x3" and save the file.
Run recompile.bat - this will recompile the classout folder into classes.dex and rename the original file to orig-classes.dex
Open again the services.jar file with any zip tool and overwrite the classes.dex file with the one just created.
Now search the drawable-hdpi/status_bar_background.png file in the framework-res.apk and make it transparent.
Push the updated framework-res.apk and services.jar back to the /system/framework/ directory on your phone.
- credit for this info goes to tonecreationz
Much more information is available from The Ultimate Android Themeing Guide By Jairomeo, Manup456, ArmyRanger251, Stericson, Brandenk, SirMez, Beagz, david1171_ - link provided by nottach
the resources file was never rebuilt after it gets recompiled after I delete it from the keep folder. does yours?
Yes, if your resources.arsc is not being rebuilt then it means that you have errors in your process. Post the contents of your log.txt here.
jimbush3 said:
Yes, if your resources.arsc is not being rebuilt then it means that you have errors in your process. Post the contents of your log.txt here.
Click to expand...
Click to collapse
There is a ton of errors. I think reason could be because of the way the original framework was built? i am using gingerblur as a base. Here is my log: http://conceptvisionz.net/uploader/images/log.txt
After I delete the files from the keep folder, they're never replaced w/ my new files when the apk is compiled. What happened??
NguyenHuu said:
There is a ton of errors. I think reason could be because of the way the original framework was built? i am using gingerblur as a base. Here is my log: http://conceptvisionz.net/uploader/images/log.txt
Click to expand...
Click to collapse
Problems start here for you:
Code:
W: Cant find 9patch chunk in file: "drawable-hdpi/statusbar_background.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/title_bar_portrait.9.png". Renaming it to *.png.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
libpng error: Read Error
ERROR: Failure processing PNG image C:\Android\tools\apk_manager\other\..\projects\framework-res.apk\res\drawable-hdpi\statusbar_background.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\Android\tools\apk_manager\other\..\projects\framework-res.apk\res\drawable-hdpi\title_bar_portrait.9.png
statusbar_background and title_bar_portrait are not proper draw-9 pngs. You will need to fix these before you can recompile. This error will keep apk Manager from using anything in your projects folder when it compiles.
Here are valid pngs for those two images. If you are unable to fix yours, try replacing your with these in the projects/framework-res.apk/res/drawable-hdpi folder and then try to compile again.
{
"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"
}
- statusbar_background.9.png
- title_bar_portrait.9.png
calvin398 said:
After I delete the files from the keep folder, they're never replaced w/ my new files when the apk is compiled. What happened??
Click to expand...
Click to collapse
Check your log.txt, chances are that there are some draw-9 pngs that are causing apk Manager to fail its processes. Post the log here if you would like me to look at it.
jimbush3 said:
Problems start here for you: statusbar_background and title_bar_portrait are not proper draw-9 pngs. You will need to fix these before you can recompile. This error will keep apk Manager from using anything in your projects folder when it compiles.
Here are valid pngs for those two images. If you are unable to fix yours, try replacing your with these in the projects/framework-res.apk/res/drawable-hdpi folder and then try to compile again.
View attachment 584896 - statusbar_background.9.png
View attachment 584897 - title_bar_portrait.9.png
Click to expand...
Click to collapse
Thanks, I am still experimenting with it. I manage to recompile fine now. Reading logs really does help. I manage to get my menu to show the color I want. Now just need to work on the secondary menu when when you press more. It is tricky because the main menu popup you can use standard color codes #ff808080 is the gray I used and works fine. But for the secondary menu you cant use color codes, it fails compilation.
EDIT: so i finally got it to work (the secondary menu) but adding in textColor and remove text appearance item.
So for main popup bottom menu, this is the field to edit: TextAppearance.Widget.IconMenu.Item, change the textColor directly to a color of your choice in this format #ffffffff (white), mines is #ff808080 (dark gray).
For the secondary menu for areas that has a "more", find this field: Theme.ExpandedMenu, and just add in a textColor entry. You can copy and paste the one from TextAppearance.Widget.IconMenu.Item. remove the text appearance item.
3 days work finally solved, thanks everyone. Now the theme is a bit more flush with certain third party apps.
NguyenHuu said:
Thanks, I am still experimenting with it. I manage to recompile fine now. Reading logs really does help. I manage to get my menu to show the color I want. Now just need to work on the secondary menu when when you press more. It is tricky because the main menu popup you can use standard color codes #ff808080 is the gray I used and works fine. But for the secondary menu you cant use color codes, it fails compilation.
Click to expand...
Click to collapse
Nicely done and thanks for the guides, we need more of that.
jimbush3 said:
Where are you editing to change the colors displayed? I'm not sure what secondary menu you are referring to.
Click to expand...
Click to collapse
i got it, look at my posted, i edited above.
I've been able to track down most of the colors that I want to adjust in the xml files, however I cannot seem to find where the corporate email is getting its color from. The image below shows the white text that I can't find out how to change. Had anyone been able to locate the source for this?
Also, does anyone know where to edit the clock in the status bar's color?
jimbush3 said:
Also, does anyone know where to edit the clock in the status bar's color?
Click to expand...
Click to collapse
yeah it's in services.jar, http://forum.xda-developers.com/showthread.php?t=549309
Thanks Nguyen, I had actually decompiled the classes.dex from services.jar a little while back; but without a guide I had absolutely no idea what I was looking at. Its a bit more complicated than framework-res. Once I get in there and make the changes I'll add something about editing services.jar to the first post of this thread.
Look for the .line 61
The below changes it to green from white
Code:
.line 61
const v6, -0x1
to
.line 61
const v6, 0xFF4CFF00
0xFF4CFF00 - wouldn't a straight white be 0xFFFFFFFF?
I'm coming from an html background and through all the xml edits I've done and whatnot, the white color code is FFFFFFFF. So, to go to black my code should be 0xFF000000, right?
**edit, actually I just threw that second code you posted, 4CFF00, into gimp and it gave me a bright green. Maybe you meant the bloew code changes from white to green?
jimbush3 said:
0xFF4CFF00 - wouldn't a straight white be 0xFFFFFFFF?
I'm coming from an html background and through all the xml edits I've done and whatnot, the white color code is FFFFFFFF. So, to go to black my code should be 0xFF000000, right?
**edit, actually I just threw that second code you posted, 4CFF00, into gimp and it gave me a bright green. Maybe you meant the bloew code changes from white to green?
Click to expand...
Click to collapse
I worded it weird. Guess I shouldve said from white to green instead of to green from white.
jimbush3 said:
0xFF4CFF00 - wouldn't a straight white be 0xFFFFFFFF?
I'm coming from an html background and through all the xml edits I've done and whatnot, the white color code is FFFFFFFF. So, to go to black my code should be 0xFF000000, right?
**edit, actually I just threw that second code you posted, 4CFF00, into gimp and it gave me a bright green. Maybe you meant the bloew code changes from white to green?
Click to expand...
Click to collapse
yeah that would be white all Fs. The first two FFs control alpha, while the ohter 6 are just like html hex colors.
I got in there today and blacked out my clock, thank you both for the help. I've also added the steps and some useful tools to the first post for editing the status bar clock.
I'm so damn close to having my phone the way I want, for this week at least, but I've run into a new snag and don't know where to look yet. I edited the following code in styles.xml:
<item name="windowBackground">@drawable/screen_background_dark</item> under <style name="Theme">
and I changed it to @drawable/menu_bg, which referenced a background image I created and replaces the screen_background_dark which points to the black color in the drawables.xml file. For the most part this works perfectly, as seen here:
The only problem is, and this really is the only one I've found, is my alarm settings screen:
If I change that one value back to black then the alarms screen show up perfectly fine, black background, white alarm text, etc. I'm not ever sure where to start to look for the solution to this one. Maybe I should just sleep:
HOW TO THEME SAMSUNG ROMS (GALAXY 3 MAYBE OTHERS)
Hello guys. I have had many requests to do this so here it is.
Let' s just get started.
NOTE : - THIS GUIDE CONTAINS VARIOUS METHODS WHICH I PERSONALLY USE TO THEME. THERE ARE SOME OTHER DIFFERENT WAYS IN WHICH YOU CAN DO THIS.
WHAT ALL YOU NEED TO THEME??
APK Manager 5.0.2 : - Will be used for decompiling/compiling frameworks. Please don' t use the new version APKMulti-Tool 1.0.1 for now..
APKTool : - This you need to place in your \windows\ folder.
Java SDK : - This is necessary for the decompiling/compiling process. Also required in many patches for frameworks.
GIMP : - This is the image editing software which we are going to use to edit/resize PNGs.
Android SDK : - Again not of much use in this guide but always good to have for learning.
WinRAR : - This will be used for opening the APKs for adding PNGs after editing.
Notepad++ : - This we will use for opening the various XML/smali files for editing code.
Unedited base framework : - Its necessary that its unedited because it may lead to errors(like error compiling .9.PNGs)
Hex Colours : - You' ll need hex colour values for using them in various XMLs. This here is a nice website for that.
Lots of patience : - Now this skill you have to develop on your own.
HOW TO SETUP EVERYTHING FOR MAKING/PORTING THEME??
1) Download APK Manager 5.0.2(Not APK Multi Tool 1.0.1) from the above mentioned link. Extract the contents to any of your drives.
2) Download APKTool (Main program as well as the dependancies for you respective OS). Extract both the .tars contents to :\windows\.
3) Download the latest version (7u2 currently) of JDK(Java SDK) from the site mentioned above and install it.
4) GIMP, Notepad++ : - Download from above mentioned site and install them.
5) WinRAR : - I guess you should be able to get this on your own.
6) Unedited base framework : - If you already have then good. If you don' t then please download from above link.
7) Android SDK : - Download either the zip or .exe from above mentioned site and set it up accordingly. (Note : - This step can be skipped)
CHECK WHETHER THE FRAMEWORK YOU HAVE IS COMPILE-ABLE (UNEDITED) OR NOT.
Before starting, always check. For this, place the framework-res.apk in \apkmanager\place-apk-here-for-modding\. Now start the script. Select Option 22(Set current project) and then select the project. Then select Option 9(Decompile apk). Let it decompile. After that, select Option 11(Compile apk). Select "YES" for "Whether it is system app". Select "YES" for "Whether you want to include original files". Let it compile.
If the compilation process goes smoothly without any errors, then you have the correct(unedited) framework which can be used for theming.
{
"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"
}
EDITING VARIOUS XMLS : -
For information purpose, if you want to know what is an XML, then here is a nice read.
Decompile first : -
Place your framework-res.apk(should not be renamed after decompiling, so please rename before only) in the folder place-apk-here-for-modding. Start up script and decompile it(option 9). After decompiling, goto Projects folder. You will find your decompiled framework there.
Similarly, using the above method, decompile your twframework-res.apk(should not be renamed after decompiling, so please rename before only).
If you are porting a theme, then decompile the framework-res.apk and twframeowrk-res.apk from the theme to be ported also.
1) Editing Notification colour in notification drawer.
Files to be edited : - status_bar_latest_content_event.xml in \projects\framework_name\res\layout\.
* Goto \projects\framework_name\res\layout\.
* Open status_bar_latest_content_event in Notepad++.
* You will find 3 lines for editing the colour of the notifications.
1) android:id="@id/title". This is the title of the notification
2) android:id="@id/text". This is the description of the notification.
3) android:id="@id/time". This is the time of the notification
*Edit HEX value for "android:textColor" instance for the 3 above lines as per your likings. Or if you are porting from a theme, then just open the same XML file(i.e. status_bar_latest_content_event) of theme which you are porting in Notepad++ and copy paste the various HEX values to XML in your framework.
2) Colour of horizontal progress bars : -
Files to be edited : - progress_horizhontal.xml in \projects\framework_name\res\drawables\.
* Goto \projects\framework_name\res\drawables\.
* Open progress_horizontal in notepad++.
* The progress bar uses 3 colours to set the colour which goes from top to bottom. You have to set three colors: start, end and middle.
1) <item android:id="@id/background"> is for the unused part of the progress bar.
2) <item android:id="@id/progress"> is for the used part of the progress bar.
* Edit all the HEX values as per you linkings. Or if you are porting from another theme, then just open the same XML file(i.e. status_bar_latest_content_event) of theme which you are porting in Notepad++ and copy paste the various HEX values to XML in your framework.
3) Changing secondary font colour : -
Files to be edited : - zzz_tw_secondary_text_sub.xml in \projects\framework_name\res\color\
* Goto \projects\framework_name\res\color\.
* Open zzz_tw_secondary_text_sub.xml in notepad++.
* Look for the following instance,
Code:
<item android:state_window_focused="false" android:color="#HEXCOLOR_VALUE" />
<item android:color="#HEXCOLOR_VALUE" />
* Replace the HEXCOLOR_VALUE that is already there with the one of your choice.
* Note : - The default colour is blue in Samsung ROMs. Hex value #FF81BEE1.
4) Setting menu text colour to white in menus for black background : -
Files to be edited : - styles.xml in \projects\framework_name\res\values\.
* Goto \projects\framework_name\res\values.
* Open styles.xml in notepad++.
* Press CTRL+F and search for "TextAppearance.Widget.IconMenu.Item".
* The searched part will be like as shown in the following : -
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">[B]?textColorPrimaryInverse[/B]</item>
</style>
**Change the above code to as shown below : -
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">[B]@color/bright_foreground_dark[/B]</item>
</style>
* Then for text colour in "MORE" menu lists, press CTRL+F and search for "Theme.ExpandedMenu".
* The searched part will be as shown in the following : -
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">[B]?textAppearanceLargeInverse[/B]</item>
<style>
** Change the above code to as shown below : -
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">[B]?textAppearanceLarge[/B]</item>
<style>
5) Adding 1 percent battery mod to theme : -
Files to be edited : - stat_sys_battery.xml and stat_sys_batery_charge.xml in \projects\framework_name\res\drawable\.
* Goto \projects\framework_name\res\deawable\.
* Open stat_sys_battery.xml in notepad++. If there are no drawable values for 1% batterymod PNGs then, delete everything in that XML and copy paste the following code : -
Code:
[URL="http://pastebin.com/qRMqS2sy"]Click here for the pastebin data[/URL].
* Now open stat_sys_battery_charge.xml in notepad++. Check if there are drawable values for 1% battery mod. If there isn' t, then delete everything in that XML and add the following link : -
Code:
[URL="http://pastebin.com/pUxknPci"]Click here for the pastebin data[/URL].
6) Provider, Carrier, Ongoing-Title, Notifications-Title, Clear-Button, noNotificationsTitle : -
Files to be edited : - status_bar_expanded.xml in \projects\twframe_name\res\layout\
* Goto \projects\twframe_name\res\layout\.
* Open status_bar_expanded.xml in notepad++.
* Search for the lines : -
1) android:id="@id/plmnLabel". This is the Carrier name.
2) android:id="@id/spnLabel". This is the Provider name.
3) android:id="@id/ongoingTitle". This is the Ongoing-Title.
4) android:id="@id/latestTitle". This is the Notifications-Title.
5) android:id="@id/clear_all_button". This is the text of the Clear-Button.
6) android:id="@id/noNotificationsTitle". This is the text when no notification is displayed
* For each of the IDs above, there will be attribute android:textColor="<HEX_VALUE>". Edit the hex value as per your requirement. Or if you are porting from another theme, then just open the same XML file(i.e. status_bar_expanded) of theme which you are porting in Notepad++ and copy paste the various HEX values to XML in your framework.
7) Colour of the text when the text fiels is selected : -
Files to be edited : - styles.xml in \projects\framework_name\res\values\.
* Goto \projects\framework_name\res\values\.
* Open styles.xml in notepad++.
* Press CTRL+F and search for "<style name="TextAppearance">". There you will find "textColorHighlight" attribute just below.
* Change the HEX value for the attribute as per your requirement.
HOW TO COMPILE THE .APK BACK
Well here comes the big part. The part which usually causes the problems. You should consider the following points for this. The compilation process will go smoothly only if : -
You have not resized, replaced any .9.PNGs in the decompiled framework. If you want to you will have to do as I have described below in second post or else you will get compile errors. Lots of them.
You have not added any extra lines in XMLs which redirect to the PNGs(drawables) in the framework. If you have, make sure you have added the extra PNG to the framework as well.
**HOW TO COMPILE USING APKMANAGER : -
After you have made all the necessary edits to the framework, open up the script again.
Select option 22 and the select the project which you want to compile.
Then select option 19(Compression level for APKs) and select 0 for that.
You should see the compression level and the name of the project displayed above in the first line of the window.
After all that, select option 11(Compile APK). Select "Y" when it asks if its system APK. Select "Y" if it asks to include original files from APK or not.
Let it build the APK. If it builds successfully, then the most difficult part is finished.
[*]Minimize the script for a while. You will see a new folder named as "keep". Go to this folder and delete all the XMLs and the PNGs that you have edited. Don' t worry about the XMLs that you had edited in "values" folder. And also delete "resource.arsc" from the keep folder (Only if you have edited XMLs).
After you have done all that, maximize the script and press enter. Let it compile.
You will see your new compiled APK in the folder "place-apk-here-for-modding" in the form of unsigned<FILE_NAME>.
THIS WILL BE CONTINUED. STILL SOME MORE LEFT.
THEMING RELATED WITH PNGs
1) Popups :-
Figure 2.1
Present in : - framework_name\res\drawables-mdpi\
Name of the PNGs are : -
popup_bottom_bright.9.png
popup_bottom_dark.9.png
popup_bottom_medium.9.png
popup_center.dark.9.png
popup_center_medium.9.png
popup_full_bright.9.png
popup_top_bright.9.png
popup_top_dark.9.png
Please note that these are .9.PNGs. And they need to be .9.PNGs only. Normal PNGs will not work.
How to port from another ROM : - These .9.PNGs don' t require porting usually. Just take it from the theme you are trying to port and place it in your \res\drawable-mdpi\ folder using WinRAR.
Note : - This is to be done after you have completed editing and compiling the APK. Using WinRAR.
2) Backgrounds of menus : -
Figure 2.2
Present in : - framework_name\res\drawable-mdpi : -
Name of the PNGs are : -
menu_background.9.png : - This the background for one grid element.
menu_background_fill_parent_width.9.png : - This is the background of the whole grid element.
menu_more_bg.9.png : - The background of the menus when you select "More" menu.
menu_separator.9.png : - The separators(grid lines) between the various menus.
Please note that these are .9.PNGs. And they need to be .9.PNGs only. Normal PNGs will not work.
How to port from another ROM : - These .9.PNGs don' t require porting usually. Just take it from the theme you are trying to port and place it in your \res\drawable-mdpi\ folder using WinRAR.
Note : - This is to be done after you have completed editing and compiling the APK. Using WinRAR.
3) Notification bar and notification background(All related PNGs) : -
Figure 2.3
First six PNGs present in : - framework_name\res\drawable-ldpi except divider_horizontal_bright which is in framework_name\res\drawable-mdpi.
Last six PNGs present in : - twframe_name\res\drawable-ldpi or drawable-mdpi.
Names of the PNGs are : -
statusbar_background.9.png : - Can be a normal or a .9.PNG. Preferably a .9. As its black in most themes, no need to port. But if you want to you will have to follow method described below(Give me some time for the method).
status_bar_item_background_normal.9.png : - Background of the notifications on statusbar in idle condition. If you want to you will have to follow method described below.
status_bar_item_background_pressed.9.png : - Background of the notifications on the statusbar when the notification is selected. If you want to you will have to follow method described below.
divider_horizontal_bright.9.png : - The line which divides the notifications. Can be copied directly from the theme to be ported.
stat_sys_battery_[XX] : - These are the battery PNGs during normal use. Where [XX] refers to number between 0 and 100.
stat_sys_battery_chargeanim[XX] : - These are the battery charging PNGs. Here [XX] refers to a number between 0 and 100.
Other status bar PNGs : - All of them are of the form stat_sys_[X]_[Y]. By looking at the PNG itself you can identify which is for what.
quick_panel_music_bg.9.png : - This PNG is in twframework-res.apk\drawable-mdpi. This is the PNG for the music quick panel in the notification drawer. If you want to port this PNG from other theme then you will have to follow method described below.
quick_panel_list_bg_01.9.png : - This PNG is in twframework-res.apk\drawable-mdpi. This is the background for the titles such as "Ongoing", "NoNotifications", etc. It is a .9.PNG. Can be directly resized and used.
Quick panel icons : - These PNGs are in twframework-res.apk\drawable-ldpi. These are of the form quick_panel_icon_[NAME]_on/off. Are normal PNGs. Can be resized directly and placed in APK using WinRAR.
status_bar_header_background_01 : - This is present in twframework-res.apk\drawable-ldpi. This is the background for the quick panel. Is a normal PNG. Can be resized directly and placed in APK using WinRAR.
Unused notification drawer area : - The unused area in the notifications drawer is covered by status_bar_background.9.png.This is present in twframework-res.apk\drawable-ldpi. If porting from a theme, then you will have to use the method described below.
status_bar_close_on : - Present in twframewor-res.apk\drawable-ldpi. This is the PNG which defines the bottom of the notifications drawer.
EDITING/PORTING .9.PNGS
Let' s start off with the basics of what is a .9.PNG. Well there is a nice quick read about it here.
So what is the problem with .9.PNGs?? You will get info about it in my pastebin here.
**HOW TO EDIT (DECOMPILE METHOD) : -
Firstly, if you want to edit properly these PNGs, then you have to do it when the APK is in decompiled form. So decompile APK first.
Also, if you are porting a theme, decompile the APK from that theme also.
I am assuming the name of the PNG to be "btn_default_pressed.9.png". Open btn_default_pressed.9.png from the base theme using GIMP and also open the same PNG from the theme you want to port.
Note the the dimensions of the btn_default_pressed.9.png of our theme and the resize the same PNG from the theme you want to port accordingly.
Notice the borders of the .9.PNG of our base theme. You will notice some black solid lines. Now these are the lines that define the PNG. And these should not be touched or edited.
Now go to the PNG that you resized earlier. Using the rectangular select tool in GIMP, select the area of the PNG excluding the 1 px borders. And then copy it.(Figure 2.4 and 2.5).
Then go to the "btn_default_pressed.9.png" of our framework and then select the same area (i.e. excluding the 1 px borders) and press DELETE. The area will become empty.(Figure 2.6).
Then press CTRL+V(Paste).(Figure 2.6).
Save it. While saving you will be asked to export image. Select "Merge visible layers" and save.
There you have it. 1 PNG ported. Similarly, you can port other .9.PNGs. The important ones. Capish??
Figure 2.4
Figure 2.5
Figure 2.6
Reserved 2.
Finally.. Cool bro... Gonna Learn from this once you add info on smali editing..
Thanks for this tutorial!
akoshun said:
Thanks for this tutorial!
Click to expand...
Click to collapse
There is still lot more to go. Its late here so I will continue tomorrow.
wow man. This is like spoon feeding
Thanks a lot
vikraam said:
wow man. This is like spoon feeding
Thanks a lot
Click to expand...
Click to collapse
Well this will be big I guess. I already ran out of characters in first post.
could u also post wat languages do we need to know to start porting ? like XML etc
good job,i can not waiting to try.
Thread stuck
AacidD said:
could u also post wat languages do we need to know to start porting ? like XML etc
Click to expand...
Click to collapse
Well you don t need much prerequisite. Yeah XML would be good. The basics of it.
dhirend_6d said:
<QUOTE SNIPPED>
Click to expand...
Click to collapse
AWESOME!!
Really nice work, I would never have the patience to do sth. like this.
One thing I noticed in your APK Multitool picture though is, that the compression level is set to 9. That never worked for me while editing system apks, I think it is better to set it to 0.
Ghost In The Ruins said:
Really nice work, I would never have the patience to do sth. like this.
One thing I noticed in your APK Multitool picture though is, that the compression level is set to 9. That never worked for me while editing system apks, I think it is better to set it to 0.
Click to expand...
Click to collapse
Thanks. Actually, it should work though. What I do in the end is extract the resources.arsc from the .apk in the end and then again place it in the .apk using WinRAR with compression level "Store". So only the PNGs remain compressed.
dhirend_6d said:
Thanks. Actually, it should work though. What I do in the end is extract the resources.arsc from the .apk in the end and then again place it in the .apk using WinRAR with compression level "Store". So only the PNGs remain compressed.
Click to expand...
Click to collapse
Never thought of it doing it this way. I usually use different apk tool versions, one for decompiling and one for compiling. Took ages to get it work that way ^^
Compiling really should be the next part of your tutorial, it was always the most frustating thing to me and I imagine newbies might feel the same way.
Anyway, keep up the good work
Hi, I see a different picture in APK Multi-Tool, may be it's the problem of version, right?and can you tell me what's wrong after I selected Option 11?
(Sorry, I can't attach a picture like you...)
Arlisdoder said:
Hi, I see a different picture in APK Multi-Tool, may be it's the problem of version, right?and can you tell me what's wrong after I selected Option 11?
(Sorry, I can't attach a picture like you...)
Click to expand...
Click to collapse
Yep, different version. Something is wrong with your project. Most likely a .9.png is wrong formated. Check your log. There should be dozens of public.xml and language errors. You can ignore these. On top of these there should be the real problem. "*.9.png malformed" or something like this.
Arlisdoder said:
Hi, I see a different picture in APK Multi-Tool, may be it's the problem of version, right?and can you tell me what's wrong after I selected Option 11?
(Sorry, I can't attach a picture like you...)
Click to expand...
Click to collapse
I don t know which version of APKMultitool you are using. That s very different layout. But check the log that is there in APKManager folder. If you could attach the log then maybe I could say what the problem is.
EDIT : - Mot probably it is .9.PNG error as said by GhostInTheRuins above.
OK, now I attach my log and hope you can tell me what problem it is. Thanks.
Well, hello, i hope this wasn't posted before, but i certainly didn't found it here, so i had to test it many times to make sure it worked.
May work on all MDPI devices, but since i only own the wt19i, i can't tell for sure.
Now to the main subject:
Needed Tools:
Rooted Phone
CWM
APK Tool
SystemUI.apk
framework-res.apk
SemcGenericUxpRes.apk
ZIP-Capable archiver
Notepad++ or any good text editor
Brain (is a MUST)
Also you may want to download a couple of CWM-flashable files:
1.- Stock (clean/unmodded) SystemUI.apk, (this in case something goes wrong)
2.- Example SystemUI.apk
Basic Step by Step Setup:
1.- After you've download APKTool, unzip it wherever you like
2.- Copy and paste all 3 apk files on APKTool's folder (see attachments for files)
3.- Shift + Right Click on any empty part of APKTool's folder
4.- Click on "Open Command Window Here"
Once the comand prompt is open, type the following (press enter after typing each line):
Code:
apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk
apktool d -f SystemUI.apk
Don't close the command prompt window yet
This will get us the resources and decompile the stock SystemUI,apk, we'll also get a new folder named SystemUI
Step by Step Editing:
1.- Inside SystemUI folder, go to into these subfolders: smali/com/android/systemui/statusbar
2.- Open StatusBar.smali with your text editor (Right click -> choose your editor)
3.- Go to line 388 (or search for the stated code), it must be
Code:
const/16 v16, 0x4
4.- Replace it with
Code:
const/16 v16, -0x3
This makes transparency possible
5.- Save and close the file
6.- Now go back to the SystemUI folder and go into these subfolders: res/values
7.- Open drawables.xml with your text editor
8.- Edit the parameters as you like, here goes the explanation:
{
"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"
}
(if the image doesn't appear above this line, sorry. Check attachment for explanation)
NOTE: If you're using the SystemUI.apk that comes with QuickPannel and want to make it transparent, you need to do This
Thanks to Jobayer for sharing this info
As for the color codes, they're in hexadecimal format, they go from 00 (0) to FF (255) and they come in pairs:
example: #00112233
00 defines transparency, 00 is totally transparent, FF is totally opaque
11 defines the ammount of red, 00 has no red, FF is this
22 defines the ammount of green, 00 has no green, FF is this
33 defines the ammount of blue, 00 has no blue, FF is this
FF000000 means it's totally black opaque
80000000 it's 50% opacity black
80FFFFFF it's 50% opcity white
80FF0000 it's 50% opacity red
Click to expand...
Click to collapse
9.- Save and close your file
Now compile back the SystemUI.apk:
This is kinda complex, but if you're here already, should be a walk in the park
1.- First, we need to use the command prompt from before (you didn't close it, did you?)
2.- Now we'll make the build files by using this line on the command prompt:
Code:
apktool b -f SystemUI.apk
(thanks nik2808 for pointing a mistake i made with the code)
3.- Now we go back to the APK Tool folder and rename the SystemUI.apk to SystemUI.zip
4.- Open SystemUI.zip
5.- From the ZIP, copy the META-INF folder and the AndroidManifest.xml file to SystemUI/build/apk subfolder
6.- Repeat step 2, this will get us a signed SystemUI.apk file
You can close the command prompt window now, the signed file will be on SystemUI/dist subfolder
Once you got your customized SystemUI.apk, you can install it by:
1.- using any file explorer, replace the one on your system folder with the new one, change the permission to Read (all) Write (owner only) Execute (none) and reboot your phone
2.- open the demo flashable zip and replace SystemUI.apk with the new one, then flash it with CWM, no need to wipe anything
Man, writting all this was quite long...
BONUS: To get any color you like easily
1.- open Paint (yeah, the windows thingy)
2.- go to Edit Colors
3.- chose any color you like
4.- you'll see "Red Green Blue" values on the lower left, these are the DECIMAL codes for your color
5.- open the Calculator and switch it to Programmer (alt + 3)
6.- make sure DEC is selected on the right pannel
7.- type the DECIMAL value for RED color
8.- press HEXA on the right pannel, this will get you the HEXADECIMAL code for RED in your color
9.- Repeat 6 to 8 for GREEN and BLUE and you'll have your code.
Example: Yellow will be FFFF00
Now you need to decide the opacity from 00 (transparent) to FF (opaque) and use that code on the beginning.
Example: 50% transparent Yellow will be 80FFFF00
Now use that code on the desired spot and voilà
Full Transparent code is 00
25% opaque is 40
50% opaque is 80
75% opaque is C0
100% opaque is FF
I hope you guys find this post useful, thanks for reading, and sorry, it's long and my english sucks nowadays...
If you test this on a different phone model and it works, let me know so i can add it to the list of "working in..." list
Great job... :good:
The only "problem" I see with transparent expanded contents is when draging to close expanded bar, the carrier label overlaps notifications and/or header.
Yup like the problem serajr stated,it would be really perfect if you could fix this.
But anyway, nice tutorial friend !
you guys mean when you're closing the expanded notifications, and the carrier name is shown "over" the info / status bar?
It's a side effect of notification_item_background_color being transparent. Even tho the carrier is in a layer "behind" the items, as they're transparent, the carrier is seen (so it's actually an "underlap"?). In terms of layers, the general background is under everything, then it comes items (and separators), then status bar at the top of the "stack"
I don't know how to fix it (or if it can be fixed), i think i should install any other transparent-looking SystemUI and check if the same happens
And yep Serajr, it may be a problem if you have many items displayed, the carrier will still be visible
I'll see if i can find a way to fix or improve it.
Thanks for the feedback
hi :;
Can we do this HTC One V style SystemUI ????
Home Screen %50 tranparent Statusbar Black
.apk
HTC one V systemUI
https://docs.google.com/folder/d/0B...edit?pli=1&docId=0B4SPXehz_WNhTXRCT2hNX0Y4aWs
@Serajr & Kokzhanjia: Tried another transparency mod and the problem is still present, check attachment to see it
An option would be to delete the operator from showing, maybe?
I think there may be a way to make it disappear while scrolling... i wonder if i may get it right...
@Orochixxx: i kinda didn't get your request.
you want me to mod Sony's SystemUI to look like HTC?
or you want me to edit HTC to be transparent?
If it's the 1st, as far as i know, you can only set a global transparency, it doesn't have separate settings for statusbar for home and status screeen, it's the same setting for both cases, so it can't be done (or at least not yet).
The Quicksettings are present in other mods, but horizontally instead of vertically. As of now, i don't know if they can be rearranged to match that look, sorry.
For a look on how it may look, i suggest you to check Jobayer's Mod, it has transparency and quicksettings, and he has the GPS bug fixed
if it's the 2nd, as far as it has the same structure files, i may try it, but i won't be able to test it myself (nor i know if CWM works on HTC phones)
Quick Panel
How to make a quick panel transparent?
toni.wijayanto said:
How to make a quick panel transparent?
Click to expand...
Click to collapse
Edit stat_power_bg.png and stat_power_bg_touch.png in Photoshop and make it transparent as much as you want
Sent from my ST15i using xda premium
jobayer said:
Edit stat_power_bg.png and stat_power_bg_touch.png in Photoshop and make it transparent as much as you want
Sent from my ST15i using xda premium
Click to expand...
Click to collapse
Thanks.....
GSUKeitarou said:
@Serajr & Kokzhanjia: Tried another transparency mod and the problem is still present, check attachment to see it
An option would be to delete the operator from showing, maybe?
I think there may be a way to make it disappear while scrolling... i wonder if i may get it right...
@Orochixxx: i kinda didn't get your request.
you want me to mod Sony's SystemUI to look like HTC?
or you want me to edit HTC to be transparent?
If it's the 1st, as far as i know, you can only set a global transparency, it doesn't have separate settings for statusbar for home and status screeen, it's the same setting for both cases, so it can't be done (or at least not yet).
The Quicksettings are present in other mods, but horizontally instead of vertically. As of now, i don't know if they can be rearranged to match that look, sorry.
For a look on how it may look, i suggest you to check Jobayer's Mod, it has transparency and quicksettings, and he has the GPS bug fixed
if it's the 2nd, as far as it has the same structure files, i may try it, but i won't be able to test it myself (nor i know if CWM works on HTC phones)
Click to expand...
Click to collapse
Well.. In my SystemUI v4 mod (Xperia T Tabbed 'n' Grid Toggles) when Quick Panel Tab is selected, the carrier label is hidden.
I think I can do the same when startusbar is about to be collapsed (closed). I need to try it, then I report you here, ok?
jobayer said:
Edit stat_power_bg.png and stat_power_bg_touch.png in Photoshop and make it transparent as much as you want
Sent from my ST15i using xda premium
Click to expand...
Click to collapse
Thanks for pointing that out, since mine it's stock SystemUI, i had no idea how to do it
serajr said:
Well.. In my SystemUI v4 mod (Xperia T Tabbed 'n' Grid Toggles) when Quick Panel Tab is selected, the carrier label is hidden.
I think I can do the same when startusbar is about to be collapsed (closed). I need to try it, then I report you here, ok?
Click to expand...
Click to collapse
Wow, that'd help a lot, thanks
I have a question, i did everything like the post says for the transparency, and the transparency is not working, could some somebody help me with a solution? i did everything with apk multi tool, i will apreciate an answer. Thanks.
I think for compiling it's
apktool b -f "Path of SystemUI Folder" New_SystemUI.apk
not
apktool d -f SystemUI.apk
nik2808 said:
I think for compiling it's
apktool b -f "Path of SystemUI Folder" New_SystemUI.apk
not
apktool d -f SystemUI.apk
Click to expand...
Click to collapse
ouch!, you're right, my mistake, thanks for telling me
GSUKeitarou said:
ouch!, you're right, my mistake, thanks for telling me
Click to expand...
Click to collapse
your always welcome..
dist folder does not appear
single folder build/apk/classes.dex
how do i get 100% transparency?
daydu19 said:
how do i get 100% transparency?
Click to expand...
Click to collapse
replace the hex code with this one #00FFFFFF
jobayer said:
replace the hex code with this one #00FFFFFF
Click to expand...
Click to collapse
I tried and got this
daydu19 said:
I tried and got this
Click to expand...
Click to collapse
did you change the statusbar.smali with -0X3??
How to make any gingerbread or cm7/cm9 status bar transparent
Check my signature for all my statusbars including pre-made stock cm7/cm9 and Aosp statusbars and guides
There's three ways to make the statusbar bar Transparent and I'll post them all
One way works with any gingerbread rom (deodex & rooted) and one with cyanogen 7
I have not tried it on ics or jelly bean but you can try (for people who stumble across this thread who are not galaxy y users)
Please dont ask for support unless you are using a custom rom on galaxy y
Any other phones please goto your own phone forum for support
You also need a launcher that is capable of transparency
Adw works but you need to disable wallpaper hack in settings
holo launcher works
any other launcher if it doesn't work look in it's settings & try & disable wallpaper hack or manage internally
Method one for non cm (Stock Deodex Rom)
You need apk tool installed - if you don't know how to use it see my guide here
http://forum.xda-developers.com/showthread.php?t=2206938
Once you have decompiled SystemUI.apk using apk tool goto res/layout Open status_bar.xml in notepad
Find the following line
Code:
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" [COLOR="Red"]android:background="#ff000000"[/COLOR] android:focusable="true" android:descendantFocusability="afterDescendants"
Notice the part highlighted in red android:background is normally a hexadecimal value or it could be a drawable value
either way change the red part to the following
Code:
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" [COLOR="Red"]android:background="@drawable/nameofpng" [/COLOR]android:focusable="true" android:descendantFocusability="afterDescendants"
Notice that android:background is now a drawable value
Change nameofpng to the name of your transparent background image (just the name - do not include the file extension .png)
place this image with the same name as the drawable value in res/drawable-ldpi
(of course other devices might be in mdpi or hdpi)
Recompile and sign apk
Put in a flashable zip and flash with system mounted
You can download and use the pngs in the attachment (for ldpi like galaxy y) or create your own
To create a transparent status bar image just take a non Transparent one and edit it in a photo application to make it Transparent (make sure image dimensions stay the same and is for your phone resolution)
Method two for cm7
Note you will need apk tool installed and notepad++ installed
Download the patcher tool by Z25 in attachment
Unzip the contents to a folder
Place your SystemUI.apk and framework-res.apk in files_to_patch
Run patcher.bat
Select status bar tweaks and enable only transparent status bar
Edit the smali file as described in the text file that pops up
Select option build and sign
Select option to create zip files
You now have a zip file called patch.zip
unzip this and take out the SystemUI.apk - we will save this for later
Now we have to either make our own transparent theme or you can download a theme from the playstore for theme chooser that already contains status bar transparency
If you are downloading a theme from the playstore skip the part "To create your own theme" and go straight to the part "final steps"
To create your own theme
Goto uot kitchen http://uot.dakra.lt/kitchen
Take cyanbread.apk from the app folder of your cm7 rom & place on pc (or any other Theme Chooser Theme you wish to make transparent)
Rename it to what you want to call theme
Upload it to kitchen (under cm7 theme in file upload)
In status bar tweaks set background transparency to around 70% Transparent and any other settings you need like carrier or footer - don't forget to generate preview once done
Make sure you have selected ldpi in statusbar tweak settings and ldpi/mdpi for theme chooser preview in file upload (other devices may vary) and in file upload change update binary to galaxy
Then goto summary section
If everything is green create the theme
If not make sure you have clicked generate preview on status bar tweaks
Kitchen will then create theme for you
Download the zip file from kitchen and unzip it
Take out your theme apk
Final Steps
Sign both your theme apk and SystemUI.apk that you saved from earlier with a platform key using zipsigner (playstore)
Put both apks in a flashable zip and flash in cwm with system mounted
(note if you are using a theme from the playstore just do this for SystemUI.apk)
Once the phone has booted goto
ADWLauncher
System Preference
Disable Wallpaper Hack (untick the box)
Your status bar is now transparent
Method three for cm9
Once you have decompiled SystemUI.apk with apktool
Goto smali/com/android/systemui/statusbar/StatusBar.smali
Find the following line
Code:
invoke-direct/range {v11 .. v16}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
Above this line change
Code:
const/16 v16, 0x4
To the following
Code:
const/16 v16, -0x3
Now in notepad++ open the following
res/values/drawables.xml
Find the following line
Code:
<item type="drawable" name="status_bar_background">#ff000000</item>
Change the hex value to the hex value of the colour/transparency you want
For example
Completely transparent:
Code:
<item type="drawable" name="status_bar_background">#00FFFFFF</item>
70% transparent
Code:
<item type="drawable" name="status_bar_background">#b3000000</item>
50% transparent:
Code:
<item type="drawable" name="status_bar_background">#7f000000</item>
Recompile
Sign with a platform key using zipsigner (playstore)
Put in a flashable zip and flash in cwm with system mounted
What is the name for the png to put in drawable-ldpi?
Re: [Guide] [Mod] How to make any gingerbread or cm7 status bar transparent
remo1995 said:
What is the name for the png to put in drawable-ldpi?
Click to expand...
Click to collapse
You can rename it to ur own like
Jst open statusbar.xml in layout folder and on 2nd line u will find an attribute android;background change the file u want to add next to drawable/xx folder and put that file in ur drawable ldpi folder
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Reporting from incomplete blue theme
Status-paused
framework-working
remo1995 said:
What is the name for the png to put in drawable-ldpi?
Click to expand...
Click to collapse
Name it the name of the @drawable value
In my example it's nameofpng
Re: [Guide] [Mod] How to make any gingerbread or cm7 status bar transparent
Great guide :thumbup:
Sent from my GT-S5360 using xda app-developers app
Thank you, but when I go to recompile the file gives me error
remo1995 said:
Thank you, but when I go to recompile the file gives me error
Click to expand...
Click to collapse
what rom are you using?
decompile then recompile the apk without making any changes - if it compiles correctly you know you have edited the xml file wrong or not placed the corresponding png in the drawable folder
if it still gives errors without you making changes then either you are using apk tool wrong or the apk has other errors from the orig source
marcussmith2626 said:
what rom are you using?
decompile then recompile the apk without making any changes - if it compiles correctly you know you have edited the xml file wrong or not placed the corresponding png in the drawable folder
if it still gives errors without you making changes then either you are using apk tool wrong or the apk has other errors from the orig source
Click to expand...
Click to collapse
I use the cod rom and I'm trying to change the systemUI of marinalin85, the bar s3 style android 4.2.2
remo1995 said:
I use the cod rom and I'm trying to change the systemUI of marinalin85, the bar s3 style android 4.2.2
Click to expand...
Click to collapse
No reason why it shouldn't work - make sure you have loaded SystemUI.apk and framework-res.apk into apktool using the apktool if command
Make sure all your apk tool commands are correct I'll post a guide on it soon
marcussmith2626 said:
No reason why it shouldn't work - make sure you have loaded SystemUI.apk and framework-res.apk into apktool using the apktool if command
Make sure all your apk tool commands are correct I'll post a guide on it soon
Click to expand...
Click to collapse
to compile and decompile it does! the file does not work gives me forced closure! I made you those passages
Apk tool guide added see http://forum.xda-developers.com/showthread.php?t=2206938
remo1995 said:
to compile and decompile it does! the file does not work gives me forced closure! I made you those passages
Click to expand...
Click to collapse
Follow my apk tool guide I just posted - I can assure you if you follow all my guides correctly and Fully you will not get force closes - I have made many status bars using this method
Decompile my SystemUI.apk from my status bar thread so you can compare the line for the statusbar background in status_bar.xml with yours
If you get errors when you decompile the apk it means the apk was wrongly compiled to begin with and apk tool can't decompile it correctly - you will need to correct any errors that are in the original apk before you can recompile
how can i make launcher compatible with transparency like TW launcher?
Sent from my GT-S5360 using Tapatalk 2
iMaker said:
how can i make launcher compatible with transparency like TW launcher?
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
Some launchers do not support transparency
if it doesn't work and there is no option to disable wallpaper hack or manage internally in the launcher settings or something similar you will need to use a different launcher if you want transparency
even in go launcher it still wont have transparency
Sent from my GT-S5360 using Tapatalk 2
iMaker said:
even in go launcher it still wont have transparency
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
I don't think go launcher supports transparency
launchers that definitely do are
holo launcher
adw launcher (disable wallpaper hack in settings)
Added a zip of the full and semi transparent png images for people to use themselves with the guide
off topic question sir, how did you move the jellybean clock and date above toggle bar?
joelquerty said:
off topic question sir, how did you move the jellybean clock and date above toggle bar?
Click to expand...
Click to collapse
By placing <com.android.systemui.statusbar.policy.DigitalClock with the corresponding ids and smali files under the relative layout in status_bar_expanded.xml above the line for toggles
marcussmith2626 said:
By placing <com.android.systemui.statusbar.policy.DigitalClock with the corresponding ids and smali files under the relative layout in status_bar_expanded.xml above the line for toggles
Click to expand...
Click to collapse
can you plzz give me the link of tutorial. i searched in google and xda but i could'nt find it... thank you
Hello friend, this is my first post after years of just being a silent reader ... I finally decided to create an account on this forum.
Now I want to ask, what's the name of the action bar and the 9patch.png name of this image number one in attachment below
then these two objects below on image number two marked with arrows
and one more question about this editing contact page that I can't figure it out how to change its background instead of holo white, any other pages was changed except this one, where is the damn layout xml for this thing?
help from my friends here will be greatly appreciated and I would be grateful
C.E.R.N said:
Hello friend, this is my first post after years of just being a silent reader ... I finally decided to create an account on this forum.
Now I want to ask, what's the name of the action bar and the 9patch.png name of this image number one in attachment below
then these two objects below on image number two marked with arrows
and one more question about this editing contact page that I can't figure it out how to change its background instead of holo white, any other pages was changed except this one, where is the damn layout xml for this thing?
help from my friends here will be greatly appreciated and I would be grateful
Click to expand...
Click to collapse
Welcome new XDA participant
I don't write down all png files I have modified and I don't have access to my theme right now but here are some clues:
1st screenshot: it's in framework-res.apk and check .9.png called "***bottom***" There aren't so much .9.png called like that.
2nd screenshot: it should be located into the Contacts.apk and there isn't a lot of .9.png files.
3rd screenshot: there's a .xml file into /res/drawable/ of Contacts.apk for the background.
Primokorn said:
Welcome new XDA participant
I don't write down all png files I have modified and I don't have access to my theme right now but here are some clues:
1st screenshot: it's in framework-res.apk and check .9.png called "***bottom***" There aren't so much .9.png called like that.
2nd screenshot: it should be located into the Contacts.apk and there isn't a lot of .9.png files.
3rd screenshot: there's a .xml file into /res/drawable/ of Contacts.apk for the background.
Click to expand...
Click to collapse
Okay, I will check all *bottom 9.png
And about the .xml can you give me any other clue?
C.E.R.N said:
Okay, I will check all *bottom 9.png
And about the .xml can you give me any other clue?
Click to expand...
Click to collapse
Check the color of "background_dial_holo_dark"
Primokorn said:
Check the color of "background_dial_holo_dark"
Click to expand...
Click to collapse
the value of "background_dial_holo_dark" refer to an .png image, I was replace this with my own .png image, or maybe it is "primary background color" ? in the folder values/colors/color.xml there is an code <color name="background_primary">#ffffffff</color> but I haven't change it yet.
I want to make half transparent effect on the background that shows my current wallpaper instead, if it's possible.
Would you mind to check my res folder if you're not busy, in the attachment...
C.E.R.N said:
the value of "background_dial_holo_dark" refer to an .png image, I was replace this with my own .png image, or maybe it is "primary background color" ? in the folder values/colors/color.xml there is an code <color name="background_primary">#ffffffff</color> but I haven't change it yet.
I want to make half transparent effect on the background that shows my current wallpaper instead, if it's possible.
Would you mind to check my res folder if you're not busy, in the attachment...
Click to expand...
Click to collapse
So try to remplace into colors.xml file
Code:
<color name="background_primary">#ffffffff</color>
by this
Code:
<color name="background_primary">#00ffffff</color>
Primokorn said:
So try to remplace into colors.xml file
Code:
<color name="background_primary">#ffffffff</color>
by this
Code:
<color name="background_primary">#00ffffff</color>
Click to expand...
Click to collapse
I will try that and report the result later
It works :good: thanks man