[Galaxy 3 Themes and Apps] dhirend_6d:
HOW TO THEME SAMSUNG ROMS (GALAXY 3 MAYBE OTHERS)

​

Hello guys. I have had many requests to do this so here it is. :)

Let' s just get started.

NOTE : - THIS GUIDE CONTAINS VARIOUS METHODS WHICH I PERSONALLY USE TO THEME. THERE ARE SOME OTHER DIFFERENT WAYS IN WHICH YOU CAN DO THIS.

WHAT ALL YOU NEED TO THEME??​

APK Manager 5.0.2 : - Will be used for decompiling/compiling frameworks. Please don' t use the new version APKMulti-Tool 1.0.1 for now..

APKTool : - This you need to place in your \windows\ folder.

Java SDK : - This is necessary for the decompiling/compiling process. Also required in many patches for frameworks.

GIMP : - This is the image editing software which we are going to use to edit/resize PNGs.

Android SDK : - Again not of much use in this guide but always good to have for learning.

WinRAR : - This will be used for opening the APKs for adding PNGs after editing.

Notepad++ : - This we will use for opening the various XML/smali files for editing code.

Unedited base framework : - Its necessary that its unedited because it may lead to errors(like error compiling .9.PNGs)

Hex Colours : - You' ll need hex colour values for using them in various XMLs. This here is a nice website for that.

Lots of patience : - Now this skill you have to develop on your own. :)

HOW TO SETUP EVERYTHING FOR MAKING/PORTING THEME??​

1) Download APK Manager 5.0.2(Not APK Multi Tool 1.0.1) from the above mentioned link. Extract the contents to any of your drives.

2) Download APKTool (Main program as well as the dependancies for you respective OS). Extract both the .tars contents to :\windows\.

3) Download the latest version (7u2 currently) of JDK(Java SDK) from the site mentioned above and install it.

4) GIMP, Notepad++ : - Download from above mentioned site and install them.

5) WinRAR : - I guess you should be able to get this on your own.

6) Unedited base framework : - If you already have then good. If you don' t then please download from above link.

7) Android SDK : - Download either the zip or .exe from above mentioned site and set it up accordingly. (Note : - This step can be skipped)

CHECK WHETHER THE FRAMEWORK YOU HAVE IS COMPILE-ABLE (UNEDITED) OR NOT.​

Before starting, always check. For this, place the framework-res.apk in \apkmanager\place-apk-here-for-modding\. Now start the script. Select Option 22(Set current project) and then select the project. Then select Option 9(Decompile apk). Let it decompile. After that, select Option 11(Compile apk). Select "YES" for "Whether it is system app". Select "YES" for "Whether you want to include original files". Let it compile.

If the compilation process goes smoothly without any errors, then you have the correct(unedited) framework which can be used for theming.

EDITING VARIOUS XMLS

: -​

For information purpose, if you want to know what is an XML, then here is a nice read.

Decompile first : -

Place your framework-res.apk(should not be renamed after decompiling, so please rename before only) in the folder place-apk-here-for-modding. Start up script and decompile it(option 9). After decompiling, goto Projects folder. You will find your decompiled framework there.

Similarly, using the above method, decompile your twframework-res.apk(should not be renamed after decompiling, so please rename before only).

If you are porting a theme, then decompile the framework-res.apk and twframeowrk-res.apk from the theme to be ported also.

1) Editing Notification colour in notification drawer.

Files to be edited : - status_bar_latest_content_event.xml in \projects\framework_name\res\layout\.

* Goto \projects\framework_name\res\layout\.

* Open status_bar_latest_content_event in Notepad++.

* You will find 3 lines for editing the colour of the notifications.

1) android:id="@id/title". This is the title of the notification

2) android:id="@id/text". This is the description of the notification.

3) android:id="@id/time". This is the time of the notification

*Edit HEX value for "android:textColor" instance for the 3 above lines as per your likings. Or if you are porting from a theme, then just open the same XML file(i.e. status_bar_latest_content_event) of theme which you are porting in Notepad++ and copy paste the various HEX values to XML in your framework.

2) Colour of horizontal progress bars : -

​

Files to be edited : - progress_horizhontal.xml in \projects\framework_name\res\drawables\.

* Goto \projects\framework_name\res\drawables\.

* Open progress_horizontal in notepad++.

* The progress bar uses 3 colours to set the colour which goes from top to bottom. You have to set three colors: start, end and middle.

1) <item android:id="@id/background"> is for the unused part of the progress bar.

2) <item android:id="@id/progress"> is for the used part of the progress bar.

* Edit all the HEX values as per you linkings. Or if you are porting from another theme, then just open the same XML file(i.e. status_bar_latest_content_event) of theme which you are porting in Notepad++ and copy paste the various HEX values to XML in your framework.

3) Changing secondary font colour : -

​

Files to be edited : - zzz_tw_secondary_text_sub.xml in \projects\framework_name\res\color\

* Goto \projects\framework_name\res\color\.

* Open zzz_tw_secondary_text_sub.xml in notepad++.

* Look for the following instance,

<item android:state_window_focused="false" android:color="#HEXCOLOR_VALUE" />

<item android:color="#HEXCOLOR_VALUE" />

* Replace the HEXCOLOR_VALUE that is already there with the one of your choice.

* Note : - The default colour is blue in Samsung ROMs. Hex value #FF81BEE1.

4) Setting menu text colour to white in menus for black background : -

Files to be edited : - styles.xml in \projects\framework_name\res\values\.

* Goto \projects\framework_name\res\values.

* Open styles.xml in notepad++.

* Press CTRL+F and search for "TextAppearance.Widget.IconMenu.Item".

* The searched part will be like as shown in the following : -

<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">[B]?textColorPrimaryInverse[/B]</item>
</style>

**Change the above code to as shown below : -

<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">[B]@color/bright_foreground_dark[/B]</item>
</style>

* Then for text colour in "MORE" menu lists, press CTRL+F and search for "Theme.ExpandedMenu".

* The searched part will be as shown in the following : -

<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">[B]?textAppearanceLargeInverse[/B]</item>
<style>

** Change the above code to as shown below : -

<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">[B]?textAppearanceLarge[/B]</item>
<style>

5) Adding 1 percent battery mod to theme : -

Files to be edited : - stat_sys_battery.xml and stat_sys_batery_charge.xml in \projects\framework_name\res\drawable\.

* Goto \projects\framework_name\res\deawable\.

* Open stat_sys_battery.xml in notepad++. If there are no drawable values for 1% batterymod PNGs then, delete everything in that XML and copy paste the following code : -

[URL="http://pastebin.com/qRMqS2sy"]Click here for the pastebin data[/URL].

* Now open stat_sys_battery_charge.xml in notepad++. Check if there are drawable values for 1% battery mod. If there isn' t, then delete everything in that XML and add the following link : -

[URL="http://pastebin.com/pUxknPci"]Click here for the pastebin data[/URL].

6) Provider, Carrier, Ongoing-Title, Notifications-Title, Clear-Button, noNotificationsTitle : -

Files to be edited : - status_bar_expanded.xml in \projects\twframe_name\res\layout\

* Goto \projects\twframe_name\res\layout\.

* Open status_bar_expanded.xml in notepad++.

* Search for the lines : -

1) android:id="@id/plmnLabel". This is the Carrier name.

2) android:id="@id/spnLabel". This is the Provider name.

3) android:id="@id/ongoingTitle". This is the Ongoing-Title.

4) android:id="@id/latestTitle". This is the Notifications-Title.

5) android:id="@id/clear_all_button". This is the text of the Clear-Button.

6) android:id="@id/noNotificationsTitle". This is the text when no notification is displayed

* For each of the IDs above, there will be attribute android:textColor="<HEX_VALUE>". Edit the hex value as per your requirement. Or if you are porting from another theme, then just open the same XML file(i.e. status_bar_expanded) of theme which you are porting in Notepad++ and copy paste the various HEX values to XML in your framework.

7) Colour of the text when the text fiels is selected : -

Files to be edited : - styles.xml in \projects\framework_name\res\values\.

* Goto \projects\framework_name\res\values\.

* Open styles.xml in notepad++.

* Press CTRL+F and search for "<style name="TextAppearance">". There you will find "textColorHighlight" attribute just below.

* Change the HEX value for the attribute as per your requirement.

HOW TO COMPILE THE .APK BACK

​

Well here comes the big part. The part which usually causes the problems. You should consider the following points for this. The compilation process will go smoothly only if : -

You have not resized, replaced any .9.PNGs in the decompiled framework. If you want to you will have to do as I have described below in second post or else you will get compile errors. Lots of them.

You have not added any extra lines in XMLs which redirect to the PNGs(drawables) in the framework. If you have, make sure you have added the extra PNG to the framework as well.

**HOW TO COMPILE USING APKMANAGER : -

After you have made all the necessary edits to the framework, open up the script again.

Select option 22 and the select the project which you want to compile.

Then select option 19(Compression level for APKs) and select 0 for that.

You should see the compression level and the name of the project displayed above in the first line of the window.

After all that, select option 11(Compile APK). Select "Y" when it asks if its system APK. Select "Y" if it asks to include original files from APK or not.

Let it build the APK. If it builds successfully, then the most difficult part is finished.

[*]Minimize the script for a while. You will see a new folder named as "keep". Go to this folder and delete all the XMLs and the PNGs that you have edited. Don' t worry about the XMLs that you had edited in "values" folder. And also delete "resource.arsc" from the keep folder (Only if you have edited XMLs).

After you have done all that, maximize the script and press enter. Let it compile.

You will see your new compiled APK in the folder "place-apk-here-for-modding" in the form of unsigned<FILE_NAME>.

THIS WILL BE CONTINUED. STILL SOME MORE LEFT.​