[Galaxy Y GT-S5360 General] Akshay Kumar Raheja:
HOW TO GET KITKAT/JB/ICS TITLE BAR ON GINGERBREAD DEVICES​

THIS GUIDE IS TOTALLY MADE BY ME.

​

I KNOW THERE'S ALREADY A GUIDE FOR THIS BY SIR SPACECAKER. BUT THIS ONE IS TOTALLY DIFFERENT FROM THAT ONE. AND IN THIS GUIDE, THE TITLE BAR DOESN'T SCROLL WITH SCROLLING WINDOWS CONTENT :D:cowboy:

REQUIREMENTS:

1.	APKTOOL

2.	PC WITH JDK Installed.

3.	framework-res.apk,twframework-res.apk, Services.jar,Settings.apk or any other apk you want to apply Kitkat/JB/ICS title bar to.

4.	KNOWLEDGE ABOUT DECOMPILING, RECOMPILING, EDITING ETC(Don’t ask me how to do that. Use xda search options instead)

5.	PATIENCE
​

IF YOU’VE ACCESS TO ALL THE REQUIRED STUFF, YOU CAN PROCEED WITH PROCEDURE.

HOW TO APPLY KITKAT/JB/ICS TITLE BAR IN SETTINGS

1.	First decide which type of title bar you want in your Rom. Then download its zip from below(ICS, JB, OR KITKAT TITLE BAR).

2.	Now decompile framework-res.apk.

3.	Now extract the content of downloaded zip in decompiled framework-res.apk.

4.	Now open /decompiled_framework-res.apk/res/values/styles.xml and add this above this line "</resources>"

<style name="Theme.sett" parent="@style/Theme">
<item name="windowTitleSize">@dimen/akrtb</item>
<item name="windowTitleStyle">@style/WindowTitlesettt</item>
<item name="windowTitleBackgroundStyle">@style/settt</item>
</style>
<style name="settt">
<item name="background">@drawable/djbtitle</item>
</style>
<style name="WindowTitlesettt">
<item name="textAppearance">@style/TextAppearance.WindowTitle.sett</item>
<item name="singleLine">true</item>
<item name="drawableLeft">@drawable/set_akr_m</item>
</style>
<style name="TextAppearance.WindowTitle.sett" parent="@style/TextAppearance">
<item name="textSize">19.0sp</item>
<item name="textStyle">normal</item>
<item name="textColor">#ffffffff</item>
</style>
<style name="Theme.sett_i" parent="@style/Theme">
<item name="windowTitleSize">@dimen/akrtb</item>
<item name="windowTitleStyle">@style/WindowTitlesettt_i</item>
<item name="windowTitleBackgroundStyle">@style/settt</item>
</style>
<style name="WindowTitlesettt_i">
<item name="textAppearance">@style/TextAppearance.WindowTitle.sett</item>
<item name="singleLine">true</item>
<item name="drawableLeft">@drawable/set_akr_i</item>
</style>

Now open /decompiled_framework-res.apk/res/values/dimens.xml and add this above this line "</resources>"

<dimen name="akrtb">50.0dip</dimen>

5.	Now recompile framework-res.apk and install the new framework-res.apk again using "apktool if framework-res.apk" command in command prompt. and do same with "twframework-res.apk" using this "apktool if twframework-res.apk" command.

6.	Now decompile Settings.apk and open /decompiled_Settings.apk/AndroidManifest.xml. after uses-permission codes, it looks like this (see pic below).

You have to add these highlightes codes in your AndroidManifest.xml in same place

android:theme="@android:style/Theme.sett_i"
android:theme="@android:style/Theme.sett"

7.	Now recompile your Settings.apk and don’t forget to sign it because we have changed AndroidManifest.xml. Now you need to disable Signature verifications in your Services.jar otherwise Settings.apk will not work.

HOW TO DISABLE SIGNATURE VERIFICATIONS IN SERVICES.JAR

a. Decompile Services.jar and open /decompiled_Services.jar/smali/com/android/server/packagemanagerservice.smali and look for this code :

.method checkSignaturesLP([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)]
.registers 10
.parameter "s1"
.parameter "s2"

.prologue
.line 1922

and modify it like this :

.method checkSignaturesLP([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)]
.registers 10
.parameter "s1"
.parameter "s2"

.prologue
.line 1922
const/4 v6, 0x0

8.	Now push all the three files(Settings.apk, framework-res.apk and Services.jar) in your Phone using adb, or by making flashable zip or by any means. :p

HOW TO APPLY KITKAT/JB/ICS TITLE BAR IN USER APPS

1.	First Decompile the apk you want to have this title bar. Lets say “xyz.apk”

2.	Now extract the downloaded folder in your decompiled apk.

3.	Now open /decompiled_xyz.apk/res/values/Styles.xml and add this above this line

"</resources>"

<style name="Theme.akr.xyz" parent="@android:style/Theme">
<item name="android:windowTitleSize">50.0dip</item>
<item name="android:windowTitleStyle">@style/WindowTitleakr_xyz</item>
<item name="android:windowTitleBackgroundStyle">@style/akr_xyz</item>
</style>
<style name="akr_xyz">
<item name="android:background">@drawable/djbtitle</item>
</style>
<style name="WindowTitleakr_xyz">
<item name="android:textAppearance">@style/TextAppearance.WindowTitle.akr</item>
<item name="android:singleLine">true</item>
<item name="android:drawableLeft">@drawable/set_akr_m</item>
</style>
<style name="TextAppearance.WindowTitle.akr" parent="@android:style/TextAppearance">
<item name="android:textSize">19.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ffffffff</item>
</style>

4.	Now open directory /decompiled_xyz.apk/res/drawable-ldpi/ and change "set_akr_m.png" with the png you want to be shown on title bar and make sure that your png size doesn’t exceed 40x36 pixels.

5.	Now open /decompiled_xyz.apk/AndroidManifest.xml and add this code after <application as you did in case of Settings.apk.

android:theme="@style/Theme.akr.xyz"

6.	Recompile and sign it now. And install it ;)