[HOWTO] [DIY] Making your own Holo Theme for ICS - LG Optimus Black

Hey people, I've just found it at O3D forums and I think I should share the information, as I don't have time for creating a good tutorial myself.
This way you can change colors for your own likes and make a lot kind of themes.
Before starting you should have your Apktool environment set up.
1. (only if you never saw APKTOOL in your life, otherwise, just jump it)
1· Download and install latest version of Java JDK
2· Download latest version of APK Multi-Tool as we'll be using it for un/packing APKs and push/pull them from/to our device.
3· Extract it anywhere you may like. If posible, in C:/ to avoid any kind of problems. Be sure to read README file before asking something about it.
4· Run Setup.bat, type 3 and press Enter. Close it.
5· Run Script.bat, type 0 and press Enter. Now let's type our framework's path.
6· /system/framework/framework-res.apk for basic framework file. This will be pulling it out from our phones.
7· Repeating Number 5, type /system/framework/lge-res.apk for LG's framework file.
8· Now move to X:\...\APK-Multi-Tool\place-apk-here-for-modding\ and copy both apks (framework-res + lge-res) and paste it at X:\...\APK-Multi-Tool\other\
9· Run Setup.bat again, type 2 and press Enter. Now both frameworks should be installed and we are ready to un/pack APKs from the version we're actually using (v30A/B/C/D...). Close it.
10· Back in Script.bat, type 0 again followed by Enter, then type the path of your desired APK. (/system/framework/xxxxxx.apk for frameworks & /system/app/xxxxxx.apk for apps). After pushing it, select it as your actual project.
11· Now type 9 followed by Enter. This will unpack our APK.
12· Now is the time for tunning anything you want to. Go to X:\...|APK-Multi-Tool\projects\xxxxxx.apk\ and you'll find there everything.
13· When it's done, let's re-pack it typing the option 11 followed by Enter. When repacking gets done, it will ask if you want to use any files from your original APK. Tell it Yes, otherwise your apk won't get signed.
14· When the extracting is done, move to X:\...|APK-Multi-Tool\keep\ and erase everything there BUT META-INF folder + AndroidManifest.xml. Now press anything at APK Multi-tool window and you'll get your APK ready to go.
15· Now type 8 to push it back to your phone and type the desired path. If it cames from /system/app/xxxxx.apk or /system/framework/xxxxx.apk.
If you get any error recompiling it, you should take a look at the log, typing 23 and fix it at the projects folder.
Click to expand...
Click to collapse
2.
potaturrias said:
When i maked this theme (my first theme) y used trial and error procedure.
The first step is replace or edit 9.png. pictures in drawable-hdpi folder located in framework-res.apk and lge-res.apk, you can do this quickly using this tools:
http://jgilfelt.github.com/android-actionbarstylegenerator (Check that the names of new pictures match with the old pictures)
http://android-holo-colors.com/
Many images have to edit them by hand
If you put more files than originally,for example switches in lge-res drawable-hdpi, you will get an error when try to compile.
The second step is replace xml files in drawable folder using xml files from zip file that you downloaded in the previous step.
If you don't get the desire result you have to edit styles.xml or drawable folder files or layout files to change backgrounds colors, text color,etc.
Remember there applications with lines in XML files that reference to framework or lge-res, for example:
android:textColor="@*android:color/transparent makes reference to transparent color defined in framework-res and
android:textColor="@com.lge.internal:color/transparent makes reference to transparent color defined in lge-res.
I hope that this mini guide help you, remember that you can make your theme based on this theme, will be easier i think.
Click to expand...
Click to collapse
Thanks to @potaturrias!

Related

[HOW TO] Manuals for creating a theme

In the following 3 manuals, you will be shown/told how too create a theme.
Thank you to the authors.​ Most of all to​ Stericson​ for he is the first to figure out HOW to create a theme for your phones.
Thank You Again
Restore your G1 back to it's original theme and fonts!​
To create themes, or to edit themes to your liking, you will need a working knowledge of android, adb, how to resign apk's, knowledge of your own O/S.
Things you will need:
The rom you intent to create a theme for... Now a days there are so many to choose from so none of this will be rom specific.
You will also want to get the latest and greatest bootloader installed on your phone and to HIGHLY suggest everyone trying your theme to install it as well.
You'll find this on Android Development
You will also need the latest SDK and java:
Link to Java: http://java.sun.com/javase/downloads/index.jsp
Downloading SDK: http://code.google.com/android/intro/installing.html
You can also use any zipping archive to extract files from and to the update.zips. I believe there are links below to some of these.
Very Important!
You do not usually need to resign every apk that you change! Usually you only need to resign the update.zip! However there may be times that you may need to resign an apk. So dont sign the apks...if you have problems with the update then try to resign the apks.
JesusFreke was kind enough to build a custom signing tool for me that would allow me to right click on an apk and resign it from there. I am posting it here for others to use as well. Note that this is a courtesy of JF, so thank him for it. I cannot stress how much time this has saved me and will save you.
Automatic version!
Do not use this to sign APK files in Vista or windows 7! It will cause your theme to loop phones when placed on a device. Only use this to sign update files if your using those O/S's
Note, this will not work if your SDK or the path that you place this in has any spaces in the dir name!
An Example of this is c:\users\Nikki and Stephen\sdk\tools
Try to put the SDK and the contents of the zip in a dir where the names are all together and not like the one above.
I have made a batch file that will automate the entire process of setting up to use the signing tool made by JF. This batch file will set the CLASSPATH, set the PATH, install the registries, and will even allow you to sign files manually if you wish. I plan on building onto this batch file to include other things. However, for the moment, it will only include what you see here.
In order to use this you should have downloaded the sdk already. Simply extract all of the files into the tools dir of your sdk, and run autosign.bat follow the instructions and go through the options one by one, starting with 1 working through 4. You can however, put the contents of this zip anywhere on your computer and it will work. It is just better to put them into the tools dir of your SDK. Especially for the consideration of future versions.
Autosign .zip: https://docs.google.com/leaf?id=0B5...MTEyMi00NzI4LWJkMDQtZTUzNjBjMTZlMWNj&hl=en_US
Want to set up the signing tool manually?
Before using this you need to know how to set this up:
Now you will need to add the tools dir of your sdk to the environment variable CLASSPATH.
FOR XP:
Right click on My Computer click properties, then choose the tab that says advanced.
Click the button that says environmental variables.
Go to system variables find the one that says CLASSPATH
double click it
go to the end of variable value.
There should be a semicolon ; at the end, type in the path to the testsign.jar located in the tools directory of your SDK
for example the path to my testsign.jar was c:\sdk\android-sdk-windows-1.0_r1\tools\testsign.jar
If CLASSPATH is not in your system variables then create it.
Secondly, Find the system variable called PATH and add to the end of it, the full path to your sdk directory.
For example, mine was c:\sdk\android-sdk-windows-1.0_r2\tools
FOR VISTA:
Open a cmd prompt.
Replace THEEXACTPATHTO-TESTSIGN with the path to the dir that holds the file testsign.jar.
Type:
echo %CLASSPATH%
If it is returns %CLASSPATH%
Type the following:
set CLASSPATH=THEXACTPATHTO-TESTSIGN\testsign.jar
If it comes back with something else then
Type the following:
set CLASSPATH=%CLASSPATH%;.;THEXACTPATHTO-TESTSIGN\testsign.jar
For Example, when I type this it looks like:
set CLASSPATH=%CLASSPATH%;.;c:\Android\SDK\tools\tests ign.jar
To set the PATH
Replace THEEXACTPATHTO-SDK with the path to the tools dir of your SDK.
Now type:
set PATH=%PATH%;.;THEXACTPATHTO-SDK\tools
For example, when I type this out it looks like this:
path-%PATH%;.;c:\Android\SDK\tools
Now through doing this you have done two things, first off you have made the resigning process extremely easy, secondly you will not have to cd to the tools dir of the sdk to use adb or any other tool in the sdk.
Signing the Files:
Now right click the reg file that you extracted and choose to install it, or merge.
Now, right click an apk, do you see an option that says ResignApk? That's how you will resign your .apks and .zips.
When you choose it a cmd window should open for a few seconds and then close. the file you signed will be overwritten with the new resigned file.
If you find the right click menu not working for some reason you can type the following in cmd to sign your files: java testsign whateverfiletosign
General Info:
You will need to be specific in addressing what version your theme is for, RC8, RC30, or ADP1. Make sure you test the update.zip before you release it.
Every .apk contains the images relating to itself. However, every apk has the ability to use the images in framework-res.apk. The images for every apk is located inside of itself. To find these images open up the apk, you can rename it to .zip or open it with an archiver of your choice, winrar, winace, etc. Then after opening the apk open the folder called res and inside of that there are folders that are named Drawable, drawable-land, drawable-port, etc. This is where the images are stored.
There are some things you cannot edit unless you rebuild the entire apk from source, which we will not go into here.(another tutorial, another time) Just know that at this time you SHOULD NOT edit, or even open images with the extension .9.png doing so will corrupt the .9.png and cause the image to distort. You can however compile the images with eclipse.
Editing .9.png's - http://forum.xda-developers.com/showthread.php?t=487001
Be aware, messing with .9.png's can cause problems if they are not done correctly.
If your going to build your own update.zip from scratch:
To simplify this process for you though, most rom devs provide a theme template with their roms now. You can also download someone elses theme and use their files, since they are resigned already. It may also be easier to see what files do what and go where since they have already been edited and are easy to point out.
Now, your ready to start changing things up.
You will now need to open the apk, which you can do by adding .zip after .apk, effectively changing it to a zip. or you can use your favorite archive opener.
I dont use the archive process because it can lead to very aggravating problems such as things not getting signed correctly and have heard reports of it interfering with the signing tool above. Anyways I just add zip and it works great for me.
For those renaming the .apk's to .zips
Note that if you are using windows you will need to unhide known file extension types. you can also use your favorite archiver such as winrar, winzip, etc.
See here to unhide known file extension types for Xp: http://www.mediacollege.com/microsof...on-change.html
See here to unhide file extension types for Vista: http://maximumpcguides.com/windows-v...ile-extension/
Tips:
After opening the apk copy the folder called res.
Go to your desktop, or wherever, create a new folder called Images, or whatever.
Open the folder, paste the res in there.
Now you can see what the files look like without opening them, by using thumbnails to see what they are.
Btw, you may also want to add -frame, or -launcher, to the end of the res folder you copy over to keep them separated from others.
Almost Done
So now your theme is done and your ready to make an update.zip for others to install your theme.
Update script
The update script is in a Unix format, while you do not need linux you must save it in a Unix format. I suggest using Textpad to edit this script and saving it in the Unix format.
Link to Textpad: ftp://download.textpad.com/pub/textpad5.2/txpeng520.exe
XML Edits
I have provided some additional support for the process of hex editing xml files to change things like text color, size, and more things not easily changeable.
You can find this thread here: http://forum.xda-developers.com/showthread.php?t=479019
Final Notes:
Editing market apps
With market apps, if you make changes you usually need to make sure you dont resign their apk because you will overwrite their signature keys with the test keys.
If anyone has any questions please try asking for help in this thread before emailing me for help Usually I will respond to questions in this forum.
I hope this Tutorial has been helpful. I will add on to it as needed.
Any questions can be directed to me at [email protected]
Stericson
Links of interest:
Using ADB: http://code.google.com/android/reference/adb.html
How To Theme Develop for Windows For Dummies in 10 easy steps (( no your really not a dummy its just an easy name for a how to lol))
well i'm going to give this a shot in the dark on how to create this how to be as easy as possible
1st
download these files if you don't already have them
JAVA
http://java.sun.com/javase/downloads/index.jsp
download the JDK
Winrar
http://rarlabs.com/rar/wrar380.exe
and Auto-sign.zip
http://www.mediafire.com/download.php?uwzjjydnm2r
2nd
Download my included Auto-sign files.
what it contains.
the Test keys file..
and an update.zip file
and a batch file i created called auto-sign to make things easier to sign
3rd
after you have downloaded my Auto-sign
then you extract it to where ever you want.
4th.
use the update.zip included if your a Beginner it includes my windows 7 theme .. i edit so many files that it's easier to tell what does what and whats goiing to go where. now open that zip file DON'T EXTRACT just open it using winrar..
5th
When it is open go to Framework.. and open Framework-res.apk
NOW IF THE APK. POPS UP AND SAYS IT CANT OPEN BLAH BLAH SELECT A PROGRAM AND THEN SELECT WINRAR.
6th
Once you open Framework-res.apk KEEP THIS WINDOW AND UPDATE.ZIP WINDOW OPEN!!
then just extract the whole Res Folder to where ever you like this makes it easier to see what files you wish to edit.. most of the files will be in the folder called Drawable
7th
open up your favorite photo editor .. i use photoshop along with 90% of the people who Graphic Design... Edit your pictures Remember a file with a .9 can mess up your phone so edit those carefully.. and save what ever pictures you have
8th
Now drag the whole Res Folder .. back into the Framework-res.apk
now your update.zip file is going to say files has been changed to framework-res blah blah do you wish to save it . click yes .. now your framework has been updated you can close everything out
9th
go to the Auto-sign folder.. and open Auto-sign this will now sign your update.zip .. and rename it to update_sign.zip .. now just delete your old update.zip.. rename update_signed.zip to update.zip
10th
put it on the root of your memory card.. reset using green call + menu + end
then hold home and end .. until the recovery mode shows up .. then press Alt+S and hope your device isn't bricked
Disclaimers
I'm not responsible if your brick your device.. but i will help to the best of my abilty and if i can't help i'm sure XDA will
i don't sign every file in my update.zip i just sign update.zip .. and hey it works lol..
For ADP or RC 8 versions .. just download your favortie ADP theme or RC 8
put it in the Auto-sign folder.. and rename it to update.zip if it isn't already then just follow my steps
ToDo:
1. Explain about the files that make up themes
a. Explain update.zip and folder structure
b. Explain about pngs and apks
2. Explain the tools
a. WinRaR
b. Auto-sign
c. Java JRE and JDK
d. Draw9patch tool
e. Editing tool
3. Setting up your phone for themes
a. Choosing which JF firmware to use
b. Using the Eng Boot Loader and why
4. Explain the process to get the files
5. Explain which files to edit
6. Explain how to import modified files
7. Explain about auto-sign and how to use it - I am building a program that will making signing files easier. check it out as i build it! here
1. When you download a theme it comes in the form of an update.zip file. Basically the same as the full update looks, but it is a watered down version. All of the operating system, boot loader and radio files have been removed.
a. If you check the file size of JF’s RC30 1.31 and compare it to any of the themes, you will notice that the theme file is about a 3rd the size. JF’s update.zip contains data, META-INF and system folders it also contains a boot.img file. Where as a theme update.zip contains app, framework and META-INF folders. The theme update.zip only contains the folders and files that are necessary for changing the Android theme. If you were to dig deeper into JF’s RC30 1.31 update.zip you will find the folders that are in the theme’s update.zip. For example, double click the system folder and you will see 11 folders and 2 files. The only ones we are concerned about are app and framework. So when you flash a theme it doesn’t bother rewriting all of the OS and boot loader, but only the app and framework folders.
b. Inside the app and framework folders are apk files, apk files are like zip files or containers. There are many folders and files inside 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 a few 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 contains the encryption data for 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. They 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 programmer links these 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 basic programming, but for now we will only talk about changing the picture files.
2. The tools you use for creating themes are very basic and you might already have 3 out of 4 installed.
a. WinRaR is a must have for everyone, it allows you to create and open compressed files (i.e. Zips, RaRs and about 25 other file types) It would best if you associate WinRaR with zips and apks, the zips can be associated during the install of WinRaR. To associate apks you can right click on an apk and choose “Open With…” make sure to check off the box that says “Always use this program to open this kind of file”
b. Auto-Sign was released by Dave da illest 1, to make signing the apks and update.zip an easier process. Before you can flash an update or theme the phone checks to make sure the update.zip is signed by google or by JesusFreake. I will explain this more in Section 3.
c. Android apps are built on Java, hence the need for JRE and JDK, You will not be working directly with these apps but part of the signing process uses Java. You can get both files here: http://java.sun.com/javase/downloads/index.jsp you will want to grab the first and second downloads.
d. The draw9Patch tool comes with the Android SDK, it is located in the tools folder. This tool is used to edit stretchable images. There is still a lot of research that needs to be done on using this tool. So for now let’s just say do not touch any files with .9.png as an extension. Dave da illest 1 has changed a few of these .9.png files without issue so maybe we can get him to explain them better. I have also edited some of these files but it made some of the images stretch weirdly.
e. I am not sure what other photo editors you can use, but everyone I have spoken to about modding the theme uses Adobe Photoshop. I am sure you can use other programs. But I am not aware of any at the time of this writing.
3. Before changing the theme on your phone you will need to gain root access which is explain here: http://forum.xda-developers.com/showthread.php?t=442480
a. As you look through all of the different themes, you will notice some say they are for RC30, RC8 or ADP1.
i. RC30 – Is the US version
ii. RC8 – is the UK version
iii. ADP1 – Stands for Android Developers Phone and was produced for programmers. This version is completely unlocked and does not have any of T-Mobile’s software or locks.
b. So your phone is rooted and you’re wondering why you should have the engineering boot loader. Well one reason is because of the 3 Androids on skateboards, the other reason is if your phone bricks during a flash you can fully recover your OS with the fastboot option. More about this can be found here: http://forum.xda-developers.com/showthread.php?t=455860
4. You have a few options here, you can either get the files from RC30 update.zip, one of the other theme’s update.zip or you can use the themes template at the bottom of this thread. All 3 methods you will need to open the update.zip go into the framework folder (if you get it from RC30 you will need to go into system\framework) Extract the framework-res.apk to a folder of your choosing. Most of your editing will take place on the files from this apk. When you are looking at these files in Windows explorer it is best to change the view to Thumbnails and look at all of the images and see if you can figure out where they are placed on your phone’s screen.
::TIP1:: Your best bet is to create a Themes folder on your desktop or in My Documents, somewhere simple to find. You will be dealing with a lot of files and it can get very confusing quickly.
The other file you will want to change is Launcher.apk; this file is in the app folder and contains the menu launcher tab, clock, Google search widget, wallpapers and some other things.
::TIP2:: When you open Launcher.apk 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 the files, this is how I ended up flashing the original files after spending a decent amount of time photoshopping.
5. Now the only files you will want to edit are png image files. There are also xml files, they are used to format the UI, you can change the locations of things on the screen but the xmls need to be unencrypted before you can edit them. I have not done this process yet and will update more information later.
6. Importing the files is very simple, as long as you know the layout of the update.zip. Once you have edited all of the files you plan to or just want to test to see how your theme looks. Open the update.zip in WinRaR and go to the location of the files (i.e. Say you changed the 3G icons, you would go to the framework folder and double click on framework-res.apk. This will open another WinRaR window, open Windows Explorer where your edited files are and hold the Ctrl key while clicking the files you want to copy. Now drag them onto the open WinRaR window from the framework-res.apk. When it asks to replace the files choose “Yes” or Yes to All”. Close that WinRaR window and the one from update.zip will tell you “Files have changed would you like to save this file now” click “Yes” again and now your update.zip will contain your modified files.
7. Download and install Stericson's auto-signing tool here.
I have been slacking on this guide, I will update soon again.
[HOW TO] Easy steps for creating a theme
I know there are a million and 1 walkthroughs on here for creating themes but after doing it for a while I have really refined my process and made it as easy as possible. Im just hoping to clear up some of the confusion so after you know how to sign your files you will know how to finish making them into your own custom theme.
First you need to get signing setup properly. This topic is covered in many places and my recommendation is to use the Stericson walkthrough or the Stericson auto-signing setup tool. Once you can click on any zip or apk file and get the option to Resign it you are ready to proceed with making your own theme.
1. Download an archive manager that allows you to open archives inside of archives without creating new windows. My recommendation for this is the application 7-zip. It is tiny, free, easy to use, and on all my computers it has replaced winzip and winrar.
2. Now take a blank theme from Stericson to use as your starting point, in my case I use the ADP1.1h version since I am building for JFv1.43 which uses ADP1.1h this will be the minimum needed to change your theme and will contain all the original artwork.
3. Open the update.zip and inside are typically 3 files, framework, system or app, and META-INF. Leave META-INF alone, you wont be touching that. Inside framework and system/app is where the files are that you can change. In this case we will open update.zip, then double click framework and then double click framework-res.apk (this is where the next archive will open inside the same window, your life just got a little easier).
4. Now you are looking at assets, META-INF, res, and a couple other random files, the resources.arsc can be edited but I will show you that in another tutorial. Now open up the folder res and you will see the treasure we are searching for, folders with the name drawable. All of the folders that start with the name drawable are where we can edit the themes, this includes drawable, drawable-land, drawable-port, and drawable-finger.
5. Now drag and drop the folders drawable and drawable-land onto the desktop. Once they are on the desktop you can edit the .png files in those folders until you are ready to put your theme together.
6. Now in your still open window at \framework\framework-res.apk\res\ you will open the drawable folders one at a time and drag and drop your edited files into the archive, only dragging and dropping the files you edited and not just everything inside the folder.
7. Once you have your new images copied into the archive in the correct place you can just hit the close button or browse up a couple directories and find other files to edit. Any time you edit an apk and browse out of it or close it you will be prompted to update it in the archive by 7-zip (this is my secret shortcut), always press ok.
8. Now you have a freshly created theme ready to install, all you have to do is right click, chose to Resign the file, and once its done you can copy it to your SDcard, make sure its named update.zip, and flash your new theme.
Its literally that easy! And you use this same technique in the system/app folder to edit the apk files for the individual apps on the phone. Explore around in the update.zip and see what you can find, I only told you about the major items but there is plenty more to find and change. You can always copy a folder out of the archive and if you cant edit anything just toss it but if you can find something to edit, do so and throw it back in the archive. You guys now have all the info I had when I started plus all my tricks to making that process 10x easier.
I Just Want To Change My Clock. I want everything else stock. Sorry for asking but when i search so much comes up. I know its really simple to do. If anyone can just point me in the right direction or give me a quick how to that would me AMAZING!
Read:
http://forum.xda-developers.com/showthread.php?t=482205
notifi
jut want to change notification to white on statusbar
Before I tried to setup the autosign tool, when I double clicked on zip files it opened them up, which was how I wanted it. After trying to setup the autosign, when I double click on zip files nothing happens, except a java command prompt window pops up, same happens when I right click and hit resign zip, how can I fix this?
Edit: I reinstalled Java which fixed my issue
i got this tryin to update
E:No digest for framework-res.apk
i edited someone else theme, did not edit no .9 file.. i right click on the update.zip and resigned it. what went wrong?
EDIT: nevermind i got it.. i followed the one for dummies, guess i am dumb lol
What the image file for the tab on the bottom of the screen called? I couldn't find it searchin throguh the framework-res.apk
its in launcher.apk. Check in drawable portrait and drawable landscape.
Stericson
thanks i should of explore more before posting
Hi,
I've got 99% of my theme done although I can't find where the bottom of the notification bar is and the white bit where the notifications would be.
I've done a little picture below to help me explain.
Bottom notification bar is the arrow.
The white bit where the notifications would be is the hatched.
{
"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"
}
Thanks for help in advance.
Also could someone tell me how to put icons in for well know apps from the market. At the moment I have put the full apk in the update and change the icon. But this increases the theme size. Thanks again!
NO DIGEST? Failed?
what does it mean when I try to flash the new update.zip and it fails because it says NO DIGEST? What does this mean? Any help would be greatly appreciated. Thanks
parmenti said:
what does it mean when I try to flash the new update.zip and it fails because it says NO DIGEST? What does this mean? Any help would be greatly appreciated. Thanks
Click to expand...
Click to collapse
means it hasn't been properly resigned.
thanks, that's what I thought. Can't seem to get it right. Does the image, the apk, and the zip all have to be resigned? Or just one or the other? THanks for your help.
parmenti said:
thanks, that's what I thought. Can't seem to get it right. Does the image, the apk, and the zip all have to be resigned? Or just one or the other? THanks for your help.
Click to expand...
Click to collapse
Just the update.zip needs to be resigned.

[Guide] Learning To Theme: Putting the tools to use pt. 1

[Guide] Learn To Theme Part 1: Everything you need to get started
So you want to theme android.
Don't know where to start.
This should help.​
***This is written going in step with editing a theme for the Samsung Epic 4g, but the principle can be applied to any android phone, granted there will be differences in phones***
First off you are going to need the basic tools:
7zip - http://www.7zip.com
Gimp - http://www.gimp.org/downloads/
Second off you need a general understanding of what you are about to do.
The majority of files you are going to edit will be found within framework-res.apk. This is a file located inside of the folders system/framework inside of a rom. A rom of course is a collection of files which combines into your operating system.
To get to the framework-res.apk file you will need 7zip, it's like winzip but is real quick for themeing.
http://www.7-zip.org/download.html
7zip will see any file named *.apk as a file named *.zip. With WinRar, Winzip, and others you have to rename the apk file .zip edit it, and rename it back to .apk. With 7zip this is not necessary. All you have to do is right click a file and choose 7zip-Open archive.
So you have your rom downloaded onto your desktop or in a folder you set up as the root of your themeing.
On my PC I have a folder inside of User/Documents/ called Themes
I also theme for the Samsung Moment so I have all my themes labeled inside of there:
(My folder looks as follows)
Epic Green Mayan Theme
DE03 Stock Theme Template
DI18 Stock Theme Template
Epic Files
Pink Life Moment
Pink Life Epic
Mayan Green Moment
Epic Black Hole
First and foremost, you really need a Stock *** Theme Template. *** being whatever version your phone is running.
The stock theme template serves a number of purposes. First, it is deodexed. This means that all of the files in system/ and system/framework that have the .odex extention are deleted and the stock apps that are included on your phone by default are replaced with files that have been full deodexed files.
This is essential for themeing because if they weren't deodexed, either your apps would ForceClose when you reboot after themeing or they will dissappear from your laucher tray and desktop, meaning essential they are deleted by the phone.
Another good thing about a stock theme template is that it deodexes your phone from an update zip so you can theme the stock rom your running instead of having to install another rom simply to apply a theme.
Download your stock theme template for the Epic 4G here for EC05
http://forum.xda-developers.com/showthread.php?t=1042386
So lets begin here.
Open your folder on your PC that holds your theme. For me it will be Users/Documents/Themes/NewTheme
Inside of that folder (COPY) your stock theme template to this folder. You will want an original theme template to remain inside of it's own folder cause obviously you are going to edit the one inside of New Theme folder.
Stock_DI18_Theme_Template.zip
Now rename stock_DI18_Theme_Template.zip to the name of your new theme.
NewTheme.zip
Now right click the .zip file and choose 7zip-Open Archive.
Double Click on the folder labeled "system" to Open it.
Double Click on the folder labeled "framework" to Open it
Here you will notice several files including one called framework-res.apk.
Inside your theme folder /Themes/New Theme/ create another folder called framework.
Drag and drop the file framework-res.apk into the framework folder.
Right click on framework-res.apk and choose 7zip-Open Archive.
Double click on the folder labeled "res"
Now you will notice several folders. On the Epic 4g the main one you want is called Drawable-Hdpi
Drag and drop this folder into the same folder you created called framework.
Open this folder and browse around. There are many images in here that your phone pulls in various locations. The first thing I like to do doing this on a new phone is to play with my phone and at the same time look in this folder and try to locate the same files I'm looking on the phone itself. You'll begin to see similarities inside of the drawable-hdpi folder for instance files that begin with the label sys_stat_*_* usually show up in your status bar. The rest you will learn over time.
You will also come across two main file types. The first is .png and the second is .9.png. This write up will not cover those, coming in the future.
A popular start for most people is wanting to alter the status bar. This is an easy one or so it seems.
navigate into the drawable-hdpi inside of the framework folder located /Themes/NewThemes/framework
scroll down until you find a file named status_bar_background.9.png
Since it's a .9.png you already know we can't edit it yet. The reason is the .9.png files are pictures that might hold more then one place on the phone and most probably will be portrait and landscape. The status bar is one size on portrait mode, but when you flip your phone into landscape, it has to stretch to fit the screens. In order to stretch a picture and retain it's looks, a tool called draw9patch in the android sdk is used to show you your image in 3 different stretch modes. Your goal is to set the guidlines on what must be retained at each zoom. After you add these guidlines on the picture, they show up in the picture. You have to program the guidelines inside of the picture and remove them from being displayed. That is done by a program called Eclipse. (Use version 3.5) But all this will come into play later don't rush out and get confused because familiarizing yourself the basic pictures and colors found in framework-res.apk is your current goal. Just because you have no idea what you are doing with the .9.png files doesn't mean you can't change the color of the status bar though. The next best thing is to "borrow" one from a theme that exists so you can get a feel for modding some files. The only one you can't use from another theme is the clear status bar. That has to be done in xml files as well and for now were sticking to the basics. Here's what you do. Find the theme that holds the status bar you like. To make sure you preserve all the files the way they need to be it's best to make a whole new folder in the theme folder called whatever theme you plan to use as a donor /Themes/Donor Theme/. Open the theme zip with 7zip open archive. Navigate to res (double click) and framework. Make another folder inside /donor theme/ called framework. Drag and drop the framework-res.apk. Open this file in 7zip and drag and drop drawable-hdpi into the framework folder. Now open it and scroll down to the status_bar_background you intend to borrow. (Right about now it's not wize to have your windows of "my computer" open full screen you can do this a lot easier with two open explorers side by side swapping files). Side by side, open the drawable-hdpi folders in both theme folders, /New Theme/ and /Donor Theme/. Drag the status bar from the donor theme into the folder for the new theme. Microsoft will give you **** about it choose copy and replace and your done. Now to get this change back in the theme is pretty easy. Your drawable-hdpi folder inside /Themes/New Theme/framework is where you will alter the pictures, framework-res.apk is where your going to put it. In your framework folder is the original framework-res.apk If you closed the instance of 7zip where you had framework-res.apk for new theme open, you need to right click and re-open it. Double click on /res and open it. Drag and drop the drawable-hdpi into the open archive NewTheme.zip where all the other drawable folders are. Make sure not to copy it IN one of those other drawable folders. It will overwrite the one thats already there automatically. Now, you have to stick that framework-res.apk back into NewTheme.zip before your ready to flash it from recovery. First close the 7zip instance of framework-res.apk. Right click and open NewTheme.zip double click on system/framework/. Now drag and drop the framework-res.apk from /New Theme/framework into NewTheme.zip. Your done, now flash the NewTheme.zip in recovery and see how it worked.
Any other file you choose to edit, the steps will be the same. Edit the image in drawable-hdpi, drag it into framework-res.apk, drag framework-res.apk into the theme /res/framework/ folder. You will be doing this a lot.
That's it for part 1. This will give you enough to play with and familiarize you with the images used by most any android phone. If this were a samsung moment you would be doing all of this editing inside the same file structure except in framework-res.apk /res folder you would be editing a folder called drawable-mpdi.
Part two will be out soon enough. I'll go more in dept inside the framework-res.apk/twframework-res.apk
[Guide] Learning to Theme: Required Tools
How To Theme
Required Tools​
First off this is the very 1st guide in my line of theme guides. This one is just to reference you to the required tools, and instructions on how to set them up since it can be a little tricky. The link at the bottom is for guide 1, what to do with these tools now that you have them. At the bottom of that guide is link to a two part Putting the tools to use covering editing images in framework and .9.png files.
Grab you some tools:
Gimp:
www.gimp.org
7zip:
http://www.7-zip.org/download.html
Java6:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
scroll down and select (under Java Platform, Standard Edition, JDK 6 Update 22) Download JDK
Download and install with the on screen instructions.
Android SDK:
http://developer.android.com/sdk/installing.html
Notice the instructions on Step 2. Downloading the SDK Starter Package.
It says "On Windows, right-click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path (under System Variables). Add the full path to the tools/ directory to the path."
This means if you extracted the folder called android-sdk-windows inside the zip you downloaded @ C:\android-sdk-windows, then when you go to add the path (there will already be other values in your path, type a ";" behind the last one and type in c:\android-sdk-windows\tools
this means you can call any of those scripts inside of android-sdk-windows\tools by typing them at the c:\ in command prompt.
For example, if you did not do this, and you wanted to use adb, you have to open the command prompt and type the following
C:\>
C:\>cd android-sdk-windows\tools
C:\android-sdk-windows\tools>
C:\android-sdk-windows\tools>adb ***
After adding the tools folder to path you can do the following
C:\>
C:\>adb ***
APK Manager 4.9 (Latest Version):
http://forum.xda-developers.com/showthread.php?t=695701
There is a video on the page as well to give you an overview of how to work it.
I downloaded the zip, created a folder at the c:\ drive called apk manager. Opened the archive (apkmanager4.9.zip) highlighted all the folders and the bat file, drag and dropped them into the folder located at C:\apk manager\.
Eclipse 3.5:
http://www.eclipse.org/downloads/packages/release/galileo/r
This is called Eclipse galileo download the one called Eclipse Classic
Once again you extract this file into a folder on your computer like you did with APK Manager. I created the folder @ C:\eclipse\
Now navigate to this website to learn how to add the adroid sdk into eclipse to have it ready when we are going to need it.
http://developer.android.com/sdk/installing.html
Note the android SDK download at the top, you should already have this. Read right below where it instructs you to add that into eclipse.
Start out like this. Open Eclipse now that it is installed. It's the icon in the eclipse folder that looks like a purple planet. With Eclipse open on your screen click on Window in the tool bar at the top. Click on Help-Install new software. The box that appears, it says "type or select a site" ignore this text input box and go straight to click "Add" button. When it comes up name it Eclipse Plugins and in the field where you put the web address, type the following: https://dl-ssl.google.com/android/eclipse/ . Click on the box next to developers tools and click next at the bottom. This will install what is called Android SDK and AVD Manager. Eclipse will probably need to restart to add the plugin to the menu list. Alternatively, if you get errors doing this there is a problem with you computer connecting to the secure server (in the web address you typed https: note the S at the end. If, for any reason you do get errors, simply go back to Help-Install New Software, and this time put in the web address field http://dl-ssl.google.com/android/eclipse/ When eclipse opens back up, click on Window and select "Android SDK and AVD Manager". Now your screen should look like the pictures in the link.
Now Eclipse Should be upgraded.
After following this all the software should be installed to work on themes.
Next Guide Below
Click My thanks button below
Meta Morph tutorial
by Dreamsforgotten​
This is a primer in using MetaMorph on the Samsung Epic, at the time of writing I'm using a froyo leak with the Bonsai 2.0.1 rom so MetaMorph being a little buggy for us now will probably clear up when official is out. The bottom of the guide addresses what I'm talking about.
Create a folder on your desktop. Call it froyo (or whatever).
Inside that folder make one called framework-res (don't put the .apk)
Inside that folder put the folders you need to edit example
If I want to change the images in drawable-hdpi, make the folders like this
froyo/framework-res/res/drawable-hdpi
so inside the froyo folder create "framework-res". Inside framework-res create "res". Inside res create "drawable-hdpi". It follows the same structure as apk manager when you decompile. If you want to edit the styles.xml, that gets recompiled into resources.arsc. If you are in apk manager and you goto projects, you'll see unsignededitedframework-res, open it and right inside you'll see resources.arsc, androidmanifest.xml, res, meta inf, etc. So to MetaMorph the resources.arsc, your NEW resources.arsc goes into
froyo/framework-res/
Do this for any .jar or .apk file, create your folder structure and put only the new files into the folder, you don't have to flash an entire drawable-hdpi folder only the files you are changing.
Next thing you need to do is make a xml file that tells metamorph what files your editing and links the folders you created to that file. Do that like this:
Inside the froyo folder, create a text file. Either open Notepad and save the file into this folder or right click choose new file, text file. Set your .xml file up like this:
<?xml version="1.0"?>
<themename>Crystalline Froyo</themename> <--You can call this whatever
<themeversion>2.1</themeversion> <--Number that whatever number you want
<screenshot></screenshot> <--include a screenshot if you like. put the screen in /froyo and type the file name here
<author>Dreamsforgotten</author> <--your name
<authorweblink>http://forum.xda-developers.com/member.php?u=2551535</authorweblink>
<phone>Samsung Epic</phone>
<rom>Bonsai 2.0.1</rom>
<themedescription>UI Improvements for Crystalline Froyo</themedescription>
<item>framework-res.apk</item>
<path>/system/framework/</path>
<description>**** a Reboot Required</description>
Now the line right above this <item, path, description> You have to follow this for any folder your updating. Notice in the <item> space, you put the actual apk name being edited. So here I have <item>framework-res.apk</item> This tells metamorph to put your edits from the folder you named framework-res into framework-res.apk in the same structure as you set up, ie /res/drawable-hdpi or /res/anim whatever it is you might be editing. It's that simple. Now say you wanted to theme the market. You can use metamorph to theme system apps, but NOT market apps!!!!!! You would do this
<item>vending.apk</item> <--name of APK
<path>/system/app/</path <--path to the APK
<description>Market Update</item> <--whatever you like for descripton
You would put somewhere inside the xml as well. You can put the instructions for MetaMorph to flash in any order you like, You can theme apks first, framework-res first, however you like, BUT its good practice to put the framework-res last because it causes a reboot and anything behind it won't flash. Samsung devices pay attention, TWframework-res and framework-res both require a reboot, so you have to have two separate metamorph zips.
Now, moving along. You have your xml file with all the fields written properly, you have your folder structure set up you just need to do two more things. Inside your original froyo folder on your PC, create a blank text file. Name it .nomedia that (dot).nomedia don't forget the period. This tells media scanner not to add all your images from this zip into your gallery. It's very important. Now the final step, zipping it all up to flash. Whatever you chose to name that xml file for example I used this on the last one I created. crystalline2.1.xml This was the name of my theme control file (the .xml file inside of froyo) so your zip file HAS to be named the same exact thing. If your xml is theme.xml, then your zip has to be theme.zip. If your xml file is theme1.2.xml then your zip file has to be theme.1.2.zip. It will error if the zip and xml file don't match. That's it copy it to your SD card under AndroidThemes, open MetaMorph and apply!
Keep in mind MetaMorph has a 500 file limit and gets buggy when you push it toward the 500 mark. Break large themes into 2-3 different files if you must. You already have to have two separate flashes for our two frameworks on the Epic so you might as well split the images between the two anyway.
One last note on MetaMorph on the Epic. I'm using the latest and I noticed sometimes you open it and it closes right back, or you go to extract a new theme and it closes. Seems that the free version has issues with displaying the ads (which could be due to the host file on Bonsia I'm running, not sure, but when you open MetaMorph, give it time for the ads to load before hitting the start checks button. If the ads at the top and bottom of the app don't load soon, and it doesn't close on its own, proceed. If you give it time for the ads to load and it crashes, just open it right back up. Sometimes it takes me 2-3 times opening MM to get it to stay on the screen but after it does, the flash goes smooth every time.
[GUIDE] Learning to Theme: Putting the tools to use
APK Manager:
This is one of my favorite programs it makes the whole process smoother imo.
Navigate your harddrive to c:\apk manager\ or wherever you extracted the progam to.
Grab the framework-res.apk from a theme template/rom/etc.. and drop it in the folder called "place here for modding"
Double click on Script.bat. Leave the apk manager window with the folders (where Script.bat is) open.
Look into the second section called "Advanced tasks Such As Code Editing
Type "9" to decompile apk
Immediately type 11 to recompile apk (This step is because I have ran across framework-res.apk's before that wouldn't recompile even if no changes were made and this could save you some time down the road.
Minimize the window, Maximize the apk manager window
Open the folder called projects
Open the folder called framework-res.apk
Open the folder called res
Here is where there are plenty of files you can edit. These are the XML files that control the look and behavior of android. If you are lost at this point, lets work on a file together to get the feel for what is possible in here. Scroll down and click on the folder called "values" and open it. Inside you will find a file called colors.xml. Right click on the file and choose open with and choose notepad if you have nothing else that works as a basic text editor. Me personally, I use Notepad++. It's a free download. Either way once it is opened, you will see many values that look like this:
(This is not stock Epic colors.xml file so don't be confused)
#ffb97f7d
#ffffffff
#ff000000
#00000000
#ff000000
#ffffffff
These are text colors for your primary and secondary text on your phone, as well as background highlight colors.
Note Background_dark background_light. That is the background color so if it is the same as your text colors you won't be able to see the text. I made this mistake before so you can change every text color in this file but leave the backgrounds alone, or use a color your text will show up on.
#ffb97f7d
#ffb97f7d
#ffb97f7d
#ff64917d
#ff64917d
#ff64917d
#ff64917d
#ff808080
Here, the color name=" describes the text, the "#ffb97f7d" is actual code for the color.
So if you want to change this color, where do you get the codes from?
Easiest way for me is to use the color chooser in Gimp, when you pick a color, either background or foreground, it will show you the hex value on the screen. But remember that the color codes Gimp gives you hold 6 places ie #000000. The values in the xml files hold 8, so when you compile there will be an error. That is because the first two places describe transparency. You need to add "FF" in front of any value you get from Gimp. So if the code in Gimp is 000000 in the xml file you need to put #ff000000. Always start the code with a "#".
Now the question is what text is described by dim_foreground_dark? Two ways to find out. Change it, compile it, flash it. Or dig around the "out" folder in apk manager and look for text xmls. The next one is located in /apk manager/projects/framework-res.apk/res/color
You will see primay_text_(dark)(dark_disable_only)(dark_focused)(dark_nodisable)(light)(light_disable_only)(light_focused)(light_nodisable)
Search_url_text
secondary_text_(dark)(dark_nodisable)(light)(light_nodisable)
tab_indicator_(text)(textv4)
and a few more. You can open each of these xml files and see what's inside. We'll use primary_text_dark.xml as an example. Right click and edit with notepad++
Take a look at this line in the code:
android:color=" (this tells the xml what color to display. The @color tells where to pull the value from. So you either find color.xml like we did above and edit the field bright_foreground_dark_disabled to render the color your after, or you can simply put the hex color code right here bypassing the need to look up @color(color.xml). It would look like this if you did that. and the "#ff000000" would give this text color the value of black. Instead if you had used the color "#ffffffff" you would get the color white.
Here note android:color in the code. That's because some of the values are for text, and some are for background. In the text lines elsewhere, as seen below, we will use android:textColor instead.
Now this is all general text colors. If you want to edit status bar text, both in the status bar, and when it's expanded, you'll need to dig in a different folder. Navigate to this folder in apk manager on your c:\ drive. C:\apk manager\projects\framework-res.apk\res\layout. You are looking for the following file called status_bar.xml.
Keep in mind when your looking through these xml files, you will see this value in a lot of fields "android:id="@id/icons" or something similar. These are keys to what you are editing. The first line you might want to edit in status_bar.xml would be line #13 which looks like this:
The only thing that's important on this line is @id/tickerText which tells you a color value here would let you change the color of the ticker text. The ticker text is the text that pops up in the status bar for things like a text message being recieved, and if your phone is set that way, the content of your text message.
There is just one problem here. In most lines where you can edit color you will see this already in the line android:textColor="********" and that value is NOT in the ticker text line. But being that this is a text view line because the id is ticker text, you can add the value android:textColor in right before the words "android:id=". The edited line will look like this:
Learn To Theme Putting The Tools To Use Part 2 .9.pngs
We are going to walk through editing a .9 file and getting it back in place to do this as you read the guide.
Before you begin, check out this video from fxn
http://www.youtube.com/watch?v=KNvGgmJDqPQ
Now the guide will get you lined up with the instructions in the video.
Open "my computer" and navigate to C:\apk manager\.
In another window open C:\*\Documents\Themes\
Browse to the folder in Themes that holds your theme template
Right click and Browse your stock di18 theme template or rom.
Navigate to system/framework/
In your apk manager window, open the folder called place here for modding
Click and hold framework-res.apk in your second window which is the 7zip browing the zip file.
Drag the apk into place here for modding folder.
Now you can close the zip file window.
Back out of the place here for modding window and you should be back in the apk manager folder.
Run Script.bat and choose the option "9" and hit enter.
Click open the folder called projects
Click open the folder named framework-res.apk
Click open the folder named drawable-hdpi.
Find the file icon_highlight_rectangle.9.png Pay attention to the screen while your scrolling. Apk manager decompiled all the .9.png files exposing the lines that were used in draw9patch by default.
Right Click the file and choose edit with gimp.
Now in gimp you will see the picture, and the lines drawn in for draw9patch. This will save you time. Edit the picture as you see fit. Change the color, or completely redesign the image. Then when you goto save it, choose file save as. Keep the same file name but save it on your desktop, creating another folder naming it new theme nine files. Save the image.
Open up Eclipse.
Click on file-new-android project
When it Opens, click in the field named Project Name type "nine files"
In the field called "Built Target", choose Android 1.5, click the check box next to it.
In the field called "Application Name" type "ninefiles"
In the field called "Package Name" type "com.example.ninefiles"
No Quotes in any field.
Uncheck the box labeled "Create Activity".
Now your Workspace should be open in eclipse, and on the left pane there should be a folder labeled ninefiles. Double click on it and it will expand a folder tree. Look for res. Then click it if it's not expanded as well. Look for drawable. There will be a file in there called icon.png. Leave that file alone. Now on your desktop, open the folder called new theme nines. Click, drag and drop the edited icon_highlight_rectangle.9 file right into that drawable folder in eclipse. You are skipping using draw9patch because the lines were there from the start.
Now go back to the parent folder in Eclipse, the one labaled ninefiles where all the other folders come from. Right click on it and choose android tools all the way near the bottom. Then slide over and choose export unsigned application. This will bring up the save prompt on your screen, choose the desktop once again, and export it. It will show a message about the export and telling you to zip align it and sign it with a device key. Ignore all this, your just using Eclipse to target that .9.png. Keep in mind every time you open Eclipse now, it will show you the workspace with ninefiles. Expand the folders, delete the last image you used Eclipse to work on and add new ones in, bypassing the need to create a new android project each time.
Lets say your new .9.png image is nothing like the original and it won't display correctly using the lines on it after decompiling in apk manager. You need to feed the image through draw9patch.bat located in c:\android-sdk-windows\tools\
Double click it and a shell will open, then another one will open on top of it that has a square with a down arrow in it. Save your image from gimp into the folder on the desktop called new theme nines, like you did above. Then Drag and drop the saved image on top of the windows inside the square, and on top the arrow lol.
The picture will be transformed in draw9patch concentrate on the outer edges along the entire image. Bring your mouse over to the left of image around dead center. Click once and draw a pixel. Next go dead center on the top just like you did on the left and draw the 1 pixel. Now expand that line up and down on the left side looking at your 3 preview pictures on your right hand side. If there is no gradient or fade effect to your image the center pixel will be about good enough but if your image fades, expand that line up and down and your 3 previews will give you an idea if you capture it or not. Once you have the left side of the image looking good, begin the same process on the top. Use as little line as possible to have the image looking right. Never have a gap in the line that you draw.
Now focus on the right side and the bottom. The two lines drawn there should be about the size of the entire image minus a few pixels at the very end. You can get the idea from the one you pulled from apk manager and adjust the lines to work on your changes. When your done with draw9patch, click file save 9 patch. It will save in the folder on your desktop. Now drag and drop this image into the drawable folder of Eclipse/ninefiles as described above.
This should be a shortcut to getting you busy with 9 files. Any questions or anything noticed missing, please let me know.
One last bit of advice. Sometimes when you open a file in draw9patch, the image is zoomed in too big and you can't get to the outer edges to draw the top and bottom lines. There is a bar at the bottom of the program that will allow you to zoom in and out of the main image and zoom in more to the 3 preview images. Use these to adjust the image to where you can work with them.
All these introduction guides should get you started, your own drive should take you the rest of the way. I'm not the first to write a theme guide I'm just sharing with the Epic community because the amount of new users who are requesting how to do these things. All my information came from asking questions to those that were theming before me like Khanning, Crake, Chibucks, the list is never ending. Also this list of videos here have helped a lot:
http://forum.xda-developers.com/showthread.php?t=593932
.9.pgn write up posted.
Just AMAZING thank you so very much...
No problem I hope I wrote it so anyone starting fresh could understand
rjmjr69 said:
Just AMAZING thank you so very much...
Click to expand...
Click to collapse
Do as thou wilt be the whole of the law
I'm really digging these guides as I really want to get into theming and eventually (with any luck!) cooking ROMs. i'm a self made techie and pick things up pretty quick, so I thought theming was a good place to start off.
any chance you'd consider a writeup on extracting a theme from a themed ROM, pitfuls and things to know/watch out for etc... i think that would be a helpful supplement to see how themes are implemented in ROMs and know what certain files affect. maybe even a list of what parts of a theme/ROM are in what files (such as lockscreen i think is android.policy.jar etc...)
thanks again for your time and effort into putting this out there
No doubt, there is definitely more write ups to be done my goal was to get some guides out that just touch on the basics so people who never tried before can begin to get their get wet.
Do as thou wilt be the whole of the law
hey so i wanted to come back and thank you again for these. i've read but havent dived into editing .9.pngs just yet, but i've really been playing with the rest of the stuff to mostly modify existing themes that i like most of, tweaking a bit. its really cool and i cant wait to actually start putting some of my own stuff together. i know the threads havent gotten a lot of love but its appreciated!
Hey, this is amazing, thx so much for it.
I'm running into a prob and wondered if you could assist.
I've already modded (only replaced/changed some png colors on photoshop), and have flashed it successfully to my phone with no problems. However, when I pull the framework res back out, decompile (with no problems), then try to recompile immediately (as instructed), that part seems to fail. It errors, then asks if it is a system apk (yes?)...then creates a temp folder and asks me to delete the resource.asc if I've modded an xml. Even though it errors, I made a change to the strings xml, compiled, with same error, then signed and flashed- it seems to work fine, but the change I made to the xml didn't hold.
any ideas or suggestions?
Thx again so much.
sent from my RAZR
decalex said:
Hey, this is amazing, thx so much for it.
I'm running into a prob and wondered if you could assist.
I've already modded (only replaced/changed some png colors on photoshop), and have flashed it successfully to my phone with no problems. However, when I pull the framework res back out, decompile (with no problems), then try to recompile immediately (as instructed), that part seems to fail. It errors, then asks if it is a system apk (yes?)...then creates a temp folder and asks me to delete the resource.asc if I've modded an xml. Even though it errors, I made a change to the strings xml, compiled, with same error, then signed and flashed- it seems to work fine, but the change I made to the xml didn't hold.
any ideas or suggestions?
Thx again so much.
sent from my RAZR
Click to expand...
Click to collapse
i "think" thats because you are recompiling edited images. i think thats what he mentions elsewhere in these threads, always compile with stock images, then drag and drop your edited images. so you probably want to start with a stock framework, not one that already has edited images in it. i'm learning too though so dont quote me.
EDIT: hey dreamsforgotten, getting an error exporting: Failed to export NineFiles: C:\eclipse_workspace\Nine Files\bin\NineFiles.apk doesn't exist!
EDIT2: looks like somehow my ADB got wiped out from the tools folder so Eclipse couldnt find it, reinstalled, pointed to it in Eclipse preferences, works like a charm.
I think you are correct.. Ive just gotten so far away away from the original.. On my (own) 5th revision . That's cool though. I did try decompiling and re compiling immediately on an untouched framework, and it did in fact work.
sent from my RAZR
hey i was wondering if you have already posted your 2nd tutorial? If not is there going to be one anytime soon?
dreamsforgotten said:
Where do you go from here?
http://forum.xda-developers.com/showthread.php?t=817998
Click to expand...
Click to collapse
see above bro! each one has a link to the next, if your a little tech savvy they should be enough to get you started, i learned off of them so if you have any questions feel free to ask!
useruser25 said:
hey i was wondering if you have already posted your 2nd tutorial? If not is there going to be one anytime soon?
Click to expand...
Click to collapse
Noob Questions- I'm new to theming but i catch on very quick. I just have a few questions tho..I'm running on the Midnight ROM (CWM3)..I like the DK28 Gingerbread Theme 1.8 but would like to change the text colors a lil..So I Decomplied and recompile with zero errors..i ended up with a smaller file and it was named unsignedframework-res.apk..So i changed the name to framework-res.apk and put it back into the DK28 Gingerbread Theme zip so that i could flash it..I tryd to flash it in CWM3 but it told me it was aborted bc it was a bad file..so my two questions are how to get a theme to be CWM3 compatible and what im a doing wrong when it comes to decompiling and recompiling? Any advice would be greatly appreciated Thanks in advance
Noob Questions- I'm new to theming but i catch on very quick. I just have a few questions tho..I'm running on the Midnight ROM (CWM3)..I like the DK28 Gingerbread Theme 1.8 but would like to change the text colors a lil..So I Decomplied and recompile with zero errors..i ended up with a smaller file and it was named unsignedframework-res.apk..So i changed the name to framework-res.apk and put it back into the DK28 Gingerbread Theme zip so that i could flash it..I tryd to flash it in CWM3 but it told me it was aborted bc it was a bad file..so my two questions are how to get a theme to be CWM3 compatible and what im a doing wrong when it comes to decompiling and recompiling? Any advice would be greatly appreciated Thanks in advance
I haven't made a cwm3 zip yet but for a short cut you can find a theme created for it and copy the files from your theme in leaving the meta inf folder alone. I've noticed in the past as well when I recompile the file gets smaller and smaller according to the pc but that end up flashing all the same. Hope that helps.
Sent from my SPH-D700 using Tapatalk
chris378 said:
Noob Questions- I'm new to theming but i catch on very quick. I just have a few questions tho..I'm running on the Midnight ROM (CWM3)..I like the DK28 Gingerbread Theme 1.8 but would like to change the text colors a lil..So I Decomplied and recompile with zero errors..i ended up with a smaller file and it was named unsignedframework-res.apk..So i changed the name to framework-res.apk and put it back into the DK28 Gingerbread Theme zip so that i could flash it..I tryd to flash it in CWM3 but it told me it was aborted bc it was a bad file..so my two questions are how to get a theme to be CWM3 compatible and what im a doing wrong when it comes to decompiling and recompiling? Any advice would be greatly appreciated Thanks in advance
Click to expand...
Click to collapse
You can't decompile and recompile a framework with different images. The .9s will show funny
You need a edify script for cwm 3
Sent From Da Hood.

[GUIDE] A n00b guide to porting themes :P (26/12/11)

Hello A little while ago I managed to learn how to theme totally from scratch. I knew nothing of anything before I started, but now I know how to port themes As I still see myself as a n00b there may be some weird things I've done, but at least I manage to create the themes This might not be the best way to theme, or the easiest, but it works
Overview PNGS
1) Getting the files
2) Getting the images
3) Port
4) Package and Sign
The only programs I've used is 7zip and autosigner download them and install 7zip and extract autosigner to a nice location for example your desktop
Getting the files
The first you need to do (after getting the programs) is to find the file you will mod (edit). This will mostly be the framework-res.apk because this decides most of looks of phone (for example the statusbar). Download the .zip of the rom your going to theme. Open it up (shouldn't require any programs, if does, use 7zip: either drag it onto the 7zip icon or right click and choose open with). Open system -> app and copy the framework-res.apk (or any other apk you would like to theme, for example the settings). Now paste it into an appropriate folder.
Getting the images
Now you need to find the images you want to use in your new theme. Find either an update.zip with a theme or an .apk with a theme chooser theme (if there is both a version for Froyo and GB, use the Froyo version as this will make it easier ) Open it up with 7zip (drag it into the 7zip icon). Now you can do either of two options:
1) You can take the whole drawable-mdpi folder and copy it out. You should probably don’t do this with a Themechooser apk, as they usually don’t have all icons in this folder, as they often lend a few from HDPI.
2) Take only the images you want and copy them to a folder. For example if you want the signal icons, copy the “stat_sys_signal_0” (-4 of course) and copy them out. If you want the statusbar background, copy “statusbar_background”. This way you can mix several themes, take the best of several themes and make your personal theme
When you’re done getting your icons, close the window.
Porting
Now open the Rom’s default framework-res.apk with 7-zip. If you’re going to port a whole theme, delete the /res/drawable-mdpi folder and copy in your own. If you’re going to port just a few icons, open the /res/drawable-mdpi folder and paste your icons. You might want to check if the icons have the same names in the different framework. For example the headset icons can be both “stat_sys_headset” and “stat_notify_headset”. Also if you port from a theme chooser theme, you will have to rename every single .png you port. This is really boring, but necessary. You need to remove the “framework_res” and the “android_systemui” from the beginning of all the names. So “framework_res_activity_title_bar.9.png” needs to be changed to “activity_title_bar.9.png”. Because this is so boring you better keep your renamed icons, so it’s easier to port it to another rom
This is kind of off-topic: my carrier lends network of another carrier. Therefor my phone is allways roaming. This puts a stupid “r” with my signal icons. To avoid this I allways take normal signal icons, copy them, and rename one of the two .pngs from for example “stat_sys_signal_1” to “stat_sys_r_signal_1”. This way I get rid of this stupid “r” and it will always show the normal icons
Packing and signing
Now the porting is done and the next job is to push the new framework to your phone. If you are familiar with adb, you can push it to system/framework on your phone. You don’t need to anything more with the apk before pushing it. Else you can create a flashable .zip for your theme. I’ve attached a .zip with update script (I haven’t created it. Just stole it from one of Elelinux’ add-ons ). Download the zip. Create a folder named system and a folder named framework. First drag the new, modded framework_res.apk to the framework folder, then drag the framework folder into the system folder, before you drag the system folder into the attached zip. If you use Clockworkmod recovery, you can just flash the zip right as it is, but if you use Amon_Ra or want it to be compatible with every recovery because you want to post it, you need to do something.
Unpack autosigner and launch the exe file inside. Drag the .zip into the new window and press sign. It will now appear a new file in the same folder as the file you wanted to sign. Its name is the same, but with “_signed” at the end. You can rename the file as you wish both before and after the signing.
XML Editing:
I decided to add a little section about XML editing as well I really don't know all about this myself, but i can tell how to set it up and some examples to what you can do Even though this may seem really complicated, it's not written in a completely different language, like Java in the smali files, so often it is possible to use logic to get what you want
Tools needed: APK Multi-tool. as well as Java, if you don't have it installed.
Overview:
1) Setting up
2) Examples
3) Finish
Settings up
Download APK Multi-tool and extract/ unzip it to wherever you want ( I have it on my desktop). Now you can place the apk you want to modify (usually the framework_res.apk) in the "Place_apk_for_modding" folder. Then you open the script. If you don't get an error, proceed to b), if you do get an error proceed to a)
a)) If you do get an error where it says something like "java not found" you need to correct the Java path (or install Java if you haven't done that, which you should have) . I had to do this to get it working. First open my computer and click disk C, or D if you have installed Java there. Open programfiles (or whatever it's called in your language) and scroll to the Java folder. Now open the folder there jdk folder or whatever you have there and open the "bin" folder. Look at the top of your window, where it says where on you're computer you are (like Windows: C to the left, and then Programfiles and so on). Right click it and click copy address. Mine is "C:\Program Files\Java\jdk1.7.0_01\bin . Now you can close the window.
Open "My computer" again. On the top bar below the navigationbar, click Sytemoptions (sorry, not really sure what it's called in Englsih, as my computer is Norwegian, please correct me if I'm wrong). On the left click the "advanced" link and in the popup that appears click "environment variables". Scroll down to the "path" variable and edit it. Paste the address you copied and click OK. You should now be able to proceed to b). If you still get an error, please tell me and I'll try to help
b) type 25 and press enter to select current project. Here you will see all the apks in the "Place_apk_for_modding" folder. Select the appropriate number (in this case probably 1) and press enter to continue. Then you hit 9 and enter to decompile it. I cannot really explain it, but it enables you to edit the xmls in the apk. If you try to edit them by using 7Zip, the xmls will be just messed up. When it's done decompiling, you have gotten a new folder in the "projects" folder. In this case it is probably named framework_res.apk. Minimize the script (DON'T CLOSE IT) and you're ready to edit the xmls
Examples on edits:
COMING SOON
Finish:
When you're done editing, open the script again (remember what I said about not closing it? ). Click 11, unless you are editing a non system apk. If you are editing the framework or settings or such, use 11. If you get an error now, you have probably done something wrong, try to see in the log what you have done wrong. Every time I've had an error, I've ended up in bootloop when I've flashed, so it is probably better to just start over. Another tip is to do one thing at the time. For example: you decompile, edit the notification color in pulldown, compile. Take the compiled apk, decompile edit another thing and so on, this makes it easier to not mess up and it also shows what you are doing wrong.
On the "Is this a system apk?" you should probably say y, as I said above. I also usually copy over the files I didn't edit, as this seems safer. Follow the instructions and you should be fine. When you're done and the script is done compiling, you will find a unsigned_**** (for example unsigned_framework-res.apk) in the "place_apk_for_modding" folder. This is your modified apk, and you can try to push it to ur device with an update.zip or adb, if you know how to use that
Well this was the end of my guide for now If there's anything which is unclear or you have other suggestions, feel free to post I've probably forgotten something
Finally after all my attemps to modify the android framework before i have do it correctly. I have changed a couple of things, the lock screen and battery icons so far. The framework I'm modifying is the one on Ele's Gingerbread and i wonder how to get the battery icon percentage 1 by 1 as i saw in some other themes. What i mean is that in the original framework there is only battery icons for 15, 20, 25 and so on, and if i push the 16, 17, 18, 19 they won't work. Is Theme Chooser the one on charge of this? how can i get that? some help please?
(Also tryed to theme a sense rom, but everything was messed up, i guess because of sense or maybe I did something wrong)
So thanks for your guide, really helpfull
Yeah, I've never tried to theme Sense so I don't know. It is probably possible to make icons for every %, but then you'll have to decompile using APK tool, and it is harder. I don't know how. If you want to try, you could try asking a question here
thanks
so funny=))
i'm tried
Great guide helped me a lo thx.
Finally, someone who CAN explain it...
I'm now porting ICS to GB (no cm7), cause I think CM sucks.
mDroidd said:
Finally, someone who CAN explain it...
I'm now porting ICS to GB (no cm7), cause I think CM sucks.
Click to expand...
Click to collapse
Hmm, ICS themes can be made really awesome, if you do some more advanced stuff. For example you want to remap the pulldownbar a bit, and change som text colors. But to do this you need to use a tool like APK multi-tool, and it is a bit more advanced. If you want to, I can create a new section where I show how to this
Thank you.
GUIDE UPDATED! Added a section about XML editing really quick, probably forgotten something and such, so just ask if there is something you don't understand This is for those who are getting used to the PNG editing and want to proceed to something slightly more advanced, for example you 7Tosta
Cheers
BTW: I should've reserved the 2nd post, this is getting messy
Edit: If there's anything specific you want me to add to the EXAMPLES section, tell me

[Guide/Reference] The Basic APK & Theming Thread... {15/11/15}

Hi there.
The greatest thing about Android is that you can change just about every element of the U.I, and if all you want to do is change a few images it's as simple as copying and pasting, but this guide will teach you how to...
[*]Use ADB Commands
[*]Deodex
[*]Decompile
[*]Recompile
[*]Sign
[*]Zipalign
...in an easy to follow manner that will have you theming your own apks in no time. There are many many GUI programs which I'll link to below that automate the following process but experience has taught me that it's important to know the basic process for when those programs don't work, are no longer maintained or you just don't like them for whatever reason etc, and to be honest command line editing for me is just as quick, and I personally prefer the ability to have everything in one folder. So lets begin.
Some Requirements:
A Rooted Phone.
A BACKUP OF YOUR PHONE!
Java - Do this first if you don't have it installed already.
Notepad++ - An essential program for xml editing!
Photoshop or Gimp - You'll need one of these for image editing.
7-Zip or WinRar - Required for apk editing.
Patience. :silly:
Use Linux or a Mac? See the following threads for more information on using apktool on other Operating Systems...
[WIN/LINUX][Decompile/Compile] Quick Mod Tool 4.0 [decompile and compile with speed]
APK Manager for Mac OS X
[Linux][UTILITY][TOOL] APK Multi-Tool
[tutorial] decompiling,recompiling and signing in linux (27-01-2013)
How to install and use Apktool with Ubuntu
​
Quick Tips;
.apk files are applications on your Phone, but when they''re on your computer you can browse them exactly like you would a .zip file, so set your default zip program as the default program for handling apks which will makes things much easier when working with them.
Download themes for your Phone, for other Phones too even and compare the res folders and screen shots of the theme as that will give you a good idea of what image you need to look for when modding your own apks.
If all you want to do is change images then you don't even necessarily need to decompile, you can just drag and drop images in to an apk to replace a stock image so long as they have the same file name.
For more complex mods like changing text colors and layouts (.xml files) and editing .9 png images then you will have to decompile.
​
{
"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"
}
Most of us will have Java already installed, but if you don't then get it installed before doing anything else. To save you the time and hassle of figuring out what else you need to download etc I've made a zip for you to download which contains Apktool and ADB.
Download APKTool_CMD.zip to a location of your choice, preferably the C:\ drive which will give you a folder to work from. This is how mine currently looks...
Once your folder is setup, java and other tools installed, you're going to want to get any apks you want to theme off your Phone and there are numerous different ways to this, but we're going to use adb commands to pull files to your computer so we need to open a command prompt window in your Apktool folder. To do this simply hold the shift key then right click your mouse in the Apktool folder and select "open command window here", or just click on the included command prompt.bat.
I like to pull the whole system as soon as I'm rooted as it gives me a backup of stock files which I can then copy and deodex to be themed.
The command to pull your whole system is...
Code:
[B]adb pull /system/ Z1C_368[/B]
...you can choose something other than Z1C_368 as your folder name but it will create that folder in your Aktool folder. Alternatively you can just download individual folders, the commands are as follows...
Code:
[B]adb pull /system/app/ Z1C_368 app
adb pull /system/priv-app/ Z1C_368 priv-app
adb pull /system/framework/ Z1C_368 framework[/B]
...or pull individual files...
Code:
[B]adb pull /system/framework/framework-res.apk[/B]
...so now you should have a APKTool_CMD folder with another folder within it and at least your app, priv-app and framework folders in that, which we can use for the next step.
The tool I use is this - [Tool/Utility] JoelDroid Lollipop Batch Deodexer. While I will deodex all the files I've pulled to my computer experience and battery life has taught me to only deodex the apps I've themed on the phone, rather than run a fully deodexed ROM.
Before you can do anything else you need to install your framework-res.apk and SemcGenericUxpRes.apk/twframework.apk, which will put two apks at C:\Users\YourPCName\apktool\framework which are the resources apktool uses to work its magic. The two commands to install your two resource apks are...
Code:
apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk
The command for decompiling is...
Code:
[B][U]apktool[/U] [U]d[/U][/B] framework-res.apk
...which will create a folder named like for like except for the .apk extension, and in this folder is where you'll find a couple of folders, the main one always being the res folder as it's in this folder that you'll find your images and xmls to edit. First glance of a decompiled res folder can be overwhelming, 596 folders in my frameworks, but we only need to focus on a handful in the majority of apks, and they are...
drawable
drawable-xhdpi-v4 (drawable-xxhdpi-v4 depending on your device)
layout
values
...you may need to delve into others sometimes but it's very rare that I've had to.
Once you've finished making your mods you need to recompile your apk using the following command...
Code:
[B][U]apktool[/U] [U]b[/U][/B] framework-res
...notice you only use the folder name here. If you get any errors here due to a bad edit apktool will usually tell you, in a roundabout way, you just need to read the code it throws up then retrace your steps, correct any bad edit and try again. If all goes smoothly you'll now have a new folder called dist, which contains your newly modified apk, but you can't use that just yet.
This is where 7-Zip or WinRar comes in to play. We need to extract from the original apk the Android.Manifest.xml and META-INF folder, into the dist folder, then from the new apk extract the resources.arsc also into the dist folder, then drag and drop all three files back into the new apk, but NOTE, it's important that you choose store as the compression method, any other will break the apk, and if you replace a broken framework-res.apk you will bootloop.
And signing is as simple as that. Alternatively you can use the following command...
Code:
[B]java -jar signapk.jar testkey.x509.pem testkey.pk8[/B] framework-res.apk.apk framework-resS.apk
...notice the extra "S", the output name has to differ from the input name otherwise it will give an error, if done right it will create a new apk called framework-resS.apk, just remember to rename it back to the original before using it on your Phone.
[TOOL] pySignare - Quickly Sign APKs [Windows]
Signing For The Play Store
If you plan on Publishing a Theme or any other app/apk to the Play Store then using the above method to sign your apks just wont work because you need to give it an individual signature that is unique to you, thankfully @AndroidGraphix has written a great guide that will show you how, it's a bit more fidgety than the above method but simple enough to follow...
AndroidGraphix said:
Click to expand...
Click to collapse
- Noobs guide to signing an APK with a Private Key​
DISADVANTAGES OF UNALIGNED APKs
Quite understandably, situation would be reserved for unaligned application packages. Resource reading would be slow and memory usage would be on the higher end of the spectrum. It would also depend on how many unaligned applications are present. For example, if less number of applications with an unaligned home application, you’d see slower application launch times. This is the best case scenario. For a worst case scenario, having a number of unaligned applications will result in the system repeatedly starting and killing processes, struggling with lags and huge battery drain.
Click to expand...
Click to collapse
- SOURCE
Move your new signed apk into your APKTool_CMD folder, you can overwrite your original if you want, and use the following command...
Code:
[B][U]zipalign -v 4[/U][/B] framework-res.apk ZAframework-res.apk
...notice the ZA, zipaligning creates a new apk which has to be named different from the original, but use what you want, it'll need renaming again before you use it.
So now we need to transfer your apk back to your Phone, you can do it by copying to your SD, then to your system, change permissions, then copy to the right folder, but that's not only time consuming but highly tedious too, so a simpler method is to use adb using the push command as this allows us to push straight to the system overwriting the original with the correct permissions too. To use this method you'll need you'll need an unsecure kernel and/or Chainfires adbd Insecure app. Try the app first but if you still can't mount and push files read this thread - [HOW TO]Make your favorite kernel adbd insecure to run ADB as root on /system and try again.
Rename your zipaligned apk to it's original name, then we need to mount the system before we can push direct to the the system, and the command for that is...
Code:
adb remount
...then we need to make sure we're pushing our apk to the right folder on the Phone, so for the framework-res it's...
Code:
[B][U]adb push[/U][/B] D:\Xperia\Z1C_368\APKTOOL\framework-res.apk /system/framework
...yet for the SystemUI it's...
Code:
adb push D:\Xperia\Z1C_368\APKTOOL\SystemUI.apk[B][U] /system/priv-app/[/U][/B]SystemUI
...if it's any one of those two then generally you need to reboot, so just type...
Code:
adb reboot
...your Phone will restart and if you've done everything right your new mods should be displayed, happy days. So that's it for how to use command prompt for modifying apks.
So now you know how to prepare an apk for editing your going to want to theme it obviously, and the following links will help you with that.
XML 101 - XML Modding Made Easy!
How To Edit Resources
The Ultimate Android Themeing Guide
[GUIDE] Smali coding guide for beginners
[Reference] Interactive Phone Modification [GUIDE]
[TOOL] Android Drawable Resizer Tool
[GUIDE] Want to learn how to theme?
[Guide] demystifying build.prop [Valid entries]
General Questions about Themes GO HERE!!!!!
[INFO] Custom framework-res.apk resources.arsc using vendor overlays
[Tutorial][NICS Themer] Create Your Own Themed apk & Become a Themer
​
U.I Modding
Tutorial :- Changing App Icons
[TUTORIAL]How to Theme Your MMS
[How-to] Edit the "About Phone" display
[Tutorial][VIDEO] Add/integrate apps into Settings app!
[TUTORIAL] Where to find the colors for making a theme
[MOD][GUIDE]LockScreen Clock with seconds[ANY ROM]
[TUTORIAL] How to add various framework/Settings mods
[TUT][JB] HOW TO THEME SystemUI.apk for TOTALLY newbie!
[HOWTO] Integrating/Adding applications to the settings menu
[TUTORIAL][ICS][GB][JB]How to change Android's black background
[GUIDE][Ultimate]Theme Apps To Dark Theme | Theme Whole System | Newbies Here! 12/11
​
Text...
Text Color Guide
[GUIDE] Tips for themers
[GUIDE][REF]Changing System Text Settings
​
Statusbar...
[MOD][TUT] Merge The WiFi And Signal Icons
[GUIDE][MOD][SYSTEMUI] How to add 0.00KB/s meter on statusbar GB/ICS/JB
[TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!
[How-To]Removing Battery Percentage, Adding Toggles,Battery Circles to Statusbar
[GUIDE][Mods][All Devices]How to add/ Change Clocks to Analog/ Digital with Seconds
​
The three best/most popular GUI programs are...
@Diamondbacks - Virtuous Ten Studio
@Ticklefishs - [TOOL] Tickle My Android
@BDFreaks - [Tool]Advanced ApkTool
...there are others but these are I what I tend to see referred to the most.
TIP:
Restoring modified files if you mess up is easier and quicker with a CWM.zip, especially if you're modifying any framework apks! Just because an apk might build with no errors doesn't mean it won't give you any when installed to the Phone.
I hope after reading this explanation you're left wondering what all the fuss is about, as it really is quite simple. I'll use the following two images, btn_default_pressed_holo.9 & status_bar_close_off.9 to illustrate the basic point of the borders...
Decompiled .9pngs:
Recompiled .9pngs:
Those borders control which part of the image is stretched (Left & Top) and where on the image content will be displayed (Right & Bottom). We'll use Draw 9-patch which is for editing the borders of decompiled .9pngs and lets you see how the image, when stretched, will be displayed on the Phone. Notice that the borders are different sizes, well that's because I only want/need a certain part of the image to stretch to get the desired look on the Phone.
...in the image below the left side shows the stretched image and desired effect should look on the Phone and the right side shows how it would look if I had edited the borders incorrectly or used none at all...
You can get away by not using a border but you would need to edit your image to specific dimensions to accommodate for the stretching, for example it might look fine for a simple OK button but it might not look right if you used the same .9png for a screen press which stretches the whole length of the screen, so you're better off just using them to begin with, plus you'll more than likely get errors down the line while decompiling or recompiling your apk.
The use of the border is made even more clear when you add text to an image. For my status_bar_close_off.9 I've filled all four sides of the image (except for an empty pixel in all four corners as that is the max amount of border you can use) as I need it to stretch the image just how I've edited it...
...but if I used the same sized left side border as the btn_default_pressed_holo.9 then this is how it would look on the Phone...
...which is obviously not the look I'm trying to achieve, as the left side border is causing the image to stretch incorrectly.
So that's basically it, depending on the image you're editing you can usually leave the borders alone but if you create one from scratch then you might need to play about with them if your images doesn't look quite right when used on the Phone. Here's a few links that will assist you further, especially the batch editing...
How to edit .9.pngs
[TUTO] Create your 9.png !
[UTILITY][TOOL] 9patchPngSuite [Windows&Linux]
How to draw NinePatch images with Photoshop - .9.PNG
[TOOL][Multi-Platform][.9.png][ALL DPIs] Android Resizer Tool
[Tutorial][Commentary] How To Batch Edit .9PNG/PNG Images
[tool] 9compiler - batch process for themers android
ClockworkMod Recovery zips are used for flashing individual files to whole ROMS and can be a life saver if you push a badly edited apk to your Phone that results in a bootloop. There's also a few programs that can assist you with that too, but if all you're doing is replacing a few files all you really need is a template, then it's just a matter of creating the Phones folder setup in the zip which is simply creating folders: system\app - system\media\audio etc then dragging and dropping your files into it. A basic understanding of the updater script is essential, a ROM.zip will more than likely wipe your Phone whereas a Theme.zip may just replace files but it might delete some also.[/QUOTE]
See below for a CWM.zip Template but first some helpful links...
[Tool]easy flasher v4 (ur own update.zip)
[Tool][Windows/Linux] Android Flashable Zip Creator
[Utility-Tool][DEVandThemers]CWMflashpack.zipCreatorV1{TheCollective}w/EdifyScripting
ERRORS encountered in CWM Recovery
[TUT] [for NOOB] editing updater-script for noobs!
[TUTORIAL] Making Flashable ZIPs, EDIFY Script, ZIP Signing & Key Creation
​
This is my Restore_zip which is set up so you can add your own files to the framework and apps folders in the main system location, but you can easily add other folders to it if you want to add things like fonts, tones or anything else, just remember to add folders within folders if that's where the files you want to include are such as tones, media\audio\alarms for example.
If you navigate to META-INF\com\google\android you will find the updater-script which controls how the zip works and the text you see when you run it in CWM. As this zip is just for basically over writing files you don't need to edit anything except for a few lines...
...this is how I've edited it for my theme...
...so just edit it using Notepad++ to your liking.
When adding files to your zip add them using Normal as the Compression Method...
...Remember to remove the text files I've added otherwise they will be flashed to your folders too.
And that's pretty much it, the only way you're really going to learn is by reading then putting into practice what you've read and picking stuff up along the way, fortunately there are numerous guides for numerous mods and tools to help with a variety of tasks.
Notable credits and thanks to @iBotPeaches and @Brut.all for making it possible with - Apktool
Useful Suff...
rovo89 said:
In this thread, I'm presenting a framework which gives you the possibility to modify your ROM - without modifying any APK (developers) or flashing (users)!
...
Advantages:
No need to modify any APKs. This means:
No need to decompile, change things in smali, compile, sign, ...
It will work for odexed and deodexed ROMs.
Your mod is not bound to a specific version of the ROM. Unless there is a major change in the methods called for a certain functionality, your mod will continue to work even when you upgrade your ROM. Hell, it will probably even work with different ROMs.
Multiple mods can be installed at the same time, even if they change the same package. So you can use these battery icons and those quick toggles. Even hooking the same method twice is possible. Of course, this only works properly if the mods are not trying to do incompatible things.
It does its magic at runtime. That means you can implement options to let the user decide if they prefer the bikeshed to be painted in red or blue. Or you can have some extra logic for certain ROMs without building different mod versions.
It can be disabled easily without having to reflash.
It's open source.
Click to expand...
Click to collapse
- [FRAMEWORK ONLY!] Xposed - ROM modding without modifying APKs
Annex1 said:
CM10.1-THEME_BOOK
Theme book was created by Annex and Ebs512. I've been asked alot of questions from how to get started? what do I need to get started? to What Graphics program do I use? etc. We made a real simple theme guide to help get you started. This is in Layman Terms.. Nothing fancy.
ONLY THING FANCY IS MY FLASH BOOK
YOU MUST HAVE A FLASH PLAYER INSTALLED TO VIEW THIS!!!
Click to expand...
Click to collapse
- [GUIDE] HOW TO THEME CM10.1 - Animated Book
[Guide] Porting XTheme themes
[How to] XMLGenerator.jar + batch script v2.0
[Guide] Xposed Framework/TabletUI (Noob-Friendly)
[Tool] Drawable XML generator for CM7 theme chooser
[Guide] How to port themes to T-Mobile Theme Chooser
[Tool] [Theme Creator] [CM/Avatar] Theme creator tool
[INDEX][WiP] List of APPs & MODs that use XPOSED Module
[Tool] nhnt11's XML Generator Revived V2+Extended UPDATED!
[DEV/GUIDE]Creating APKs for use with TMobile Theme engine
[Tool][PortCx] Port CM Themes to Xtheme Engine in One Click!
Theme-Porter [v1.0] [Any Firmware / Rom Compatible] [WINDOWS]
[GUIDE] T-mobile theme engine for the faint at heart (non-linux users)
[1/30/2013] Mega 4.2.1 BlackBean Theme Template [XXHDPI/XHDPI/HDPI/TVDPI]
[MOD][XPOSED][4.0+] XThemeEngine beta5 - Theme engine for any rooted phone
[APK][Xposed] ResXploit : Theming your android the easiest way! No decompiling APKs!
-·=»‡«=·-[JB][CM10] Theme Engine Template Updated To V4 [8-7-12][XHDPI/HDPI]-·=»‡«=·-
Hi Guys, I tried to do a small tweak to my ROM like just a color change to signal bars, as mentioned in the XDA university, but once the apk is pushed to system/app and restarted, it went to bootloop. I just changed the color of a image file using GIMP (as mentioned), then dint work, so just tried decompiling SystemUI.apk and then recompiling then folder without any changes and push to system folder, even that dint work, then i saw this thread, i tried the replacing the resources.arsc from old apk (opened using winrar, and dragged to my folder), the opened my new recompiled SystemUI.apk with winrar and added this resources.arsc file which i extracted with compression option as Store, then pushed it bcak to /system/app folder , every time i pushed i connected the phone in recovery mode. But still in bootloop, the moment i replace the apk with original one, it works, can some one pls point out what am I doing wrong ?
Hardware - I9100 - galaxy S2
ROM - JellyBAM 3.3
Kernel - Siyah 5.1+
thanks,
merin
merin_83 said:
Hi Guys, I tried to do a small tweak to my ROM like just a color change to signal bars, as mentioned in the XDA university, but once the apk is pushed to system/app and restarted, it went to bootloop. I just changed the color of a image file using GIMP (as mentioned), then dint work, so just tried decompiling SystemUI.apk and then recompiling then folder without any changes and push to system folder, even that dint work, then i saw this thread, i tried the replacing the resources.arsc from old apk (opened using winrar, and dragged to my folder), the opened my new recompiled SystemUI.apk with winrar and added this resources.arsc file which i extracted with compression option as Store, then pushed it bcak to /system/app folder , every time i pushed i connected the phone in recovery mode. But still in bootloop, the moment i replace the apk with original one, it works, can some one pls point out what am I doing wrong ?
Hardware - I9100 - galaxy S2
ROM - JellyBAM 3.3
Kernel - Siyah 5.1+
thanks,
merin
Click to expand...
Click to collapse
Hi There
Try using 7zip to update the apk instead of winrar. if that doesn't work, post your logcats,
Thanks
trevd said:
Hi There
Try using 7zip to update the apk instead of winrar. if that doesn't work, post your logcats,
Thanks
Click to expand...
Click to collapse
I will try that when i get back home today, and is there any option i need to set when using 7zip like store mode ?
thanks,
merin
hi, I tried with 7zip, 1st i just opened the recompiled zip with 7zip and dragged and dropped the resources file from original apk to this archive, and pushed to phone , still boot looping, and then tried to right click on the resource file from original apk, and selected add to 7zip archive, and changed the archive format to .zip/compression mode to Store and saved, then pushed to phone, still boot looping. So here i have attached the logcat, hope that is correct how i have done it, after rebooting the phone, i typed in consle logcat > log.txt and it was waiting for device, once in boot loop i did ctrl + c, then it exited. Please let me know if you need more info, do i need to attach my original SystemUI.apk and framework-res.apk ??
Happy New Year !!!
thanks,
merin
Nice tuts I will try at home :thumbup:
Sent from my ST18i using xda premium
merin_83 said:
then i saw this thread, i tried the replacing the resources.arsc from old apk (opened using winrar, and dragged to my folder), the opened my new recompiled SystemUI.apk with winrar and added this resources.arsc file which i extracted with compression option as Store, then pushed it bcak to /system/app folder , every time i pushed i connected the phone in recovery mode. But still in bootloop, the moment i replace the apk with original one, it works, can some one pls point out what am I doing wrong ?
Click to expand...
Click to collapse
Hi.
Are you copying the AndroidManifest.xml and META-INF folder from the original to the new apk too?
Actually i did the exact thing you said yesterday, when i found in the youtube, and it worked thank you!, but dint copy the resource file (but had some fc's when opening camera 1st time), may thats the reason,,, so i should copy AndroidManifest.xml and META-INF and resource file ?, and is this a standard procedure when we do a recompile every time ? or it varies with situation ?
thanks,
merin
Hey hi guys....can any 1 tell me how to set boot image which i want hmmmmm
Sent from my HTC Desire HD using xda app-developers app
merin_83 said:
so i should copy AndroidManifest.xml and META-INF and resource file ?, and is this a standard procedure when we do a recompile every time ? or it varies with situation ?
Click to expand...
Click to collapse
It's how I do it every time and never have an issue (unless I've screwed up somewhere), so yes.
sagar4all007 said:
Hey hi guys....can any 1 tell me how to set boot image which i want hmmmmm
Click to expand...
Click to collapse
oh okey thank you XperienceD, does it make a difference if we just use apktool or Androidsuite for decompiling and building ?
thanks,
merin
merin_83 said:
oh okey thank you XperienceD, does it make a difference if we just use apktool or Androidsuite for decompiling and building ?
thanks,
merin
Click to expand...
Click to collapse
I think androidsuite uses apktool for its decompiling and build it just uses it through a ui as apktool is command line so its more a preference of use for you
Sent from my GT-N7000 using XDA Premium HD app
ttibbetts83 said:
I think androidsuite uses apktool for its decompiling and build it just uses it through a ui as apktool is command line so its more a preference of use for you
Click to expand...
Click to collapse
What he said. I've set this up for when such programs don't always work.
How about some links for how to guide for Ubuntu user and some links on .XML file editing I was doing .apk mods on windows then started messing around with Ubuntu and find its I little more work to get it setup but all an all it to me is a better environment for android then windows IMOA
Sent from my GT-N7000 using XDA Premium HD app
ttibbetts83 said:
How about some links for how to guide for Ubuntu user
Click to expand...
Click to collapse
After a quick search for android theming ubuntu there doesn't seem to be a lot of information for it, and this post...
Nikkopt said:
What and where have you heard about Ubuntu helping on theming? It depends on personal taste and choice. You also have much more tools to help you graphically on windows and mac os.
Click to expand...
Click to collapse
from this thread - Which version of Ubuntu is recommended for theming? suggests why.
here are some links for ubuntu installs that will help with .apk modding on ubuntu for those who want it
how to setup apktool on ubuntu
http://my.opera.com/ubuntunerd1/blog/2012/08/20/how-to-apktool-with-ubuntu-under-construction
ubuntu version of paint.net
http://pinta-project.com/
xaraxtreme looks to be a good program from what i have read but i have not tryed it out yet
http://www.xaraxtreme.org/download.html
gimp is avalable through ubuntu software center and for .xml ubuntu has built in editer software just by right click and open with text editer
hex color website http://www.procato.com/rgbfind/
Nice guide my friend :good:
if anyone get apktool doesn't work on apk JB 4.2.2 ROM you can use this Latest apktool http://d-h.st/cze
Rizal Lovins said:
Nice guide my friend :good:
if anyone get apktool doesn't work on apk JB 4.2.2 ROM you can use this Latest apktool http://d-h.st/cze
Click to expand...
Click to collapse
Thanks Rizal.

Building Your Own LG Themes

Introduction
This is going to be a long post! A few weeks ago I started thinking about making my own themes for my LG G5. I had installed some custom roms previously and used substratum a bit but I have always ended up going back to xpirt's Fulmics rom, which doesn't allow this. I started to think how I could do this and have today got to the first stage of being able to change the colours of my phone to precisely what I want, not only for the settings but in some of the stock apps. I thought I would share this with the community and provide some step by step instructions so you can try it yourself. This should work on LG G6, V10, V20 & V30 if you use an app made for these phones but I have no way of testing this so don't hold me to it. This has taken me about 5 full days to work this out and there is still more that I need to do.
I am not in anyway a developer or coder and have very little knowledge of Java so if anything goes wrong here it is likely that I will not be able to help you. I absolutely am a noob at this and do this only for a hobby, using just my common sense and our friend Google to overcome the problems I have come across. Saying that, I will try to offer assistance if I can.
I managed to make my theme from reverse engineering a free LG theme app that was readily available. If you do this method though please consider getting approval from the app developer first. There is a template on here posted by Raafat here. While this was helpful it was only basic and I could not work out exactly what to do. Reverse engineering an app was much easier. Here is how I did it with step by step instructions:
******DISCLAIMER******
I am in not responsible for what you do to your phone. If you decide to try and theme your phone make a backup first or be prepared to do a full reset if anything goes wrong. You do this at your own risk.
1. Programmes
The programmes/software needed for theming are:
• Notepad++
• Apktool
• Android Studio (I used version 2.3 as I was getting an error on re-signing with 3.0)
2. Installing Frameworks Using Apktool:
• Firstly, delete the files in your local temp directory. To do this open ‘Search’ and type in %temp% and delete all files in this folder. You may not be able to delete some of the files. This does not matter
• Next, extract the framework files from your rom/custom rom. For Fulmics 5.5 this was:
Frameworks-res.apk
lge-res.apk
• At a guess I would say that any rom will have these files named exactly as they are above, but I am not sure if these have been altered by xpirt for his rom so you may not be able to use them across other roms.
• Open a command prompt and navigate to the folder where the framework files are kept. This is easiest in a folder called C:/apktool so create a folder in your C:/ drive and place them there. You can of course name the folder or locate it where you want though.
• Use apktool to install the frameworks using this command in the command prompt in C:\apktool
apktool if framework-res.apk
apktool if lge-res.apk
• Once this is done you should find the following files Installed here: C:\Users\[your username]\AppData\Local\apktool\Framework
1.apk
2.apk
• If, like me, you get an error with apktool that says it cannot write to C:\Users\[your username]\AppData\Local\apktool\Framework and instead has placed them in the temp folder then go into the Local folder using the pathway above and create a folder called 'apktool' and then a subfolder called 'framework'. Try the commands again and it should then work.
• You should also find the following files in the C:\apktool folder (if that is the folder you are using). If they are not here you may have to copy and paste them from the apktool github download.
apktool.jar
apktool.bat
• If you have found these files then you are set to go with decoding the theme/app you have chosen as a basis to amend.
3. Decoding APKs Using Apktool
• Download the apk/app you want to use. I used Backup and Restore app from Play to get the app I wanted to use onto my PC. Once you have this on your PC place the main APK/app in the same folder as the apktool.bat and the apktool.jar (for me this this was C:\apktool)
• Point the command prompt at this place and type the following:
apktool d [app name]
• A folder with the name of the app you just decoded will appear in the directory that you use (in this case C:\apktool)
• In this folder you should find another folder called assets. There may be more sub APKs here in subfolders. This subfolder will likely be assets>overlays
• All the sub APKs in here will have to be decoded otherwise you will have different signing keys and the app, once compiled again, will not work. Decode all the sub APKs in this same folder. You will have to copy the following files to the folder you are decoding the sub APKs in. These are:
apktool.jar
apktool.bat
• Decode every sub apk using the command apktool d [sub_apkname]
• You should now have the same number of folders in the drive as the number of sub APKs, if you decoded them all.
4. Changing the Colours and other Themes from the Decoded APKs Using Notepad++
• Many theme APKs will have internal APKs, such as common, settings, phone, systemui, calendar etc, etc. This is what I have worked out so far:
Common: Changes the switches, brightness bar and the text headings in settings, changes swipe left panels in apps such as gallery, changes background, message icon & phone icon colour in contact/phone app, statusbar background, separating lines in settings (some themes do not have these), background bar of setting title (i.e. wireless network, device etc), settings text colour, secondary text (i.e. the text you see under Wifi and Bluetooth which shows you what you are connected to), the headings in apps such as clock where it shows 'Alarm' 'World Clock' 'Timer' etc
System UI: Changes the quick settings tiles & text and the non-heading text in settings
• To change the colour of these you have to amend the colors.xml located in one of the folders in the assets>overlays and then the folder of the overlay you want to change. I used Notepad++ to do this. Navigate to 'res' folder and then usually something like 'values-xxxhdpi-v4'. There is sometimes more than one color.xml file so you may need to look in more than one folder and amend all the color.xml files. The colours are at the end of the lines of text and will be standard Android colour coding, such as ffffffff (white) or 00000000 (black) or any other colours.
5. Building APKs & Signing with Android Studio
• If you are building the sub APKs from an app (these are the ones inside an APK such as common, systemui, phone etc) I found it best to use a different folder. For this I used C:\apktool builder
• Copy and paste the folder from the decoded APK (e.g. the [appname].LGE.common folder) that is in the asset>overlays folder to the apktool builder folder above
• Once you have made the colour amendments it is time to build the amended themes. To do this you will need Android Studio
• Open the splash screen of Android Studio and instead of the 'Open' command use the 'Import Project' command and navigate to the folder you want to import
• When opening Android Studio you have to configure the frameworks otherwise you will not be able to sign the app. This warning should come up automatically. THIS MUST BE DONE FOR IT TO WORK
• Navigate and find your APK in apktool builder and import it. If you do this more than once you will be prompted to overwrite the settings a few times.
• Go to ‘Build’ along the top and choose ‘Generate Signed APK’. If this is the first time it will ask for the Key Store Path. You will need to choose ‘Create New’. Select a place to store this key (I chose C:\apktool Builder) and input the passwords and the other data in the boxes. You must put a two-digit country code in the last box, for example US, UK etc). For ease I kept most of these very simple. For example, password was 'asdfgh'
• Once this has been completed and if there are no errors (warnings are ok) then it will generate a signed sub APK and save it to the location you are in (in this case C:\apktool builder). Copy and paste that sub APK over the one in the C:\apktool folder where the original sub APK was kept.
• Once you have done this then you need to sign the main app APK. Do the same as above and build in Android Studio. If there are no errors it will save it to your directory (in my case C:\apktool\[app name].
• Copy and paste this APK into your phone, apply the theme and it should work.
Everytime you amend a sub apk you will have to re-sign it through Android studio and then re-sign the main app apk. Once you get the hang of it though it is fairly straight forward.
6. Other Things
Nothing else in the app will change at this point. The name, wallpaper jpegs, screenshots and icons will all be the same. I am working on this at the moment but they don't actually need changing that much. The difficult thing for me is how to change the 9.png icon files and still get them to work. Once I have worked this out I will be able to finish it off.
7. Screenshots
Attached are some screenshots of how my phone now looks. I have made a few different apk's with different colours so I can now change this daily if I want a change (see post 2 for updated screenshots).
8. Thanks/Credits
@xpirt - Made it easy to get the framework files I needed for apktool and for a great custom rom!
@Raafat - for giving me the idea and the initial information
@iBotPeaches - for developing apktool.
.
Building Your Own LG Theme
I've been able to fine tune the themes over the past few weeks and have been able to colour the settings icons on the main settings page as well as putting a background behind it. I've also been able to theme the switches initially getting over a problem of the 'off' switch not showing. Here is some updated screenshots of a green/grey&blue theme.
I've also attached the updated blue & red theme from the initial post. I've not fully completed this yet though as I started to concentrate on the green/grey&blue theme as I preferred that.
Could someone make a stock theme just dark? I found one on play store but is not the best thing (it changes system sounds and other things that i don't like) I'd like a full stock theme but dark. Thanks in advance
Help
Can you help me? I tried changing package names in .json file and added new icons in the theme. I don't understand why it is failing on apply. It was running properly with only color change before doing this.
[email protected] said:
Can you help me? I tried changing package names in .json file and added new icons in the theme. I don't understand why it is failing on apply. It was running properly with only color change before doing this.
Click to expand...
Click to collapse
Here is the apk.
I probably won't be able to get round to this until the weekend due to work commitments but will have a look and let you know.
strikerman10 said:
I probably won't be able to get round to this until the weekend due to work commitments but will have a look and let you know.
Click to expand...
Click to collapse
Take your time, and thanks. ?
[email protected] said:
Take your time, and thanks. ?
Click to expand...
Click to collapse
In case you haven't checked the apk I provided earlier, I have found and fixed some package name errors but the result is still same. It get stuck at 90% and then fails. I have changed icons too, is there anything needed to do in public.xml ? New apk is attached below.
strikerman10 said:
I probably won't be able to get round to this until the weekend due to work commitments but will have a look and let you know.
Click to expand...
Click to collapse
Did you took a look at it?

Categories

Resources