Related
Ok guys , as we all know we have 16 bit color display , and that is our "big" problem.I decide do something with this , and i trie to correct saturation in pictures ,and i understand - "this is it" .
After a 2 week hard coding i proudly present : SATURATOR.
What is it?
This app resaturate png\jpg pictures:
Resaturate png\jpg pictures in apk.
Resaturate your favorite wallpaper.
Resaturate your favorite cyanogen mod 7 themes (apk).
Resaturate your favorite MIUI themes (mtz).
Resaturate ROM!
How to use:
You must install java!!!
i recomended use jre 6.27 x86.
Download "Saturator".Extract "Saturator" folder to root of your hard drive (of course you can try another path BUT I STRONGLY RECOMMENDED PLACE SATURATOR FOLDER TO ROOT OF YOUR HARD DRIVE).Inside saturator folder you can find some files and folders, But we will use:
rom-apk folder - there we will place our files for processing.
iconer folder - you can place your templates for Iconer here.
saturator.ini - there you can change some information.
saturator.exe - it is app itself.
DO NOT DELETE ANYTHING IN THE SATURATOR FOLDER!!!
GUI Interface:
Elements:
Modes - apktool - this mode use apktool for reenginering apk files.
Modes - zip - this mode use rar for unpacking ,and 7zip for packing apk.
Saturation - there you can choose your saturation - use values from 0 to ...what you want.Type your value here and press enter.You will see changes on the picture with "HTC" label
IconerN - use iconer feature in "detect by name" mode.
IconerWH - use iconer feature in "detect by widht and height" mode.
prop-on - this is a proportion for iconer.Change this value and press enter.You will see the chages on picture above.Do not remember choose a template first from list below.
Modes
APKTOOL - apktool will be used for reenginering apk.This mode more accurate then zip mode,BUT in this mode NOT ALL APK CAN BE PROCESSED.So use it ONLY when zip mode fails.
ZIP - rar and zip will be used for reenginering apk.I recommended use this mode.
Iconer
This feature allows you modify icons while processing pictures.See this post for screens.
There is a 2 modes for file processing:
IconerN - Icons will be detected by names in 2 values (by default defined 1 value - icon).You can change values in the saturator.ini, there is a 2 parameters:
icname - icon name variant 1
icname2 - icon name variant 2
By default icname=icon.That means when pictures are processing and file name contain "icon" - iconer will be used.So if you change this value to...browser, for example, the name of file that contain word "browser" will be processed by iconer.
If you also define the icname2 , both of them will be used.Example:
icname=icon
icname2=ic_launcher
files that contain "icon" and "ic_launcher" will be processed by iconer:
.....\com_android_camera_ic_launcher_gallery.png - this file will be processed, because it contain ic_launcher.
.....\com_android_camera_icon_gallery.png - this file will be processed, because it contain icon.
.....\com_android_camera_ic_gallery.png - this file will be not processed, because it not contain ic_launcher and icon.
IconerWH - Icons will be detected by width and height.There is a 2 values for that in saturator.ini (if icwh1 and icwh2 are defined,both of them will be used ):
icwh1 - by default this parameter is defined =48
icwh2 - by default this parameter is defined =72
That means when files are processing and the width and height of picture equal icwh1 or icwh2 - iconer will be used.
I recommended to you use this mode,because almost icons are 48x48 on hdpi,and 72x72 ldpi.
If you want to use your own template for iconer:
Place your templates in iconer folder.The file MUST BE IN PNG FORMAT.height and width of your choice,there is no restriction, but in reasonable aisles.
Saturator.ini
The file in the saturator folder , and you can change (if you want and when you know what are you doing ) this parameters:
icname
icname2
icwh1
icwh2
do not touch anything else!!!!because all other parameters change automatically from the GUI.
restrictions
Restriction by paths:
For APKTOOL mode:
YOU MUST PLACE YOUR APK FILES IN ROM-APK FOLDER WITHOUT SUBFOLDERS:
rom-apk\myapp.apk - OK.
rom-apk\ANYfolder\myapp.apk - wrong.
For ZIP mode:
NONE
Restriction by names of files:
NON ENGLISH SYMBOLS:
rom-apk\com.android.myapp_v1.2.3-1.apk - OK
rom-apk\программа.apk - WRONG.
Apk files CAN CONTAIN ANY SYMBOLS.
Apk files CAN CONTAIN SPACES - They will be renamed automatically:
rom-apk\my app.apk will be renamed to rom-apk\myapp.apk.
PLACE AND GRAB YOUR FILES ONLY TO\FROM ROM-APK FOLDER!!!SATURATED FOLDER - IS A TEMP FOLDER!!!THAT FOLDER AUTOMATICALLY DELITING ON PROGRAMM START.SO AFTER PROCESSING ARE FINISHED YOU CAN SEE THE CHANGES IN THIS FOLDER.BUT THE FILES YOU NEEDED - IN THE ROM-APK FOLDER!!!!!
soon I'll make FAQ with examples.....
Download v1.2
http://www.multiupload.com/J5D0RVSNHK
You also can try my own resaturated version of Typhoon 3.6.8/3.6.9 rom.See details here.
Please feedback to me how it works for you.
OLD VERSION
for easy understanding how it works see video tutorial:
http://www.multiupload.com/VKC3ZHAWW5
Video tut on youtube (thanks to sajin1):
Small explanations:
All files you want to processed you must place in rom-apk dir,and grab it back from that dir.
Saturated folder - is a temp folder for processing pics ,this folder automaticaly deliting on program starts.
saturator.ini - this is a configuration file for saturator, in there you can change saturation 0 - colorless, 0 -... i don`t no limitation, i allways use 1.6
saturatorAmode - in this mode apktool uses for repacking apk - this mode needed in some cases when zip mode not work,in this mode more accurate and safely,but NOT ALL apk can be processed.And there is a limitation in path to apk:you need to place apk files in rom-apk dir WITHOUT subfolders , example - if you put xy.apk in ...rom-apk\app\xy.apk - YOU get NOTHING, but if you put xy.apk in ...rom-apk\xy.apk - it should be fine.
saturatorZmode - use zip\rar for repacking apk,in this mode you can processed ALL APK,MTZ....and everything is packed with zip , and there is NO limitation in path to apk.
Download V1.0
http://www.multiupload.com/FNF7W4ALWY
Download v1.1
http://www.multiupload.com/ZQ4CNZMDCY
I hope our devs use this app !!!
I realy never go back on non resaturated rom - because it looks great!.You can trie it by yourself and see how much diferent between non and resaturated roms,apps,pics.If you don`t see a diferent - you are blind!!!
Will be force with you.
Enjoy!
Sorry for my bad english.
For moders - because this app is relevant to nand rom`s ,i decide to create thread in nand section.Please don`t move it.
---------- Post added at 07:04 AM ---------- Previous post was at 07:03 AM ----------
Changelog
04.10.2011 - V 1.2
Fixed - Images quality.Now 100% quality only.
30.09.2011 - V 1.1
Added - Iconer
Added - Zipalign
Added - rom-apk dir checking for compability apktool and zip mode
Added - new GUI
Fixed - x64 Support
and something i don`t remember
19.09.2011 - initial release.
This is awesome!
i seen you theme in 4pda =)
May i use you program in Mac Os X? or it work only in phone?
this app for windows only
bad, but its the way for Saturator 2. Work without pc
Please set an example
I'm gonna try this on my own rom port.
Will report back (I hope) tomorrow.
hi, thanks!
trying now.
what is the difference
SaturatorAmode
SaturatorZmode
???
Thanks!
dorimanx said:
hi, thanks!
trying now.
what is the difference
SaturatorAmode
SaturatorZmode
???
Thanks!
Click to expand...
Click to collapse
As far as i can see
SaturatorA is for APK files
SaturatorZ is for ZIP files
This is awesome! That **** is crazy!
I was just going to try this out but discovered the following problem:
I've pushed the whole system/apps/ folder to rom-apk dir and executed SaturatorZmode.
The .apk files now in "saturated" folder arent .apk files anymore, but folders named as XYZ.apk see here:
{
"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"
}
Installed a CM7 Theme whose images I have resaturated => bootloop ...
How to fix this bootloop?
Flash a new framework.res?
D3LTA said:
As far as i can see
SaturatorA is for APK files
SaturatorZ is for ZIP files
Click to expand...
Click to collapse
oh! this is nice.
but warning! do not use it on framework on systemui
only on standart apps, not critical system apps.
or damage to ROM will accure.
Sent from my HD2
D3LTA said:
As far as i can see
SaturatorA is for APK files
SaturatorZ is for ZIP files
Click to expand...
Click to collapse
NO NO NO, SaturatorA use apktool for repacking apk,SaturatorZ use zip\rar for repacking apk.
dorimanx said:
oh! this is nice.
but warning! do not use it on framework on systemui
only on standart apps, not critical system apps.
or damage to ROM will accure.
Sent from my HD2
Click to expand...
Click to collapse
This is NOT true, you can safely proccessed framework-res.Right now i am tried 5 rom`s in zip mode and there is NO problem with framework.Only do not touch bootscreen.
you want example? ok.
I do not have permissions from langtang , but i think he will be not gainst about this (if so i remove it ):
This rom MIUI v27.1 from langtang
I`ve do not any changes in this rom, i`am use z mode on this rom with saturation=1.6 ONLY.
ok.here we go:
download:
http://narod.ru/disk/25283464001/TWeakos_MIUI_GINGER_RS_V27.1_MAGLDR.zip.html
and some themes (mtz)
honeycomb and slatesense
http://narod.ru/disk/25283607001/HoneyComb_SlateSense_RS.7z.html
and some screenshots:
I am on this rom about 1 week and i have NO problem trie it maybe you like it
---------- Post added at 03:26 AM ---------- Previous post was at 02:47 AM ----------
Tak3r07 said:
This is awesome! That **** is crazy!
I was just going to try this out but discovered the following problem:
I've pushed the whole system/apps/ folder to rom-apk dir and executed SaturatorZmode.
The .apk files now in "saturated" folder arent .apk files anymore, but folders named as XYZ.apk see here:
Installed a CM7 Theme whose images I have resaturated => bootloop ...
How to fix this bootloop?
Flash a new framework.res?
Click to expand...
Click to collapse
you need grab apk files back from rom-apk dir and replace it in original rom.if you do all exactly how on video tutorial you have no problem with this.
If you want resaturate some cm7 theme:
place your apk theme file in rom-apk dir, next start saturatoramode (apktool) and wait untill its finished.grab your new theme from rom-apk dir.install.enjoy.
for example:
this is a mixer theme you can find original thread in android themes forum, it is sense like theme.
download
http://www.multiupload.com/R6IZA40LT4
again - i do not any changes in this apk , there is only resaturated images.
it is working great! trie it.
tweakos said:
you need grab apk files back from rom-apk dir and replace it in original rom.if you do all exactly how on video tutorial you have no problem with this.
If you want resaturate some cm7 theme:
place your apk theme file in rom-apk dir, next start saturatoramode (apktool) and wait untill its finished.grab your new theme from rom-apk dir.install.enjoy.
for example:
this is a mixer theme you can find original thread in android themes forum, it is sense like theme.
download
http://www.multiupload.com/R6IZA40LT4
again - i do not any changes in this apk , there is only resaturated images.
it is working great! trie it.
Click to expand...
Click to collapse
I would have grabbed them from rom-apk dir, but this one was empty! I've watched the whole video and in your video the rom-apk dir isnt empty, while doing the same steps as i did...
Sent from my HTC HD2 using XDA Premium App
What mode do you use? If you use saturatorAmode you need to place apk files in rom-apk dir WITHOUT subfolders , example - if you put xy.apk in ...rom-apk\app\xy.apk - YOU get NOTHING, but if you put xy.apk in ...rom-apk\xy.apk - it should be fine.
saturatorZmode do not have this limitation, you can place your files with subfolders like a ..rom-apk\app\xy.apk.
tweakos said:
What mode do you use? If you use saturatorAmode you need to place apk files in rom-apk dir WITHOUT subfolders , example - if you put xy.apk in ...rom-apk\app\xy.apk - YOU get NOTHING, but if you put xy.apk in ...rom-apk\xy.apk - it should be fine.
saturatorZmode do not have this limitation, you can place your files with subfolders like a ..rom-apk\app\xy.apk.
Click to expand...
Click to collapse
I have tried both without subdirs.
Sent from my HTC HD2 using XDA Premium App
What version of windows? Are you have java sdk installed?
Oh....i think i know what is the problem(maybe),on your screenshot you have path this contain 2 saturator folder,just place saturator folder on root of your hard drive and that`s it.
First of thanks for your contribution and making our lives easier.
I have tried to use your app without succes, as mentioned in previous posts all seems to go well but just like others i end up with all apk`s extracted in the saturated folder and the rom-apk folder is empty. Would it be possible this is because of Windows 7 64?
Edit: in SaturatorAmode things seem to work, however when i repack the build with changed apk`s i start missing a lot of apps in the build. The SaturatorZmode doesn't seem to work at all leaving extracted apk files in the saturated folder.
Any way to resaturate a NAND backup that we can then restore so we don't need to reinstall everything?
my wallpaper before and after
thanks a lot! Flashing tytungs nexus rom saturated ;D hope it works
Edit:
Bootloop, damn it
Saturatorzmode... Doesn't do another ng it just stays a extracting for hours.... And when I use SaturatorAmode each and every of my all file goes missing.... What am I doing wrong please help me out?? ... Only way to enhance my pics is to copy the pics it self
Sent from my HTC HD2 using XDA App
**This is for system apk's, not for market ones. To modify apps you've downloaded and installed, you will need a program like the fantastic Apk Manager, since non-system apps are signed and have to be resigned after getting messed with**
*MY TYPICAL DISCLAIMER!*
I AM NOT A DEV! I just like tinkering with this phone because I'm overall an extremely picky and obsessive person. I have no prior android experience (besides a little tinkering with my X10), and am in NO way an expert. But since I know how to mess with my phone a little bit and I've been asked to share, I will =) But follow these instructions at your own risk! I am not responsible for the untimely death of your phone, so please be cautious and careful, and if you have any questions about any step, before you try it, ask me or someone who knows! I don't want the blood of your dead phone on my hands! It's Christmas, after all! =)
These instructions are for Windows computers. Sorry, I'm just not familiar with mac or linux. =(
***Editing XML's***
So you want to modify something a little more complicated than just a PNG- there's something there you want gone, something too big or small, and you want to modify an XML. Here's what you need for starters:
7zip for your computer
Root explorer for your phone
apktool and apktool-install-windows for your computer from here
-Install it to your computer, as described in the link. (Just unpacking the items into c:/Windows is easiest)
Hex editor for your computer (I really like Notepad++)
For an example, I will be using the HORRIBLE yellow pages infiltration of the LG Nitro, thanks to surely some agreement between AT&T and YP. One example is the contacts list, where AT&T in its infinite wisdom has decided that the most important contact of all is the yellow pages, being the only permanent contact stuck in your list, shrinking your visible actual contacts list:
{
"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"
}
I don't like it, and I want it gone. I've already uninstalled yellow pages, and the dead button is still there! I will edit an XML to remove it =)
1.) Copy the apk you want to modify from your phone (using root explorer) and transfer to your computer
In this case, I wanted my Contacts.apk, which is in /system/app. Keep a copy safe somewhere, just in case something goes wrong, or you want to revert back to the original apk. The vast majority of system apps are in the /system/app folder, with the major exception of framework-res.apk. This is the phone’s BIG cajone in /system/framework, and as such, should be handled with utmost care. Messing with framework-res.apk incorrectly is an EASY way to brick your phone in a heartbeat.
2.) Decompile your apk
Put the apk in C:\ (I think you can put it in other places, but just for consistency, I'll say put it there =) ). Decompile it by using apktool. You can find more details elsewhere, but to keep it as brief as possible, here's how in a nutshell (there are other ways to do this, where to put files, etc, but for consistency's sake, this is how I do it):
-run cmd.exe
-in the command window, change your directory until you get all the way to C:\ (keep typing "cd.." and hitting enter until you're there)
-in the window type the following and hit enter:
apktool d nameofapk.apk
(In this case, type "apktool d Contacts.apk")
******IF YOU GET A LONG STRING OF "Could not decode attr value..." ENDING WITH "Can't find framework for package of id: 2. You must install proper framework files, see project website for more info." (like you do when decompiling some apk's like SystemUI.apk) SKIP TO THE END FOR SPECIAL INSTRUCTIONS******
-the decompiled apk will now be extracted into a folder of the same name without the .apk extension (here, C:\Contacts)
3.) Find and edit the XML you want!
Now that it's been decompiled, the XML will be magically readable with Notepad++ (before decompiling, opening XML's with a hex editor produces gibberish. Now, you can actually read the text of it!). In this case, the XML we want to edit is here:
C:\Contacts\res\layout-finger\contacts_list_item_top_search_att.xml
In this XML, lines 14, 15 and 16 refer to that stupid bar in Contacts.apk with the yellow pages and ICE buttons. Included in lines 14, 15 and 16 are: android:layout_height="60.0dip", android:layout_height="51.0dip", and android:layout_height="51.0dip", respectively.
Change all 3 numerical values to 0.0 in all three cases, so now in lines 14, 15 and 16, it shows: android:layout_height="0.0dip", android:layout_height="0.0dip", and android:layout_height="0.0dip", instead.
Save the changes to this file and close! (You should have your original apk backed up somewhere else already!)
4.) Recompile the apk with the newly edited XML in it!
In cmd.exe (still in directory C:\), type:
apktool b nameofapkfolder
*do NOT type nameofapk.apk. Leave off the .apk extension! You're recompiling the decompiled folder, NOT the .apk! For example, here to rebuild Contacts, type
apktool b Contacts
This can take a while. It's okay if you get some "has no default translation" lines popping up. Just ignore them.
Now, in that same decompiled folder, you will have a new "build" folder. Inside are your newly recompiled files for your apk!
5.) Find the recompiled XML from the build folder and move it into a copy of the original .apk!
It will be in the same organization as it was within the .apk. For example, that XML we edited is located here:
C:\Contacts\build\apk\res\layout-finger\contacts_list_item_top_search_att.xml
If you open this recompiled XML, you'll see that it's back to being gibberish. That's because it's been successfully recompiled!
Now, find your original, unedited .apk, right click, 7zip, and open archive. Navigate to the original XML in that apk and drag and drop your newly edited/recompiled XML into that folder, letting it overwrite the original one! This is your newly edited .apk with the changes you want in your XML!
6.) Put this newly modified apk back onto your phone. Using root explorer, copy the new apk into the /system folder of your phone.
7.) CHANGE THE PERMISSIONS of the apk to match those of the original apk in /system/app.
In this case, long press on the Contacts.apk, select permissions, and select the check boxes as follows- Owner: Read, Write; Group: Read; Others: Read. This matches the permissions of Contacts.apk in /system/app
8.) Move the new apk into /system/app, and let it overwrite the original!
9.) Restart your phone!
Voila! The stupid bar is gone, and I have a little more room for my REAL contacts!
******SPECIAL INSTRUCTIONS FOR DECOMPILING ERROR******
Some apk's (like SystemUI.apk) require OTHER (framework) apk's be "installed" in order to decompile properly. To install an apk, put it in C:\, then type the following command in cmd.exe when in directory C:\:
apktool if nameofapk.apk
But which other apk needs to be installed?? The secret is that when you try to decompile your apk and it produces those errors, apktool will actually tell you (in its way) what other apk is needed! For example, decompiling SystemUI.apk results in notifications ending in this:
"Can't find framework for package of id: 2. You must install proper framework files..."
id: 2 is your key. In /system/framework, there are 3 other apk's besides framework-res.apk. These are:
RES_cappuccino.apk
RES_model.apk
RES_sui.apk
If you install framework-res.apk:
apktool if framework-res.apk
you get the following statement:
I: Framework installed to: C:\Users\User\apktool\framework\1.apk
This means that id: 1 = framework-res.apk! If you install the other 3 apk's (RES_cappuccino, model, and sui), you'll find that they are:
RES_cappuccino.apk = id: 2
RES_model.apk = id: 4
RES_sui.apk = id: 3
SO, when you try to decompile SystemUI.apk, and it says "Can't find framework for package of id: 2," it's asking that you first install RES_cappuccino.apk before decompiling SystemUI.apk! So before apktool d SystemUI.apk, type:
apktool if RES_cappuccino.apk
It will say, "Framework installed to C:\Users\User\apktool\framework\2.apk
And now, when you decompile SystemUI.apk, it will work (as will recompiling! =) )
Good luck! Godspeed! =)
This is awesome! Thank you very much.
I've successfully managed use Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux) for SystemUI.apk, but it did create additional useless folders.
One question though, what about resources.arsc file?
According to apk manager that file needs to be recreated when .xml files are changed.
It seems like that's the case when you have significant changes to the xml, like deleting lines or adding code, etc. When I just change values in the xml, it doesn't seem to require rewriting resources (which I'm not super comfortable with), so until we get a recovery mode, I just try to be creative in how I edit xml's to get what I want by just changing values =)
NICE!! Great job sir!
Did you ever get rid of the headphones icon, by the way? It shouldn't be too tricky
itiskonrad said:
Did you ever get rid of the headphones icon, by the way? It shouldn't be too tricky
Click to expand...
Click to collapse
Well, kind of...I do now know how to remove it, unfortunately it will have to wait until apktool get updated to v1.4.4, because current version does not work for our resources-res.apk (we seem to have ICS formatted .apk's). I already twice soft bricked my phone trying recompile this apk
Once we get the proper tool, we might start getting some interesting mods, like more quick settings for instance.
itiskonrad, can you post the actual file for removing yp from contacts. I am on mac with no pc available at the moment.
Sure thing! Here:
Contacts - No Yellow Pages
Be sure to follow steps 6-9, though! Especially the part about changing permissions!
Great thanks. Worked great.
Sent from my LG-P930 using Tapatalk
I couldnt get the new APK Manager which is now called APK Tools to work properly. Since the original link didnt work i decided to search out the old APK Manager to give it a shot, and it worked beautifully! For those that want the old one, you can get it here:
http://www.gamefront.com/files/17870566
i used it to change my contact list to black with white text. Much nicer!
itiskonrad said:
***Editing XML's***
3.) Find and edit the XML you want!
Now that it's been decompiled, the XML will be magically readable with Notepad++ (before decompiling, opening XML's with a hex editor produces gibberish. Now, you can actually read the text of it!). In this case, the XML we want to edit is here:
C:\Contacts\res\layout-finger\contacts_list_item_top_search_att.xml
Click to expand...
Click to collapse
Hi, I have a problem, I can not correctly open the XML files from ROM. I want to edit the file primary_text_dark.xml of framework-res \ res \ I can not see it correctly. Help me please, the XML files from ROM, I can not correctly open and edit in any xml editor. What is the trick?
example
https://lh5.googleusercontent.com/-Mlx3d1--g0E/T7yNMCOcCyI/AAAAAAAAAcE/aIV-2zHN8x8/s720/fotka%2520%252014.jpg
What you are looking at is a non-decompiled xml that is unreadable. You need to first decompile the apk which carries the xml you want to edit in order for it to be readable. You first have to complete steps 1 and 2 and decompile framework-res.apk as described in the guide in order to get a readable primary_text_dark.xml.
Thank you for your advice.
Error...
Hello everyone!
Dude, thanks for the post. It is very clear!
I have a question. I did everything step by step to decompile the framework-res and edit it, but when I try to recompile it, the APK folder created inside the new folder BUILD is empty.
What can have happened?
(translation via Google Translate)
Hmm, not sure. Try decompiling and recompiling immediately after without making any changes, just to make sure the commands are working. If that doesn't work, maybe there's something wrong with the commands? For example, I know it sounds stupid, but make sure to recompile, you're typing
apktool b framework-res
NOT
apktool b framework-res.apk
Thank you Itiskonrad!
Yes, the commands are working. Decompiled and compiled again without changes, and everything went well.
I realized that change depending on what I do when this error occurs. Now I'm changing slowly and has not worked.
The strange thing is that I do not see the changes on the device. My intention is to change the entire text of the notifications in order to use a black theme in my status bar.
I made a theme based on UotKitchen and I'm improving, but notifications such as downloads and ongoing calls persist with the font color black, which makes their visibility.
I will continue testing until something works!
Big hug!
(translation via Google Translate)
itiskonrad,
Do you use an ICS leak? Could you please modify status bar apk and remove carrier from there?
Shouldn't be the final APK zipaligned?
Thanks, great
[Guide/Tutorial][17/06/12]How to make "basic" theming mods + .9.png tutorial
If you find this guide useful then please rate the thread, i dont really care about thanks, thanks.
Give a man a theme and he can flash for a day.
Teach him how to theme and he can flash for a lifetime.
{
"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"
}
-------------------------------------------------------------------------------------------
"What's in the guide??"
*Basic image editing
*Using UOT kitchen to change the battery icons
*Popular image names and locations (GB)
*How to decompile using apk manager4.9
*Editing .9.png's
*How to use the universal theme.zip
*Create a batch Hue action in Photoshop
-------------------------------------------------------------------------------------------
I'm constantly seeing people asking for minor changes to ROMS, Themes, Mods etc, so i thought i would post this to let the talented people get on with what they do best, and the rest of us can stop harassing them for simple tasks that we are all capable of ourselves.
"Could you add these images from this ROM to your theme?"
"Can you change the colour of the battery in you ROM?"
"Is it possible to have different status bar colour?"
Well people it's time to learn some basic theming/modding/skinning, whatever you want to call it.Lets say you want to change the colour of the battery....
What you will need:
*7zip (free)
*Greenfish icon editor pro (free/ windows) or *Gimp (free/ all platforms)
Getting going:
[1]
Firstly open up your ROM/Theme/Mod with 7zip and navigate to:
"system/framework/"
*If framework-res is a folder drog and drop to a suitable location on you pc.
*If it is an .apk then extract it and unpack.
TIP: drag it out then right click>7zip>extract to "***".
TIP2: Create a copy of this folder in case you make a mistake!!
[2]
Now navigate into "framework-res/res/drawable-hdpi/", in here are your battery images named "stat_sys_battery.png"
[3]
Open up Greenfish/Gimp, and drag across the images you want to adjust.
[Greenfish] Select Filter>Hue/Saturation
In the window that opens adjust the properties until you get your desired effect.
Save and close.
[Gimp] Select tools>color tools>hue-saturation
In the window that opens adjust the properties until you get your desired effect.
Save and close.
[4]
When your happy with the results open up(NOT EXTRACT!!) the Universal Theme template provided using 7zip and navigate to-
"system/framework/framework-res.apk/res/drawable-hdpi/"
Drag the newly adjusted images across.
Close and place on your sdcard to be flashed from recovery.
-------------------------------------------------------------------------------------------Now lets say you want to use different signal images....
[1]
Get the ROM/Theme/Mod containing the images you want to use
Open up with 7zip and navigate to "system/app/systemUI.apk/res/drawable-hdpi/"
in here are your signal images named "stat_sys_signal.png"
[2]
Open up(NOT EXTRACT!!) the Universal Theme template provided using 7zip and navigate to-
"system/app/systemUI.apk/res/drawable-hdpi/"
Drag the desired images across.
Close and place on your sdcard to be flashed from recovery.
-------------------------------------------------------------------------------------------
That was easy was'nt it!
There are free software programs out there like gimp that let you batch process images but im not aware of the methods used, if anyone is then please post.
Please feel free to post helpful info and ask questions about locations of images or anything else related. Hopefully myself or anyone else in the know will help.
If you want to go deeper into theme-ing here is an amazing guide:
http://forum.xda-developers.com/showthread.php?t=916814
-------------------------------------------------------------------------------------------
>>> Universal Theme empty template <<<
Thanks to JR soft and also Intronauta for universal theme http://www.htcmania.com/showthread.php?t=258333 .Based on the "VillainTheme system" tool by VillainTeam. More info etc, head to www.villainrom.co.uk.
dully79 said:
I'm constantly seeing people asking for minor changes to ROMS, Themes, Mods etc, so i thought i would post this to let the talented people get on with what they do best, and the rest of us can stop harassing them for simple tasks that we are all capable of ourselves.
"Could you add these images from this ROM to your theme?"
"Can you change the colour of the battery in you ROM?"
"Is it possible to have different status bar colour?"
Well people it's time to learn some basic theming/modding/skinning, whatever you want to call it. Ill add more info to this as necessary.
Please feel free to post helpful info and ask question about locations of images or anything else related. Hopefully myself or anyone else in the know will help.
Like i said is is a very basic guide, if you want to go deeper into it, here is an amazing guide:
http://forum.xda-developers.com/showthread.php?t=916814
>>> Universal Theme empty template <<<
Thanks to JR soft and also Intronauta for universal theme.(based on the "VillainTheme system" tool by VillainTeam. More info etc, head to www.villainrom.co.uk).
Hopefully this helps some people.
Click to expand...
Click to collapse
Thanks dully .Very usefull guide indeed.I use paint.net for changing colour but i found really usefull this empty template
And a little help.The only thing i do is to make the necessary changes png's or xml's into system/app or framework is that right?
Do i need anything else eg extras?
Thanks again!!!
This will come in useful. thanks
Your very welcome.
I use "actions" in photoshop for batch processing, but i also have another program which is really good called "AbleBatchConverter", unfortunately thats paid software.
Greenfish is ideal for minor adjustments- its a small file size, easy on resources, quick and has some good features, but best of all........it's free.
siberian tiger said:
Thanks dully .Very usefull guide indeed.I use paint.net for changing colour but i found really usefull this empty template
And a little help.The only thing i do is to make the necessary changes png's or xml's into system/app or framework is that right?
Do i need anything else eg extras?
Thanks again!!!
Click to expand...
Click to collapse
If you put any xml's into the framework folders there is a good chance it will break it from being "Universal"
The "XTRAS" depends on what your doing.
The "XTRAS" folder is where you put apk's to be installed instead of just images in the system folder.
Example how to use "XTRAS" folder:
Open "Vending.apk"
Goto "res/drawable-hdpi/"
Drag and drop in images with matching names
Close apk
Open UT empty template
Goto "XTRAS/app/
Drag and drop Vending.apk inside
Close and place on sdcard for flashing
When flashed this will install "Vending.apk" into "system/app/"
Hope this helps.
Always here to help and share my friend...!!!
===THANK YOU=== mate !
Universal-Flasher-tool_v3.0
Hello everyone!
This version of the template that you use (2.X) is somewhat outdated. Version 3.0 has many new features, and is much faster and safer.
http://www.multiupload.com/HOP6RWMNOB
Basically, has a new advanced configuration file (MOD.config) where you can enable / disable functions (more information inside the file).
Have also been replaced binaries zip and busybox with a new binary 7z, much faster. The process is much faster now than before.
It also supports theming non-system applications (though not recommended).
Enjoy it!!!
jrsoft said:
Hello everyone!
This version of the template that you use (2.X) is somewhat outdated. Version 3.0 has many new features, and is much faster and safer.
http://www.multiupload.com/HOP6RWMNOB
Basically, has a new advanced configuration file (MOD.config) where you can enable / disable functions (more information inside the file).
Have also been replaced binaries zip and busybox with a new binary 7z, much faster. The process is much faster now than before.
It also supports theming non-system applications (though not recommended).
Enjoy it!!!
Click to expand...
Click to collapse
Does it support "sdcard"?
The last script supported "emmc", that's why I still use v.2*
dully79 said:
Does it support "sdcard"?
The last script supported "emmc", that's why I still use v.2*
Click to expand...
Click to collapse
Yes, the script autodetects the path of the sdcard. You can also manually set the path very easily to the new file MOD.config. Check this out:
Code:
[SDCARD PATH]
##########################################
default_internal_sdcard=/emmc
##########################################
##########################################
default_external_sdcard=/sdcard
##########################################
*It's not necessary to modify this
parameters unless you really need another
custom folder path for your sdcards in the
recovery. You should try before change
this!! and remember don't modify the
generic "sdcard" folder name in XTRAS.
The system will adapt the paths depending
of this values.
Cheers mate, your a legend. I could never get vrtheme to play nice but yours runs perfect.
If anyone previously downloaded the empty template, please download this version instead, it has many improvents over the old zip including speed.
Links:
>>>HERE<<<
And in the OP.
Thanks.
UOT kitchen battery
Ok lets say we want to change our battery for the new flavour of the month.
If you plan on using a battery theme from UOT kitchen then just follow "UOT Battery" instructions.
If you want to use a theme you found floating around the forums that doesn't work for your ROM then follow "Custom Battery".
UOT Battery
Here is how to gain a new battery theme using UOT kitchen:
FOR ICS AND ABOVE USE SYSTEMUI.APK
Get your "framework-res.apk", there are many methods to do this, i'll let you pick one.
Go HERE and click the "file upload" tab, select "system files" and upload your framework-res.apk. To avoid problems please us a CLEAN/UN-THEMED framework-res.apk
Now click the "battery" tab, check "use this mod", now choose whichever battery theme tickles your fancy.
Click the "summary" tab and "submit work to kitchen"
Wait for the kitchen to cook your files then flash your new battery theme from CWM
Reboot and enjoy
---------------------------------------------------------------------------------------------------
Custom Battery
Here is how to gain a new custom battery using UOT kitchen:
Download and open up the battery theme you would like to use using 7zip.
Navigate to "framework-res.apk/res/drawable-hdpi/"
Count how many "stat_sys_battery_*.png" and "stat_sys_battery_charge_*.png" are inside and remember or write it down(keep this window open).
Get your "framework-res.apk", there are many methods to do this, i'll let you pick one.
Again navigate to "framework-res.apk/res/drawable-hdpi/" and count how many "stat_sys_battery_*.png" and "stat_sys_battery_charge_*.png" are inside, then close.
If there is the same number of images in both files then goto "UT.zip" below, if not continue to step 7.
Go HERE and click the "file upload" tab, select "system files" and upload your framework-res.apk. To avoid problems please us a CLEAN/UN-THEMED framework-res.apk
Now click the "battery" tab, check "use this mod", now find a battery theme on UOT that uses the same number of images as what you wrote down earlier.
If applicable scroll down to the bottom and select a charging animation style, I would reccomend hybrid.
Click the "summary" tab and "submit work to kitchen"
Once your theme is cooked open up the UOT.zip with 7zip and navigate to "framework-res.apk/res/drawable-hdpi/".
Now select all the battery images from the window you left open earlier and drag and drop them onto the UOT.zip window, click yes to confirm and close.
Now you have a modified framework-res.apk that will correctly display all the battery images, just simply flash from CWM recovery.
---------------------------------------------------------------------------------------------------
UT.zip
Download the empty template from the OP.
Open up the empty template and navigate to "framework-res.apk/res/drawable-hdpi/". If the directory doesn't exist just simply create the folders being case-sensitive.
Now select all the battery images from the window you left open earlier and drag and drop them onto the empty template window, click yes to confirm and close.
Now you have a universal theme.zip that will theme battery images on your ROM.
Here is a link for a esk02k's CWM flashable glass orb battery mod zip, it contains 100 discharging and 100 charging png's:
esk02k battery orb mod
Preview
And here is a link for my Power Battery mod, it contains 100 discharging and 100 charging png's:
Phone Candy Power Battery
Preview
Both links are in universal theme format.
---------------------------------------------------------------------------------------------------
Thanks for the guide, dully79. Got a quick question...
I am currently on a stock (but rooted) 2.3.4 rom on my international Galaxy S2. I am pretty noobish at hacking around with the Galaxy S2, so if I may.
Rather than editing framework-res.apk from a rom and then flashing the whole thing in CWM, can I just extract the framework-res.apk from the rom running on the phone at the moment, using Root Explorer, edit the PNG files that I want, save the PNGs back into framework-res.apk and then just overwrite framework-res.apk on the phone (again using Root Explorer), reboot the phone and then enjoy the changes I've made?
Or is that asking for a disaster?
I apologise for being incredibly ignorant in the ways of Android modding. I'm still getting used to all this Android modding stuff. Modding the Nokia N900 was no trouble at all!
I have made a full backup of the phone on CWM, and I have one of them USB Jigs, just in case...
I wouldn't recommend it as your framework-res.apk is constantly being called by various things. I tried it once using root explorer on my old HTC hero and ended up in a world of pain.
If you want to do edits on board the best thing would probably be:
1- copy and paste your framework-res on your sd.
2- extract your framework and make the edits you want.
3- download the UT empty template from OP and extract that, if the files are extracted individually instead of into a folder then put them into folder.
4- copy your new images into the extracted empty template in MORPH/system/framework/framework-res.apk/res/drawable-hdpi/ (if the directory doesn't exist just create it being case-sensitive).
5- zip up the files INSIDE the extracted empty template folder using store add the compression method (beware that some zip apps don't seem to play nice with cwm).
6- flash from cwm
This method will only replace the images you added into the extracted empty template.
Hope this helps, if you need anything else just ask.
Thanks for the reply
So the empty theme template will work ok with the stock (but rooted) 2.3.4 Touchwiz rom that my phone shipped with?
Will the same method you described above also work for systemui.apk so I can edit the green Wifi/Bluetooth/GPS/Sound/Auto Rotation switches in the notification tray?
Thanks again I'm looking forward to shifting the green-ness of a lot of the graphics - I'd much prefer blue!
Yes mate it will.
If you just want to change images use the MORPH folder with the correct directory to the images like described above.
And if you want to replace full apk's you place them in XTRAS.
Don't edit any .9.pngs, as in changing the hue, these need to be decompiled before editing.
You can swap compiled .9's for compiled .9's but be careful with them as these can cause force closes and boot loops. There are guides around xda about editing them.
Another thank you to you, dully79!
I've followed the instructions you laid out, and I've turned the stock battery level (and charging indicator) blue!
I'd post a picture, but I'm not allowed to yet. Gotta shift my forum training wheels.
But I assure you, it looks goooooooood...
This is only just the beginning...
I'm going to make every single graphic a different colour, with lens flare! /vomits
Thanks again for this guide, this has started me off on the journey of Android discovery!
Crugath said:
Another thank you to you, dully79!
I've followed the instructions you laid out, and I've turned the stock battery level (and charging indicator) blue!
I'd post a picture, but I'm not allowed to yet. Gotta shift my forum training wheels.
But I assure you, it looks goooooooood...
This is only just the beginning...
I'm going to make every single graphic a different colour, with lens flare! /vomits
Thanks again for this guide, this has started me off on the journey of Android discovery!
Click to expand...
Click to collapse
No probs mate, I'm more than happy to pass on what I've learned.
Don't hesitate to ask if you needed owt.
Seeing as you've offered, I think I'll take you up on the offer to answer more questions! lol...
I am trying to change the progress bar colour. I can find progressbar_indeterminate#.png, which is fine, but I can't find the regular solid progress bar. Do you know what that's called and where it might live?
And another, I'm trying to change the colour of the background of a slider for things like changing volume in the settings, I also can't find the PNG for that. If you know where I can look, please let me know!
That's found in progress_horizontal.xml in framework-res.apk/res/drawable.
To make edits you need to decompile first to make the xml readable, then re compile.
Here is a blue progress bar with a grey background from my phone candy theme if you don't want to edit xmls, just extract it from the zip and put it in the correct directory in the MORPH folder.
Ultimate Editing and Theming Guide
Preliminary Requirements:-
PC with Windows(Please avoid Windows Vista)
Java JRE or JDK
APK Multitool
framework-res.apk, SystemUI.apk, twframework-res.apk for installing
7-zip
Notepad++
Android Device for testing
Photoshop or equivalent image editing software
android-sdk(for 9 png editing)
Lots and lots of patience and mind
What this guide includes:-
1. Easiest Decompiling and Recompiling Guide *Must Read before continuing*
2. Explanation of 9 pngs and how to edit or make them
3. How to Batch edit pngs (Not 9 pngs) (Changing color, etc)
4. How to change path thickness of Pattern Lockscreen to ICS style
First Step:
Decompiling: [MUST READ]
We are assuming that you have installed JAVA, Android SDK and apk-multitool without any problems
1. Copy your mobile's framework-res.apk, SystemUI.apk and twframework-res.apk in others folder in directory where you have extracted apk-multiool
2. Open Setup.bat. Choose 2 :- Installing Framework-res
{
"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"
}
Setup.bat
Choose 1 (framework-res.apk)
Choose 2 (twframework-res.apk)
Choose 4 (SystemUI.apk)
Window will close each time you choose an option
You will have to restart Setup.bat each time
3. Now place the apk you want to edit in place-apk-here-for-modding
4. Now open script.bat. (If you see any error, either you haven't installed JAVA and SDK[adb] or they aren't implented, Please install them properly before continuing). Click any key to continue
APK-Multitool Window
5. You will see the above window. Now, make sure you have installed all frameworks and Compression level is set to 9.
6. Now, we will choose our project. Click 24. A list of files present in place-apk-here-for-modding will be in front of you. Choose any file
7. Click on 9. Now decompiling will be in process.
8. After it is complete, go to projects folder, you will see a folder with the name of apk you decompiled
Decompiled apk example
If it is decompiled properly, then there will be apktool.yml file in it
9. Do your modifications. Now, you can edit .9.png files (they will be discussed later) and xml files which were uneditable first
You will notice that there will be many new folders which weren't present in compiled form of apk. These all folders are generated from a file called resources.arsc present in compiled form which is absent in decompiled form
Such an example is of values folder which contains crucial xml files like styles.xml, strings.xml, ids.xml, etc
Always open xml files with Notepad++, it will mark commands and syntax making it look aligned and making it easy to understand
Example of decompiled xml file
Also, you can edit 9 patch files also which will be changed from now on
Example:-
We will discuss 9 png in detail later on
10. After you have done your modifications and you are ready to recompile the app, choose 11 (Compile System APK) if you are editing System App or 12(Compile Non-System App) if you are editing other than System App
11. a) If System App:-
After some time it will ask that if you want to copy additional files other than signatures to ensure less amount of errors, then choose y
After extracting some files, it will ask you to delete files from keep folder
Simply go to keep folder,
If you edited any pngs and there are many and you are lazy enough to delete one by one, then delete the whole folder in which you edited pngs
If you edited any xml file, then delete that xml file AND ALSO DELETE RESOURCES.ARSC
Why? Because we told that values and several other folders are generated from resources.arsc while decompiling
Now, if we don't delete resources.arsc, the modification we did in values folder will be reverted to original state
After doing this, go to script.bat again and press any key to continue
11. b)If its not system app:
Just recompile it and sign it man through the menu in apk multitool man.
It is easy as hell. Tutorial of non-system app has been ended here
12. Now, you will get another apk name System_ apkname.apk
Open both apks as archives by 7-zip
13. Last and most important step:-
Just drop the files you edited from new apk to old apk in correct folders. By now, you may have understood that resouces.arsc INCLUDES your edited xmls
14. Now, the final apk is not System_apkname.apk but apkname.apk (the original file you started with). Push it and enjoy
9 PNG Discussion
These are special types of pngs that can be stretched to fit the need of program or different scenarios or cases. It contains 1 pixel lines on each border of different lengths for different things
As told above, we can't edit 9 png in compiled form as it will lose these lines which define its properties. So, we first need to decompile apk in order to edit 9 pngs
So, after decompiling apk, open 9 png in Photoshop and select the part inside that 1 px border and edit anything you want (Hue, Saturation, Bevel, Emboss, ANYTHING)
Now save it (save it as a normal png and then rename it as .9.png because photoshop doesn't recognise 9 png extension and image will loose its RGB format)
Explanation of 9 png:-
You can read this for more information
If you have doubt that you have gone wrong somewhere or you have made a new png from scratch and want to test if it is correct or not:
(Check all 9 png files you edit as they can cause Force Closes or bootloops)
Go to folder where you extracted android-sdk and go to tools folder and open draw9patch.bat
A window like this will open up:-
Drop you 9 png here
A new window will open with you 9 png on it
Tick on show bad patches
If you see red rectangles, you have a bad 9 patch image. You will need to delete or add those lines in png to remove all red boxes. If you want to delete, press Shift and start moving cursor over lines you want to delete. You can choose method of hit and trial to remove all rectangles and move the lower scale to see how your image size is adjusted
Or you can do what I do:
1. Remove all lines
2. Add single dot on top centre and left centre border of image (That can be taken as stretchable area)
3. Add lines on right and bottom of image where you want to fill content. Now, click on Show Content
The purple area you see in image is the content area (Text will be filled there. Eg:- Popup Menu)
4. Now, you can adjust these lines acoording to your need that what you want for stretchable area and content area until an unless there comes an red triangle
5. When it is done. Save the file. DONE
Easy, isn't it?
That's what theming is
Batch Editing pngs in Photoshop
Well the scenario is you have 200 pngs and you want to change their color, hue, add effect to them, etc. Definitely not worth the time you will spent doing this one by one. So, here, I will cover how to batch apply same edits on to your infinite pngs. Here, I am taking example of changing color of battery png from green to purple, you can apply any attribute to your image in the same way. I repeat it is not for .9.png files. Read above guide for reference
Let's start
1. First copy all your pngs you need to edit in a separate folder. I have made a folder named Battery Base and pasted my all pngs of battery there.
Now create another folder where your edited pngs will be saved. For eg:- Battery Done. (Don't create it inside Battery Base folder)
2. Open Adobe Photoshop and Choose Window>Actions or Alt+F9
3. Click on the note like file (Create new Action)
Rename it to anything you want . I have chosen Battery_color
Then click on Record. Now, you will see that red circle is enabled and now everything you do on image will be recorded and will be applied on each image.
4. Now, do this very carefully, don't miss any step.
We will do every thing that we want Photoshop to do with each file we want to edit.
a) So, first we want Photoshop to open the image. So , click on Open and choose any png from Battery Base folder (Choose a file with more color so that you know what color exactly your file will be after editing. That is why I chose 90 percent battery here).
b) Now, after opening, we want to change Color of png from green to purple. So, choose Image>Adjustment>Hue and Saturation or Ctrl+U
A dialog box with 3 sliders will appear. Move upper slider to change color. You can move other slider to change saturation and brightness if you want. Now, if you got it right, click on OK.
Every step of yours is being recorded, so don't do unnecessary stuff you don't want to do on other images. Nonetheless, if you have done it, then Drop down the Battery Base Action in action palette and you will see your every action there, If you want to delete any action , you can delete it from there. You can also add any action before pre completed action by clicking above that action and performing it.
Now, you can do anything you want to be done on your rest of pngs.
c) Now, we want Photoshop to save this png to carry on working on others. So, Go to File>Save as... and save it as a png in Battery Done folder. Photoshop will ask you to choose, so choose smallest compression and no interlace.
d) Image is saved but we also want Photoshop to close the png so that it does not open 200 tabs for editing 200 pngs. So, click on close (Small cross on title bar of png). If, it asks that do you want to save changes to png . Say no, because if you say yes, the png in Battery Base will be changes and when batch processing is done, that png in Battery Done will be of different color that all others.And also, your all green pngs in Battery Base folder will turn purple too. But we want purple images in Battery Done and green in Battery Base.
5. Now, we hae done what we want, so, we will stop recording the Action. Click on that square in Actions Palette.
6. Fun Starts. Now we will do the batch processing.
Go to File>Automate>Batch
In the dialog box, Choose the action to be Battery_Color (or obiviously any action you created)
Source folder: Battery Base
Destination Folder: Battery Done
Tick both Override Action 'Open' commands and Override Action 'Save as' commands
Click on OK. Sit back for 3 to 5 minutes(204 pngs) and TADA
You can apply any action in same way. Such as bevel, glossy, pale, etc to innumerous amount of pngs
Guide to change path thickness of Pattern Lockscreen to ICS Style
Guide to changing path thickness of Pattern Lockscreen to ICS style
I wandered places searching this off. I found some traces in direction of my destiny but none of them worked fully correctly
So, as stated, I searched a lot for this mod and came face to face with failures and smali errors. So, I had to figure it out myself some modification to do in it to make it work.
Note: IT is not COMPLETELY my mod but I have done modifications in it to make it work. This is based on a guide for Froyo outside of XDA.
Pre-Requisites:
1. PC with Java JDK or JRE
2. Deodexed ROM
3. 7-Zip
4. classes.dex decompiling tool
5. Notepad++
6. Patience
7. Carefulness for editing smali files
Let's Start
1. First we would have to decompile classes.dex inside framework.jar
For that, you can use my Tool ROM Tool v2
First using 7zip, Right click on your framework.jar and open it as archive and drag and drop classes.dex in input folder of the tool
(Note: If you don't have classes.dex in framework.jar [only META-INF and preloaded-classes.dex], then your framework isn't deodexed)
Now, open Script.bat and choose 1 (Decompile classes.dex)
2. Now, we will make the changes. Go to decompiled folder and go to \classout\com\android\internal\widget and open LockPatternView.smali in Notepad++
Search for mDiameterFactor:F [Ctrl+F]
See the code above it.
It should be like this:-
Code:
const[COLOR="Red"]/high16[/COLOR] v2, 0x3f00
If it is, then you will have to remove red part /high 16
Because it will not allow the change of code we will be doing which will have a different hexadecimal value which will not be supported till this code is in effect
Now, it will look like this:-
Code:
const v2, 0x[COLOR="Red"]3f00[/COLOR]
Now, we will change the thickness value 3f00 to 3dcccccd
Final code will look like this
Code:
const v2, 0x3dcccccd
Save it
I am attaching final and before smali for comparison below.
View attachment 1936707
(Note: If you don't have /high 16, it's good , then just just change the value and save)
3. Go to Script.bat again and choose 2 (Recompile classes.dex) and after it's done, you will get classes.dex
Drop it in framework.jar
4. Push framewotk.jar in /system/framework
Eg:
Copy it in platform-tools folder of android SDK and type following with pressing Enter after each command
Code:
adb remount
adb push framework.jar /system/framework/
adb shell chmod 644 /system/framework/framework.jar
adb shell killall system_sever
Last command will Hot Reboot your phone to apply changes. It is fast and better than rebooting phone.
5. Enjoy
Screenshots
Before
After
Credits
A member from other forum to answer a question to other member of that forum
Google for letting me search somethings
Samsung Galaxy Ace s5830i members for supporting me so much
This is a work in progress.
Will add more things soon
Credits:
@d3cka for teaching best abour 9 pngs
@deathnotice01 for helping me
Miscellaneous Google and xda posts
Reserved for FAQ about Apk Multitool and theming
Great things upcoming by you? huh! :good: keep your work on Hope to see more from you
Hmmm..batch editing works in gimp
-------------
"Blah blah blah blah blahblah blah blah"-No One
74M3NUMB3RS said:
Hmmm..batch editing works in gimp
-------------
"Blah blah blah blah blahblah blah blah"-No One
Click to expand...
Click to collapse
But I find Photoshop more user friendly and I am used to it.
For instance, I themed whole phone like WP8 in 8 hours in PS. That would have taken about 15 hours in Gimp
iamareebjamal said:
But I find Photoshop more user friendly and I am used to it.
For instance, I themed whole phone like WP8 in 8 hours in PS. That would have taken about 15 hours in Gimp
Click to expand...
Click to collapse
Well its the best free alternative for me...
And I'm not saying gimp is better than PS...
I dunno y u r teasing it
I just said if the batch editing works in gimp :sly:
And u were like PS is better than gimp
Sent un Galaxia Tab Dos Siete Pun Uno
74M3NUMB3RS said:
Well its the best free alternative for me...
And I'm not saying gimp is better than PS...
I dunno y u r teasing it
I just said if the batch editing works in gimp :sly:
And u were like PS is better than gimp
Sent un Galaxia Tab Dos Siete Pun Uno
Click to expand...
Click to collapse
Sorry
iamareebjamal said:
Sorry
Click to expand...
Click to collapse
Sorry too
I just wanna know if it works in gimp
Sent un Galaxia Tab Dos Siete Pun Uno
Commenting bcz I want this in my participated tab great job too!
Sent via the muffin launch _/^\_
74M3NUMB3RS said:
Sorry too
I just wanna know if it works in gimp
Sent un Galaxia Tab Dos Siete Pun Uno
Click to expand...
Click to collapse
If you are asking, then yes, we can batch edit in Gimp
http://www.makeuseof.com/tag/use-gimp-to-batch-edit-your-images-windows-specific-instructions/
nice man !
This deserves a bookmark
Any suggestions about adding any guide?
iamareebjamal said:
Any suggestions about adding any guide?
Click to expand...
Click to collapse
U cud add a guide for changing layouts of apps like framework and all
Never seen a guide for it but people will always need one for reference ..:thumbup:
Sent from my GT-S5360 using xda app-developers app
anubhavrev said:
U cud add a guide for changing layouts of apps like framework and all
Never seen a guide for it but people will always need one for reference ..:thumbup:
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
Challenge accepted
But I need more reference like changing layout of framework like what? Rearranging items or theming the UI? Or changing the whole UI(Oppa dcsms style)?
First two I can make but I truly don't know how to change UI like dcsms, evanlocked and b12h... do!
Thanks a lot! I was searching a useful guide for editing .9.png files without this miserable draw9patch.bat
I'll edit all my .9.png with Photoshop and only proceed to some verifications with this tool.
Your part about "Batch Editing pngs" is interesting too. I'm going to modify some battery pngs so...:good:
Thanks, but I don't think guide is serving the purpose greatly or reaching the masses, I should have created separate guides for separate topics
I'm modding a theme and I've just started .9.png files.
I modified the color in Photoshop and saved as .png then I renamed to .9.png as mentioned in the guide.
I dropped the file in better9patch.jar and I have the first picture ('before'). I saw red areas so I pressed Shift and highlighted the top and the left. Then I obtained the 2nd picture ('after').
Everything is fine? Can i save the file now?
Thanks for your advices!
Memphis_ said:
I'm modding a theme and I've just started .9.png files.
I modified the color in Photoshop and saved as .png then I renamed to .9.png as mentioned in the guide.
I dropped the file in better9patch.jar and I have the first picture ('before'). I saw red areas so I pressed Shift and highlighted the top and the left. Then I obtained the 2nd picture ('after').
Everything is fine? Can i save the file now?
Thanks for your advices!
Click to expand...
Click to collapse
Basically you've removed the stretchable part of image
It's not good
Just put one dot in upper center and left center. Can you please tell me the name of png you are editing to better assist you.
Thanks
Precious Guide
iamareebjamal said:
Basically you've removed the stretchable part of image
It's not good
Just put one dot in upper center and left center. Can you please tell me the name of png you are editing to better assist you.
Click to expand...
Click to collapse
Here is where the files is located: C:\Android\APKTool\theme_name\res\drawable\dropbox_ss_action_item_background_focused_holo_light.9.png
Could you please attach the corrected file?
Here is my file modified via Photoshop (blue to green): HERE
Original .9.png HERE
EDIT
If i compare my modified file with the original one the rendering is the same as my file named 'before'.
Dear all,
I have recently managed to modify Lloirs SlimBean 3.1 rom to both update the apps and adjust the themes, so I thought I would take the time to share how this can be done with you all.
This guide will not tell you how to build a rom from source, but instead how to initially ruin the perfectly good rom someone else made, and then eventually customise it to your little hearts content without ever having to ./make it.
The intent of the guide is to cover
rom.zip File structure
apks & apktool
SystemUI and framework-res.apk
Anything amazing I haven't thought of yet
The first thing to realise is that both the rom file that you flash and the .apk files within it are all basically .zip files and can be opened using 7zip or other linux variants like fileroller. So if all you want to do is open up the rom and poke around, then I suggest you do just that. Its a great place to start to try and get your head around what is going on in there!
I have tried to do all of these modifications with the minimum install of tools and whatnot, as I like to be as close to what is actually being done as possible. There are a variety of all in one tools available, and a quick search of XDA will find them. In my experience these tend to become outdated quite quickly or development stops. So best to learn from the basics, which means the lowest level of tool possible.
With all that said I strongly recommend getting your mits on Gimp-2.8, fileroller and apktool.
Code:
sudo apt-get install gimp file-roller
Apktool can be found from the Git - repository or the google code site,
http://code.google.com/p/android-apktool/ I'll add install instructions and info on this tool in the specific section. There is also an excellent XDA thread covering the progress iBotPeaches is making with the tool.
http://forum.xda-developers.com/showthread.php?t=1755243
rom.zip File Structure
WIP
OK lets get started with the basics. Download a flashable rom.zip file and start poking your nose where it didn't belong before. If your ready yo get down and dirty just go ahead and unzip it into its own folder. Depending on what rom.zip you have will depend on how much of the file structure below you will see:
{
"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"
}
and here we have the root of the flashable.zip starting from the top we have:
data: this contains anything that is already signed and not part of the original build but that we want to install with the rest of the rom
META-INF: Full of all the meta information you could ever dream of. This contains all the certification and signing files along with our most important file of the install script.
system: This contains all the files that actually make up our ROM so this is everything above the HAL (Hardware Abstraction Layer). In here are the goodies I will describe how to play with later.
boot.img: Is the all important kernel, if you are S-OFF this will flash on install, if not you will need to use fastboot to flash it separately.
So if your unhappy with all of this and want out of the woods already then you can just re-zip the files back together and they will work fine, no harm done. If not the lets move onto the easy folder data. I say easy because we can't break anything here, if you get it wrong then the packages here just won't install.
DATA
So as we can see above, we have a folder called app, which is full of a load of packages that I wanted to include into the rom, but and this is the important part. I didn't want this apps to be system apps, this means I wanted them to be easy to remove without using root access. As you will see system apps live somewhere else, not totally unlike the system/app folder :silly:. Another important point is that the apps/packages, I will use these terms interchangeably, that get installed from here are all signed, this means they have a signature in there meta.inf files saying that they have not been messed with. Most app developers will sign there work, to help keep it safe, and stop people from pirating it with such ease. All apps from the playstore are signed in such a manner. The apps in other folders must not be signed, but we will get back to that. If you have any apps or packages you have got the .apk from XDA thread or elsewhere this is one of the best places to put them if you want them to install with your rom.zip
So the truth be told, I have no idea what other folders you can put in aside from the app one, but I am sure there are plenty, if you find any let me know.
NEXT, we have the META-INF folder:
META-INF
Here as mentioned we have or CERT.SF which is a certification file, our MANIFEST.MF which is the manifest ie list of everything going into this rom, and CERT.RSA another signature file. DON'T BE MESSING WITH THESE. They are core to the install process, and generated by the build scripts used to create the rom in the first place. You can open and look at them all, which will help your general understanding and break nothing, however No saving the files.
Above is the full expanded file structure, again there is really nothing you want to mess with in here, but I'll explain what I know about them. First up is the:
Android folder files, which these cover the Over The Air (OTA) update information, this is just some data that identifies what version etc of the rom for what phone you are using. It used to make sure you get the right ota update, in this rom I haven't set up ota as I have literally no idea how.
google folders stashed in the second android folder are the updater files, this is effectively a list of what the recovery program is to do when installing the rom, so you will even find the lovely message that gets printed as your rom installs saying its all going well.
This leaves us with the most important of all the folders, the system folder. In here as mentioned before are all the golden nuggets that make the trove that is your rom. Lets take a peek.
As we would be hoping the folder is full of goodness! Taking it from the top we have:
SYSTEM
system/addon.d This contains shell scripts (Ones that would run in your terminal) here we have the 50 - slimupdate.sh slimupdate script, again for OTA but this backs up the hosts (I'll get to this later) file so that it is re-instated after the upgrade. Secondly we have the 81-aio_gapps.sh which backs up the gapps that you had installed before the ota update. So they can be put back afterwards. Feel free to open these look around, and if your not doing any ota they are pretty useless.
APP
system/app This is a very significant folder as it contains all the apps that will run as part of the system, in here you'll find the dialer phone.apk, the google search package velvet.apk, the google play store vending.apk and your text messenger mms.apk. All of these files are important, come unsigned as they used to be unavailable on the playstore, and for other important reasons I am unaware of. The important part is that when we start to think about editing them with apktool, or you make your own they stay unsigned them.
The system folder is protect as read only (-ro) so that these files are not available to be changed during normal use of the phone. Of course using esExplorer or another root explorer you can change the -ro mount setting to -rw allowing you to write to the folder as well, and so change the files.
I will be happy to answer any questions as to what .apk file relates to what if you are stuck at any point. You can remove and re-install these as you wish, but be warned remove the sytemUI.apk will result in very limited functionality on the phone, which is why I will be talking it up a bit later. Its also worth noting that different roms use different android versions of the .apk and they won't always play nicely together. Whats more some of the .apks are reliant on each other, for instance googles gallery.apk and camera.apk have cross funstionality, as do mms.apk, phone.apk, contacts.apk, and contactsprovider.apk, as they share usage and files.
BIN
Just like in your linux file directory the bin folder holds all the functions and programs that get called throughout the day to day use of android. As an example adb and the backuptool are in here. Again I would advise not messing with these files, but be aware that when your trying to add new packages or functionality to a rom you may find yourself adding files or functions in here.
/-- OK enough for now I'll get back to this --/
apks and apktool
OK so hopefully we now know where all the lovely .apk files are hiding within the file structure of our rom. Which don't get me wrong is nice enough in itself, but what we really really wanna do is open these bad boys up and start editing them just the way we like it.
The simplest way to do this is with 7zip or fileroller, you should be able to just double click pop them open, then navigate to the res folder where you will find all the folders with the .png and .9.png s for the gui systems in the app. If your using gimp or photoshop or pretty much any paint related software you can immediately go ahead and edit the .png files. The smart thing to do here is not to replace any files but edit and save them as the same resolution, as you may have noticed that the different res folders are separated into different resolutions and upright and sideways display. For the HOV most of what we want will always be in teh HDdpi or xHDdpi folders. Do Not Edit the .9.pngs As this will result in the failure later. This method is only really useful if your lazy, and only want to grey-scale a single image or what.
If you've got this far you probably want to be able to edit the .9.png s and start opening and changing the .xml code so that you can edit default backgrounds and text colours. To do this we will want the excellent apktool,
http://code.google.com/p/android-apktool/
This tool will unpack the .apk file and allow us to rebuild it as well, however it is rom specific to some degreee, as some .apks have been created using a different aapt file (Slim, some AOKPs) and so will require a more specific version. This may sound like a pain, but it can be dealt with super easily.
The slim one can be found here and has just recently been updated to handle Slim4.4 apks
https://github.com/SlimRoms/apktool
So how do I install, and then run these tools? How do I swap between slim and aosp or other .apktool versions?
First is first, download the version of the tools you want, either through direct link on the googlecode page or from downloading as .zip from the github page. Its worth noting that the latest apktool (v2) which works with java1.7 and can be downloaded from the github works slightly differently from the guide here, but its easy to work out how and is documented on the website.
I am going to assume we are too lazy to read the website, in which case stoppit go back read the website!
That done we can now run the install.sh script in terminal which will create an apktool folder where we can run the tool to our delight.
Importantly it should also put an aapt, apktool, and apktool,jar file into our /usr/local/bin/
Please note that any file structure starting with / is from the true root of the file structure whereas any with ~/ will be starting from your root folder in my case /mcgi5sr2/
This is one place where files go that you can execute anywhere within your file structure, so you can apktool anywhere in your file structure, please not that the decompiled files will always end up in your ~/apktool/<fileName>.apk folder.
So with this knowledge we can rip the aapt, apktool and apktool.jar out of the slimapktool, rename and put them in the /usr/local/bin/ folder for safe keeping. To use them in the heat of battle we simply rename the exisitng ones to 1.5 or 2 or whatever really, then change the name of the slim files back to aapt, apktool and apktool.jar . This way we can swap between them with ease. There are other ways of doing this, but they are beyond my ken (understanding).
OK so we are now installed, and can swap between apktool versions and have an apktool folder! We can really begin.
Delve into you rom or phone and pull out systemUI.apk from your rom/system/app folder and framework-res.apk rom/system/framework/ folder. This can also be done using adb
Code:
adb pull /system/systemUI.apk /apktool/systemUI.apk
adb pull /system/framework/framework-res.apk /apktool/framework-res.apk
Should do the trick, With some HTC roms ie stock you may find you need to also pull the htc-framework-res.apk. Once this has been done then one of the most important steps takes place. We extract the file framework for the rom so that we can decompile and recompile successfully for the phone. From within the same folder as the systemUI.apk and framework-res.apk on your computer type:
Code:
apktool if systemUI.apk
apktool if framework-res.apk
this will create a framework folder within ~/apktool/ which should contain a 1.apk and normally a 127.apk these are SUPER important let them be.
Finally it seems we are ready to decompile the .apk file we wanted to edit, a good place to start is the phone.pk or mms.apk so move the file wherever, I use the ~/apktool/ folder for all this craziness. Then type:
Code:
apktool d mms.apk
The magic should happen and you will have a ~/apktool/mms folder! In which is basically a lot of the same stuff in the unzipped version we talked about earlier. This can be edited to your delight and then recompiled, in fact its worth recompiling immediately to check it all works, nothing more annoying than spending a long time working in your res and values folders only to have it not recompile! So,
Code:
apktool b mms
Note the fact that the .apk is no longer present this is because we are building using the folder as source.
We are not done! We need to make sure the certification and signing is all correct, so we need to open the original .apk file, and extract the AndroidManifest.xml and the META-INF folder and replace the ones in the ~/apktool/mms/build/apk/ folder this will make sure we have the original signatures. Then we
Code:
apktool b mms
one final time, now the finished mms.apk should be in ~/apktool/mms/dist/ folder ready for use in the rom.
Once decompiled not only can we edit the .png files in the res/drawable folders but we can edit the .9.png files and the .xml and if we are really know what we are about the .smali files. I strongly recommend staying away from smali unless you really know whats up. There is an important rule to follow when editing .9.png files as well, that you should not alter the black lines that surround the edges. Everything else can be edited bar them.
As you can see above these lines normally only a pixel or so wide, but play an important role in how the files are used, stretched, repeated etc. In fact in some cases I have found that even using black (rgb ff000000) caused problems so I used just off black (rgb ff010000). The RGB codes used in the .xml files are also slightly different to normal, the first two digits represent how transparent the colour is with ff being solid, and 00 being transparent.
.xml files of interested will undoubtedly be found in the /res/values folder, as this is where most of the colours are defined.
There are a lot of things that can go awry in this, but if you follow these instructions you should be cool. Any issues you can try me, or go for the mega thread on apktool listed at the top.
A few pointers on what you'll find in the different folders once you've decompiled the .apk can be found in the post below about SystemUI.apk and Framework-res.apk
SystemUI and Framework-res
reserved to cover these special apks
Forgotten Isle
reserved for any new important things I may want to tag onto the en of this
File Structure
Also reserved...... for a reason yet to become apparent
Awesome work mcgi5sr2. This guide is really useful..
MScorporation95 said:
Awesome work mcgi5sr2. This guide is really useful..
Click to expand...
Click to collapse
I'm pretty busy right now, but will try and finish this for anyone else who is interested. I would add a build guide, but there are a lot of those out right now anyway.
If people are interested we could start a build and build errors thread for Primo to help each other out
Thank you!!!
---------- Post added at 09:01 PM ---------- Previous post was at 08:55 PM ----------
Very good guide
Sent from my One V using XDA Premium 4 mobile app
HTC ONE V reflash from *ZIP
hi, could you suggest me how to flash from ZIP(official EU ROM, downloaded from htc dev site), and I won't to change below mentioned?
* bootloader - LOCKED
* have orig. ROM but UK oriented
vinm07 said:
hi, could you suggest me how to flash from ZIP(official EU ROM, downloaded from htc dev site), and I won't to change below mentioned?
* bootloader - LOCKED
* have orig. ROM but UK oriented
Click to expand...
Click to collapse
You have to unlock your bootloader and install a recovery to flash a rom.