NOTE : – THIS GUIDE CONTAINS VARIOUS METHODS WHICH I PERSONALLY USE TO THEME. THERE ARE SOME OTHER DIFFERENT WAYS IN WHICH YOU CAN DO THIS.
WHAT ALL YOU NEED TO THEME??
- APK Manager 5.0.2/APK Multitool : – Will be used for decompiling/compiling frameworks.
- APKTool : – This you need to place in your \windows\ folder.
- Java SDK : – This is necessary for the decompiling/compiling process. Also required in many patches for frameworks.
- GIMP : – This is the image editing software which we are going to use to edit/resize PNGs.
- Android SDK : – Again not of much use in this guide if using APKManager 5.0.2 (necessary if you are using APKMultitool) but always good to have for learning.
- WinRAR : – This will be used for opening the APKs for adding PNGs after editing.
- Notepad++ : – This we will use for opening the various XML/smali files for editing code.
- Unedited base framework : – Its necessary that its unedited because it may lead to errors(like error compiling .9.PNGs)
- Hex Colours : – You’ ll need hex colour values for using them in various XMLs. This here is a nice website for that.
- Lots of patience : – Now this skill you have to develop on your own.
HOW TO SETUP EVERYTHING FOR MAKING/PORTING THEME??
1) Download APK Manager 5.0.2 from the above mentioned link. Extract the contents to any of your drives.
2) Download APKTool (Main program as well as the dependancies for you respective OS). Extract both the .tars contents to :\windows\.
3) Download the latest version (7u2 currently) of JDK(Java SDK) from the site mentioned above and install it.
4) GIMP, Notepad++ : – Download from above mentioned site and install them.
5) WinRAR : – I guess you should be able to get this on your own.
6) Unedited base framework : – Any framework that is compile-able (Stock frameworks are always compile-able).
7) Android SDK : – Download either the zip or .exe from above mentioned site and set it up accordingly. (Note : – This step can be skipped)
CHECK WHETHER THE FRAMEWORK YOU HAVE IS COMPILE-ABLE (UNEDITED) OR NOT.
Before starting, always check. For this, place the framework-res.apk in \apkmanager\place-apk-here-for-modding\. Now start the script. Select Option 22(Set current project)and then select the project. Then select Option 9(Decompile apk). Let it decompile. After that, select Option 11(Compile apk). Select “YES” for “Whether it is system app”. Select “YES” for “Whether you want to include original files”. Let it compile.
If the compilation process goes smoothly without any errors, then you have the correct(unedited) framework which can be used for theming.
Note : – If you are using APKMultitool, then the process is same, except that you will need the Android SDK for its installation and proper functioning.APKManager Folders (Click to enlarge). APKManager Screen (Click to enlarge). EDITING VARIOUS XMLS : –
For information purpose, if you want to know what is an XML, then here is a nice read.
Decompile first : –
Place your framework-res.apk(should not be renamed after decompiling, so please rename before only) in the folder place-apk-here-for-modding. Start up script and decompile it(option 9). After decompiling, goto Projects folder. You will find your decompiled framework there.
Similarly, using the above method, decompile your twframework-res.apk(should not be renamed after decompiling, so please rename before only).
If you are porting a theme, then decompile the framework-res.apk and twframeowrk-res.apk from the theme to be ported also.
1) Editing Notification colour in notification drawer.
Files to be edited : – status_bar_latest_content_event.xml in \projects\framework_name\res\layout\.
* Goto \projects\framework_name\res\layout\.
* Open status_bar_latest_content_event in Notepad++.
* You will find 3 lines for editing the colour of the notifications.
1) android:id=”@id/title”. This is the title of the notification
2) android:id=”@id/text”. This is the description of the notification.
3) android:id=”@id/time”. This is the time of the notification
*Edit HEX value for “android:textColor” instance for the 3 above lines as per your likings. Or if you are porting from a theme, then just open the same XML file(i.e. status_bar_latest_content_event) of theme which you are porting in Notepad++ and copy paste the various HEX values to XML in your framework.
2) Colour of horizontal progress bars : –Progress Bars.
Files to be edited : – progress_horizhontal.xml in \projects\framework_name\res\drawables\.
* Goto \projects\framework_name\res\drawables\.
* Open progress_horizontal in notepad++.
* The progress bar uses 3 colours to set the colour which goes from top to bottom. You have to set three colors: start, end and middle.
1) <item android:id=”@id/background”> is for the unused part of the progress bar.
2) <item android:id=”@id/progress”> is for the used part of the progress bar.
* Edit all the HEX values as per you linkings. Or if you are porting from another theme, then just open the same XML file(i.e. status_bar_latest_content_event) of theme which you are porting in Notepad++ and copy paste the various HEX values to XML in your framework.
3) Changing secondary font colour : –Secondary Text Color.
Files to be edited : – zzz_tw_secondary_text_sub.xml in \projects\framework_name\res\color\
* Goto \projects\framework_name\res\color\.
* Open zzz_tw_secondary_text_sub.xml in notepad++.
* Look for the following instance,
<item android:state_window_focused="false" android:color="#HEXCOLOR_VALUE" />
<item android:color="#HEXCOLOR_VALUE" />
* Replace the HEXCOLOR_VALUE that is already there with the one of your choice.
* Note : – The default colour is blue in Samsung ROMs. Hex value #FF81BEE1.
4) Colour of the text when the text field is selected : –
Files to be edited : – styles.xml in \projects\framework_name\res\values\.
* Goto \projects\framework_name\res\values\.
* Open styles.xml in notepad++.
* Press CTRL+F and search for “<style name=”TextAppearance”>”. There you will find “textColorHighlight” attribute just below.
* Change the HEX value for the attribute as per your requirement.
For Theme Development Series #2, click here.