[Guide/Tutorial][17/06/12]How to make "basic" theming mods + .9.png tutorial - Galaxy S II Themes and Apps

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

Related

HowTo: Modify Themes and what are these Drawables?

::EDIT:: This post may become a bit messy while i build it, but i promise to try and format it as much as possible to make it easier to read! If anyone finds anything inaccurate in this post please let me know!
A couple days ago i didn't think i would have the knowledge to be writing on how to theme for Android. But its amazing what you can learn, when you spend a good 2-3 hours reading on a subject.
If you haven't read How to Theme Develope for Windows for Dummies I would advise you to start there first.
This will basically give you an idea of where the files are that you can change. There are quite a bit of files that you can change and some you shouldn't, at least not until they are understood better. (i.e. any file with .9.png as the extension.) These are stretchable pics and can cause problems with your theme and phone if not done properly)
When you download a theme it looks and acts as if it were a full flash, but the truth is these files only contain what we need to theme. As people learn more about themeing Android, these files should become smaller and smaller. I will explain the folder structure of these update files to make things easier to understand, Below i even have screenshots of them. The best way to learn these folders and apks is to extract them and view them in the thumbnail view in Windows Explorer. I am sure you will find most if not all of the files familiar. When scrolling thru all of the png files see if you can figure out where they appear on your phone.
Folder structure: Folders and apks
Anyone who uses a computer should knows about folders.
apk files are like zip files or containers. They have folders and files inside of them.
There are many folders and files in the update.zip but we are only going to cover a few for now.
app folder - This folder contains all of the apps that will be installed during an update or wipe. You will need to extract only the apks of the apps you wish to change the icon and graphics for.
-Launcher.apk - This file is in the app folder and contains the menu launcher tab, clock, google search widget, wallpapers and some other things.
framework - This folder contains framework-res.apk, this is where the bulk of your editing will take place.
When you open a apk you will see:
assets - This will contain images, sounds and other content used by the programs. Not always used!
META-INF - This contain the encryption data of the update.zip.
res - This folder contains all of the png and xml files. The xml files are used to format the UI, these can be used to change the locations of things on the screen. The xmls need to be unencrypted first. Depending on the apk there can be a bunch of folders under the res folder but we will only concentrate on the drawable ones.
-drawable - The png files in this folder are displayed wheather the keyboard is open or closed. The majority of the files are here.
-drawable-land - These are the files that will show when the keyboard is open. There won't be as many files in these folders. Most of the time the programmer will re-organize the layout with an xml file.
Basically the interface of Android is a bunch of pictures, the program links these pictures to certain actions. As someone making themes you do not have to worry about any programming, in the future when people start unlocking the xml files to change the way things look. Then you will have to learn some programming, but for now we will only talk about changing the picture files.
Below are screenshots for the people who learn quicker visually:
To start off i grabbed the Windows 7 Beta 3.0 from Dave Da Illest 1. also assuming that you read the link above, you Should have WinRaR and it should be associated with zip files. If not then, right click the update.zip and choose "Open With..." and select WinRaR.
Now you should see this screen.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click the framework folder, you will see framework-res.apk.
Double click framework-res.apk and it will open a new WinRaR window.
You will want to extract these files, i normally extract them to the same folder as the update.zip. Now if you try to extract the whole update.zip you will receive errors. I believe it is because the file is signed. I am not sure how to unsign the whole zip, or if you would even want to.
This is what the folder with the extracted framework-res.apk and update.zip should look like.
Now you want to open the res folder and go into the drawable folder. If you are using Windows Explorer, change the view to thumbnails and you will now see all the files that Dave Da Illest 1 has changed.
To compare the files from JF's RC30 and any other theme you will need to download JF's RC30 v1.31 here. The folder structure is a bit different but easily figured out.
Inside the update.zip the structure is different, but that is only because the people who make these themes have only included the files you need. So when you flash a theme you are not reflashin all of the Android OS, radio and boot loader. you will want to double click system and then you will see the folders from the themes, tucked in with the OS and whatnot. The app folder is at the top like before and the framwork folder is in the middle somewhere. Follow the same instructions as before to extract the files, then tile your windows vertically or horizontally to do a side by side comparison.
It is best to create a folder specifically for these files. (when i first did this my folders were a mess and i ended up spending an hour or so editing a bunch of files, only to flash the original RC30 files on to my phone.)
::TIP:: When you open an apk file from inside the update.zip file, WinRaR may default to a temp folder...(i.e. C:\Documents and Settings\bobbyd\Local Settings\Temp\Rar$DI71.579\framework-res) double check the location of where WinRaR wants to extract files, this is how i ended up flashing the original files after spending a decent amount of time photoshopping.
I will update this thread as more ideas come in or as i read up on more, i am at work and just threw this together very quickly.
::EDIT::
I added themetemplate.zip, Its basically all the apps folders and framework-res.apk extracted with the folder structure intact. I stripped all .9.pngs and xmls out.
Included in the zip is:
update
-app
--AlarmClock
--Browser
--Calculator
--Calendar
--Camera
--Contacts
--Email
--Gmail
--gtalkservice
--IM
--Launcher
--Maps
--Mms
--Music
--MyFaves
--Phone
--Settings
--SoundRecorder
--Superuser
--Sync
--Talk
--Vending
--VoiceDialer
--YouTube
framework
-framework-res
inside each folder is the res\drawable, drawable-land, drawable-port
reserved....
Thanks for the clarification, It does help explain things a bit more. I plan to get started making a theme as soon as I get done downin' all the needed files. I have no internet besides my tetherbot for now, so it's a slooow process!
I figured i'd help by answering some of the questions i had and answered by playing with and dissecting the already created themes.
I didn't want to bother Stericson or Dave with questions they've been asked 100 times already.
WOW good looks.. looks like its time to make some themes..
is it possible to merge this with my how too ?? seems like it would be a great add on
Dave Da illest 1 said:
is it possible to merge this with my how too ?? seems like it would be a great add on
Click to expand...
Click to collapse
I agree.... doesn't mean a thing by itself but merged together with your thread, would give a great visual representation of what is going on.
Dave Da illest 1 said:
is it possible to merge this with my how too ?? seems like it would be a great add on
Click to expand...
Click to collapse
Maybe the mods can sticky this, but wait until i am done editing it? then merge it with your thread. Unless I can still edit it when it is merged =)
yea....how many how to theme threads do we need?....
Like the visual representations...
Stericson
i dunno maybe a mod can put ur post where my reserved spot is on mines .. im not sure if he can tho but i hope he could lol
Stericson said:
yea....how many how to theme threads do we need?....
Like the visual representations...
Stericson
Click to expand...
Click to collapse
I think as many as it takes =) Reading Dave's for dummies howto makes a lot more sense to me now. But last week when i read it i was confused as all hell! I basically put in a bit of info and some pics.
You guys will be thanking me when its all done...just think how many PMs it might save you from =)
If PM=">,last_week"
Then
Thank.damnitpud
End If
I'll merge the 2, the right way, as soon as both of the thread creators give me the ok.
you have my ok
is it possible to like make a list of which file controls what
example i was trying to find the clock images course i found that but other things theres like sooo much :|
also i was wondering does rc30 images differ from rc8 images (for the res and drawbles etc)
Mikey1022 said:
I'll merge the 2, the right way, as soon as both of the thread creators give me the ok.
Click to expand...
Click to collapse
Can you merge it so i can still edit it? if so i am ok with that to.
As far as I'm concerened you can merge all three.....maybye have each of our posts one after the other...will be a great place for information
Stericson
EDIT:
btw,
If PM=">,last_week"
Then
Thank.damnitpud
End If
^^^ Funny
This thread will be closed and placed to rest.
Please post all new comments or question in the new thread, placed here.

[GUIDE] Modding (theming) Market app and others

Since there was quite pm's for on how to theme market or any other app. So decided to put one guide how to do it.
Basiclly this is for market app but can be also used for other apps.
If you like my work you can buy me a drink; cheers
For start you need:
- Apktool 1.3.1 version (don't use 1.3.2 version) or
http://code.google.com/p/android-ap...ol-install-windows-2.2_r01-3.tar.bz2&can=1&q=
http://code.google.com/p/android-apktool/downloads/detail?name=apktool-1.3.1.tar.bz2&can=1&q=
- Apk manager (I use apktool and prefere)
http://forum.xda-developers.com/showthread.php?t=695701
- Gimp or Photoshop
- Something for 9.png's (I use gimp for that and will explain later how and what)
- orginal file (watch that file isn't themed orr modded already)
- 7zip
- Notepad (for editing xml files; some use other text programs like Notepad++ but I use palin windows Notepad)
Now when you have everything you need we can start. If you have orginal file is also to have modded one so you can compare what was changed. Market had changes from 2.2x version till now so you can't just copy and paste files from one to another file or drag them from another apk to another. Basiclly few folders can be copyed into app which your modding. Rest you can see what is same and what isn't by comparing how many xml files are in each folder. (you might say it takes long time but that's the best way and only one way for start to do it; when you get hangoff it you want do it and when you see which are basic things and commen to all Market apps.)
Now let's start with de-compiling your file/files:
If you use apktool use version 1.3.1 since newer ones 1.3.2 has some bug in de-compiling and compiling.
Copy somewhere your downloaded apktool (some folder) and also copy in there apps your modding.
{
"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"
}
Open CMD (Command prompt) in Windows and go to folder where your apktool is (I think I don't have to write command how to get there.... ; but here is little trick if you don't know for windows 7 which will open cmd in folder you are >> Open apktools in your Windows Explorer next hold Shift on keyboard and while holding it click your right mouse button and when menu opens just select Open command window here; and now your in cmd where your apktool is).
So now we need to de-compile file to see what we have in there since when you open apk file in 7zip not all folder are shown!
Run command to de-compile apk
apktool d -d Vending.apk
Click to expand...
Click to collapse
(Vending.apk is name of market app or it can be com.android.vending-1.apk)
Now you wait till de-compiling is finished. When finished in your apktool folder you'll see folder called Vending (that is de-compiled apk file).
In Vending folder you have this:
- res folder
- smali folder
- AndroidManifest.xml
- apktool.yml
From list we are more interested in res folder since it has what we needed rest of files/folders we don't touch.
Ok now we open res folder and we have quite number of folder in there and each folder has quite number of png files or xml files.
In res folder these folders are interesting for us:
- color (xml files)
- drawable (xml files; few png's)
- drawable-da-hdpi-v4 (png file)
- drawable-da-mdpi-v4 (png file; it for mdpi devices; some edited some not it's on you will you edit it or not)
- drawable-hdpi-v4 (png files)
- drawable-mdpi-v4 (png fiels; I didn't see anybody editing it)
- layout (xml files)
- values (xml files)
So those are folder we are editing and modding and rest we don't touch!
Now were going to start with xml folders.. Lets start with color folder. When you edit xml file with notepad for example just click on Save option in notepad menu and not Save As and file will be saved and later will won't be any problems when compiling back app. In there you have 4 xml files which you can edit colors in them for some texts. I only edit xml called header_text.xml.
In header_txt.xml file you see this line
Code:
<item android:color="@android:color/black" />
part you can change is where it says color/black and can be changed to color/white and nothing else!!! (This part is like file name says for header text in which color to show). So for color folder that's it. (If you want you can play with other xml's in there if you see something like android:color="#ffbb0000" this your color in hex code and it has to be written in hex code for example to be "gingerbread green" it should be this "#ff96d21e")
When done with color folder were moving to drawable folder and in there we only need 1 xml file called bottom_light_gradient.xml. In there you need to edit this line
Code:
<gradient android:startColor="#ff96d21e" android:endColor="#ffffffff" android:angle="90.0" android:type="linear" />
from #ff96f21e" you only change 96d21e to color you want and first 2 ff need to be there! Second color is "#ffffffff" for white background and if your market has blackbackground or transparent cahnge that color from "#ffffffff" to "#00000000".
As far as I know (didn't search and look rest of xml files in drawable folder) nothing else can be changed in other xml files in drawable folder since rest xml files contain pictures names which to use for what.
Moving on to next folder which has xml files which we need to edit; folder called layout.
In layout there is quite number of xml files you can edit colors in hex format but basiclly you need only few files to edit so you don't have trouble like white text on white background.
So for here I edit only 3 files (2 files are for widget and one is for writting review for some app.)
Files your editing are:
- widget_app.xml
- widget_no_content.xml
- write_review.xml
In first 2 files you can replace line where it says /white or /black. (I wrote before what you can write there). Also if you want you can change some of xml files in this folder but in my opinion there isn't any need for that.
Last file write_review.xml is one I had problems with it when using Neon or Black version while writting review (comment) for some app. Thanks to MikeyMike01 it's resolved. If your using normal background as main to be white (like in stock version) then you don't need to touch any of files from layout folder; or you can play with them (your decision).
Here is orginal line from write_review.xml file
Code:
<EditText android:textColor="?android:textColorPrimary" android:gravity="top" android:id="@id/comment_box" android:layout_width="fill_parent" android:layout_height="fill_parent" android:maxLines="4" android:minLines="4" android:maxLength="150" android:freezesText="true" android:inputType="textLongMessage|textCapSentences|textMultiLine" />
Here is part you have to edit when using other color for main theme background in app
Code:
<EditText android:textColor="#ff000000" android:gravity="top" android:id="@id/comment_box" android:layout_width="fill_parent" android:layout_height="fill_parent" android:maxLines="4" android:minLines="4" android:maxLength="150" android:freezesText="true" android:inputType="textLongMessage|textCapSentences|textMultiLine" />
When finished with layout folder we are moving to last xml folder we need to edit called values (for every app it's almost same and all of them have it) and in there we only are interested in 2 files called:
- colors.xml
- styles.xml
In colors.xml you can change anything you want but as long as it's in hex color code and needs to start with #ff and ends with you 6-digit hex color code like this for steel blue #ff00aeff. Not sure if I need to explain which color is which since it has quite lines in there but you can play with them to see which line is what. My advice is to set different colors to see what is changed when you run your themed app and then you'll see result of your various colors and fix them one by one in file on your computer.
Final xml file which we need to edit is styles.xml and there are only 3 lines you change. First 2 lines are colors (1st is text name of color and like written before can only be black or white and 2nd line is hex color code). Last line in file your changing is look of your app aka "theme" to be with transparent background, black or white.
This is line your looking for and this one is for white background
Code:
<style name="TallTitleBarTheme" parent="@android:style/Theme.Light.NoTitleBar">
for black or neon version line looks like this
Code:
<style name="TallTitleBarTheme" parent="@android:style/Theme.Black.NoTitleBar">
for transparent versions line looks like this
Code:
<style name="TallTitleBarTheme" parent="@android:style/Theme.Translucent.NoTitleBar">
Another on for transparent if you don't like pages to be one over other is not use Translucent; use this line
Code:
<style name="TallTitleBarTheme" parent="@android:style/Theme.Wallpaper.NoTitleBar">
WARNING: Don't copy xml files from older version of apps to newer one since there can be some changes in them; only file you can copy without any problem at all is file color.xml in values folder and file bottom_light_gradient.xml in drawable folder.
Well that's it for xml files and were moving on pictures in png format. All png's can be edited with gimp or photoshop like written before without any problem. Problematic files are called 9.png which aren't that easy to edit.
Problem with 9.png files is that they have black "dots" or lines around sides which indicate to android how will image be streched and sized to fit and look right.
Here is guide you look and read closely how and what to do on 9.png files.
http://forum.xda-developers.com/showthread.php?p=5206698
Myself I edit them with gimp using colorize function and after that I look closely how do black dots and lines look and is there any change in there color. If there is any change in color when compresing file you'll get error. So before going into editing 9png files read guide from link and if you want try my method which isn't in some way most efficent since you have to zoom and look closely every pixel in image to see if looks like orginal one!
Png files are listed in folder I wrote before on start of guide. Most of us who mod markets don't mod mdpi folders since most users use hdpi devices. But if you want you can edit.
Also one notice in market folder drawable-hdpi-v4 don't touch these 2 files since when edited on compiling you always get an error. Not sure why; tried every method to edit them but didn't work?!
Files are:
- title_bar_light_shadow.9.png
- title_bar_shadow.9.png
Also don't edit png called transparent.png.
After your done with editing and changing png files your ready to compile you new app (market).
Like written before you need again CMD (Command prompt) and run these command to compile file:
apktool b -d Vending
Click to expand...
Click to collapse
If you notice now there isn't .apk extension in compiling command and it because your compiling folder where you edited files. Now you have to wait for apktool to finish compiling files and it takes few minutes for that if no errors.
Little about errors little "bug" in apktool is that it doesn't create any log file so you can see which error your getting and you can't scroll windows much since it has quite lines written on screen and neither one is problematic xml or png file. So to see which error are you getting run command again to compile and when it starts to write errors hit Pause/Break key on your keyboard and YOU HAVE TO BE FAST!!!!! If you were fast enough just scroll with mouse and look for line after command where it says ERROR and there will be name of you "wrong" file and problematic part in it.
If your file is compiled and new apk is created it is in folder Vending in subfolder called dist. Now you can notice that there are 2 new subfolders created build folder and dist folder.
In build folder is your new app but not in apk format and if looking in it you can see only few folders in res folder and not all folders are listed like in res fodler where it's de-compiled. Now second folder called dist folder is folder where is created your apk file ready to be installed.
You thought it's done. Right? Well almost just a little thing and it's finished and this is where you need 7zip program. Most of apps need to be signed in order to android system can recognize them and if not signed apk file won't run if pushed with root explorer or installed if running it from zip file in CWM.
You need to open your orginal file called Vending.apk in 7zip and also open second 7zip and in it open new created Vending.apk located in Vending subfolder dist which we wrote few rows before.
When 2 apk files are opend each in it's own 7zip you can notice that your orginal file has META-INF folder and new one doesn't have it. Right?
Now in orginal apk file in 7zip select folder META-INF and file AndroidManifest.xml and drag it to 2nd 7zip with your new created apk file. In new 7zip you'll be asked if you want to copy or replace files and you just click on Yes button. (Thanks to pendo who told me about this)
Also your new apk file is smaller in size compered to orginal one and don't bother with that since it's normal. You'll see with each color edited in xml files apk will be different size.
Now your done and your file is ready to use and also signed. There are few methods about signing apk files but this for me presonally is easiest and quickest one. I know that apk manger can sign zips since I don't use it don't really know how it works and also apk manger uses most parts of apktools
but it has interface for users and creates log file for errors.
Before releasing apk file in public try it on your phone and see who it looks like; minor bugs you didn't notice you can fix later.
Your decision is do you want to use apktool or apk manager.
Hope this will help. In basic this is it and for most of apps can help but once you start it modding you'll learn few tricks. Most of us here will help if any problem like few users here helped me to get started with some basics
Guide about theming in general
http://forum.xda-developers.com/showthread.php?t=916814
If I find any other interesting guide I'll post it and if any problem or suggestions please feel free to post or pm me.
One thing in the end. DO NOT POST OR LINK GUIDE OUTSIDE FORUM PRIOR CONTACTING ME!!!
Regards,
ante
reserved?!
00.ante said:
reserved?!
Click to expand...
Click to collapse
Great Guide... Just needed the starting point !!!!
Thanks! Just what I requested!
Hi 00.ante, i love your work for the market and i hope that your skills will be used for your new team ^^ What a great tutorial and no one click the "thanks button", amazing !!!
By the way keep your mind and have a good day
Best regards.
Edit: Voted !
First of all, great guide here! I'm sure it will help a lot of people out!
On a side note, when I edit .9.png files I just "cut" out everything within the black lines and paste onto a new layer (use "paste in place" so the image doesn't move on you), make my color changes, then "merge down" the layers until it's layer 0 again, save .png as original - done. That way you don't even have to look at the black lines, you know they are correct because you didn't edit them. Just thought I'd throw this piece of information out there to hopefully save some people some time.
Great guide and an exellent resource for future themers. I will include a link to this in my sticky thread in captivate land.
Thank you
xtremekilla09 said:
Great guide and an exellent resource for future themers. I will include a link to this in my sticky thread in captivate land.
Thank you
Click to expand...
Click to collapse
Thanks
Sent from Steel Blue themed i9000 using blue XDA app
What a great idea... gonna have to try this out.
bdemartino said:
First of all, great guide here! I'm sure it will help a lot of people out!
On a side note, when I edit .9.png files I just "cut" out everything within the black lines and paste onto a new layer (use "paste in place" so the image doesn't move on you), make my color changes, then "merge down" the layers until it's layer 0 again, save .png as original - done. That way you don't even have to look at the black lines, you know they are correct because you didn't edit them. Just thought I'd throw this piece of information out there to hopefully save some people some time.
Click to expand...
Click to collapse
Sent from my PC36100 using XDA App
How do you change icon for app like you do with the market icons?
davey11 said:
How do you change icon for app like you do with the market icons?
Click to expand...
Click to collapse
Like in amrlet I use gimp or photoshop on png's.... if you mean totally cahnge icon it can be done but it needs to be same dimensions.
00.ante said:
Like in amrlet I use gimp or photoshop on png's.... if you mean totally cahnge icon it can be done but it needs to be same dimensions.
Click to expand...
Click to collapse
Sorry, I meant how to "push" it into the app, so it shows in app drawer and other places like TB.
davey11 said:
Sorry, I meant how to "push" it into the app, so it shows in app drawer and other places like TB.
Click to expand...
Click to collapse
For apps if you just want to change icon then open apk file in 7zip manager and from it drag folder drawable-hdpi in res folder to lets say your desktop and find ping waht are you looking for and edit it with gimp or photoshop. But only edit this way png extensions not 9.png.
Then when your done just drag folder back to apk opened in 7zip or just png file you edited.
Thanks 00.ante. With this guide and a few hours of experimenting, I made my first themed market.
Looks great
Is there a way to change to background image on the top of the market. I know how to change the color but changing the actual image would be great...
Anyone...
thanks in advance.
theme a market app
Is it possible to theme an app you got on the market and have it still show up. I am just learning how to theme apps, don' t know much at all. The specific app I am working with is titanium backup. I changed the color of the icon, got it to work, but now the app no longer shows up in the store and I can't activate the pro version either. I'm sure you can theme an app and still have it show up in the market, I have used custom roms that have themed apps that showed up in the market. The theming disappeared after updating, which is expected. Is it possible to do this after each update, not sure about the pro version though.
Were can I find the apk in my rom are they in the data/app folder ????
Thanks
Sent from my SGH-T989

[GUIDE] Changing status bar icons by editing framework-res.apk and lots more

So friends, here is a quick and easy guide for changing the status bar icons of your Gingerbread(Actually any phone )
For those who don't know how to do it(for anyone actually :highfive
Theory
Android is the awesome platform which is easily configurable and is able of being edited very easily
The icons used in every app and Android framework are located as png images in apk of those respective apps in location:-
*.apk/res/drawable-mdpi (in my case, as our phone is mdpi)
So, we can change any icon of our status bar like battery, signal, (not clock[clock is to be configures in SystemUI.apk{will post how to change it shortly}]), etc by editing png's in framework-res.apk
Not even that, you can edit images of any app as I told you
There are several ways to decompile and compile apk in which we have made change
If we want full access of apk and want to change every thing like the xml's in it and smali content in jar files, then we would have to do it on computer by apktool or apkmanager
But, we are here to only change image, so we would not go in detail of apktool or apkmanager. For changing images, that can be very easily done even on the phone by an app NinjaMorph that is made for developers by our senior head and DEVELOPING LEGEND Stephen(Stericson)
But be careful as backing up the original file if you do something wrong
And as you all know any developer or even a newbie posting something interesting that you want to try WILL NOT BE RESPONSIBLE for your mobile blowing up, resting in peace, sleeping like a dead, behaving like a non-living BRICK, or anything whatsoever that may or may not happen to phone in this universe or any other universe known or unknown
What to do if anything happened to my mobile
We have had a backup of your original file so we can restore it
But if while editing the system files like framework-res.apk
If you deleted some un-backed up apk's
Well you can always have backup of your ROM and that is why Koushik Datta has made clockworkmod Recovery
You can restore your ROM from there
Pre-Requisites
Patience
Mind
A Android (A spare one if you brick your phone, just kidding)
Root access(to change the apk)
NinjaMorph(http://bit.ly/ninjamorph)
Root Explorer(Optional)(http://bit.ly/stericson)
GUIDE
So Let's Start
Download NinjaMorph. Install it and give it root access. It will prompt for starting checks. Click on start checks.
Now you would have three options, namely, New Project, Finish Project, Existing Project
Click on new project. Go to system/framework/ and click on framework-res.apk. It will start extracting files
Once it has extracted all the files, it will open to show you what is inside framework-res.apk.
Exit it and go to your file explorer.
Go to /sdcard/AndroidThemes/workspace/framework-resapk
This is what is inside apk. Go to res/drawable-mdpi folder
There you will see hundreds of icons of your menu, lockscreen, battery, signal, and everything
You can edit them and replace them as you want. But the name of the file you are replacing and size and dimension must be equal to the file you are replacing with(I recommend Googling and finding icons of battery, signal, and other things)[I have even used hdpi icons, there was no problem]
If you download a theme file which is to be flashed in recovery that is not for your phone, no problem, extract the zip and place its framework-res.apk in your sdcard and extract the apk with Ninjamorph. Replace your icons with its icons and TADA
After you have done replacing the icons and you are satisfied(I am never)
Go to NinjaMorph. Click on Fininsh Projects. Click on framework-resapk. It will recompile and ask to replace the original apk with modded one. Click OK
Then it will ask if you want to remove the completed project, Say No(As you would need it if something gets wrong)
Reboot your phone
Maximum chances are that your icons will be replaced. Rare cases have their status bar gone or no change, if so:-
Download(Buy) Root Explorer. Go to /sdcard/AndroidThemes/workspace,
There you will see framework-res.apk. Copy it and go to /system/framework
Mount as R/W
Paste the apk. If it asks that file already exists, overwrite it.
SET PERMISSIONS
Long click on framework-res.apk and click on permissions
You will see three columns
Read Write Execute
You have to set them in the following way
x means you have to tick it
blank means uncheck
Read Write Execute
.....x........x.................
.....x...........................
.....x...........................
Click OK
You will see it as rw-r--r--
Reboot
Do it over again if nothing happens
Enjoy
This way you can edit not only framework-res.apk but any apk
Treat
This section is different from the thread topic
I: Faking Up
Want to make your device show Jelly Bean in About Phone
Go to Root Explorer
Go to /system
Long click on build.prop
Click on Open in a Text Editor
Change the files as
ro.build.display.id=Jelly Bean
ro.build.version.release=4.1.4
Save Changes
Reboot
II: Easter Egg
You all must know that an image of GingerBread Zombie comes up when you repeatedly click on Android Version in Setting>About Phone
Wanna change it to look like Jelly Bean?
{
"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"
}
Extract framework-res.apk
Go to res/drawable-nodpi
You will see platlogo.jpg
Replace it with the file in attachment
Recompile
Reboot
Troubleshooting
Will find and update it
Tell me what problems are you having
Nice guide. How to change color of clock in gingerbread because white is ugly? Maybe you can add that in future.
Verstuurd van mijn GT-S5660
FlemishDroid said:
Nice guide. How to change color of clock in gingerbread because white is ugly? Maybe you can add that in future.
Verstuurd van mijn GT-S5660
Click to expand...
Click to collapse
Yes
It is a tedious process
By editing smali files of classes.dex of SystemUI.apk
BUMP
which file do you you need for notificationbar background???
jkoetsier said:
which file do you you need for notificationbar background???
Click to expand...
Click to collapse
Add @amdroid:background @ frawable/statbarbg
In statusbar tracking.xml
Then add statbarbg.png in drawable-mdpi
For gb clock u need to do smali
Devilsking has made good guide
Sent from my ST25i using xda app-developers app
Thanks man, its working!!
Sent from my GT-S5660 using xda premium
SpaceCaker said:
Add @amdroid:background @ frawable/statbarbg
In statusbar tracking.xml
Then add statbarbg.png in drawable-mdpi
For gb clock u need to do smali
Devilsking has made good guide
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
*android
BUMP
BUMP
BUMPS are unneeded, if theres nothing to say, dont do it.
Sent from my GT-S5660 using xda app-developers app
Bigger PNG's
Quick question, I know this is an old topic, but upon googling I found this and I feel that my question sort of belongs here. Not even sure if OP is still around to look at this thread, but here goes:
I swapped out a png image for the statusbar icon of an app called CoolSymbols (not using this guide, but using APK Multi tool, but I imagine that the png sizes will have to be the same). Now, this app had a quite ugly statusbar icon, with jagged edges. I replaced it by a circle icon. This circle is pretty much the same size as the previous icon, so the icon looks jagged as well.
Here is the question: Do I simply make a bigger png image, so it will get cropped <---- doubt this
or do I create another folder like res/drawable-hdpi, but for xxhdpi (drawable-xxhdpi???), and if so will that fix the problem, or will I also have to point to that folder somewhere in another file <--- probably the way to go
I hope someone can help me out here!
(PS: I hope my issue is clear from the text above, I don't have a possibility to post proper screenshots until tomorrow, but they will be provided if needed)
(Also I'm sorry if there may have been a more recent topic about this, then I totally missed this!)
JaySilverMusiq said:
Quick question, I know this is an old topic, but upon googling I found this and I feel that my question sort of belongs here. Not even sure if OP is still around to look at this thread, but here goes:
I swapped out a png image for the statusbar icon of an app called CoolSymbols (not using this guide, but using APK Multi tool, but I imagine that the png sizes will have to be the same). Now, this app had a quite ugly statusbar icon, with jagged edges. I replaced it by a circle icon. This circle is pretty much the same size as the previous icon, so the icon looks jagged as well.
Here is the question: Do I simply make a bigger png image, so it will get cropped <---- doubt this
or do I create another folder like res/drawable-hdpi, but for xxhdpi (drawable-xxhdpi???), and if so will that fix the problem, or will I also have to point to that folder somewhere in another file <--- probably the way to go
I hope someone can help me out here!
(PS: I hope my issue is clear from the text above, I don't have a possibility to post proper screenshots until tomorrow, but they will be provided if needed)
(Also I'm sorry if there may have been a more recent topic about this, then I totally missed this!)
Click to expand...
Click to collapse
You need to create an image of correct pixels according to your phone's dpi
Have a look here - http://developer.android.com/design/style/iconography.html

[GUIDE][WIP]Ultimate Miscellaneous Guide(Decompiling, 9 png, Photoshop)

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

[Guide] Modding your rom.zip

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.

Categories

Resources