[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] BDFreak:
Hi, guys...

Many user keep PM'ing me how to port colorizable function.

So I decide to do a simple guide for them.

Make sure you have a basic knowledge on how to compile/decompile .jar files.

Here you will find two types of tutorial.

First one is the simplest way and second one is the best way.

The Simplest Way :

Download Simplest.zip file from attachment

Decompile your framework.jar

Navigate to [framework.jar]\smali

Copy and replace all folders and files from Simplest.zip

Recompile your framework.jar

The Best Way :

Download Best.zip file from attachment

Decompile framework.jar

Navigate to [framework.jar]\smali\android\graphics\drawable

Copy the files from Best.zip

Navigate to [framework.jar]\smali\android\graphics\drawable\Drawable.smali

Search for new-instance v2, Lorg/xmlpull/v1/XmlPullParserException;

Add the red lines only

.line 863

.end local v0 #drawable:Landroid/graphics/drawable/Drawable;

:cond_e

const-string v2, "colorizable"

invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v2

if-eqz v2, :cond_10

.line 862

new-instance v0, Landroid/graphics/drawable/ColorizableDrawable;

invoke-direct {v0}, Landroid/graphics/drawable/ColorizableDrawable;-><init>()V

.line 863

.restart local v0 #drawable:Landroid/graphics/drawable/Drawable;

goto/16 :goto_0

.line 869

.end local v0 #drawable:Landroid/graphics/drawable/Drawable;

:cond_10

new-instance v2, Lorg/xmlpull/v1/XmlPullParserException;

new-instance v3, Ljava/lang/StringBuilder;

Save the file

Navigate to [framework.jar]\smali\com\android\internal\R$styleable.smali

Search for .field public static final ColorDrawable_color:I = 0x0

Add the red lines only

.field public static final ColorDrawable_color:I = 0x0

.field public static final ColorizableDrawable:[I = null

.field public static final ColorizableDrawable_color:I = 0x1

.field public static final ColorizableDrawable_drawable:I = 0x0

.field public static final CompoundButton:[I = null

Search for sput-object v0, Lcom/android/internal/R$styleable;->ColorDrawable:[I

Add the red lines only

sput-object v0, Lcom/android/internal/R$styleable;->ColorDrawable:[I

new-array v0, v4, [I

fill-array-data v0, :array_9d

sput-object v0, Lcom/android/internal/R$styleable;->ColorizableDrawable:[I

.line 30543

Search for sput-object v0, Lcom/android/internal/R$styleable;->WindowAnimation:[I

Add the red line only

sput-object v0, Lcom/android/internal/R$styleable;->WindowAnimation:[I

return-void

.line 21653

nop

:array_0

.array-data 0x4

Search for .method public constructor <init>()V

Add the red lines only

[/I].end array-data

:array_9d

.array-data 0x4

0x99t 0x1t 0x1t 0x1t

0xa5t 0x1t 0x1t 0x1t

.end array-data

.end method

.method public constructor <init>()V[/I]

Save the file

Recompile your framework.jar

Please Note :

Take backup before doing anything.

Use Notepad++ to edit files.

Don't forget to save the file after editing.

If you use ApkTool to decompile framework.jar then your path will be [framework.jar]\classout instead of [framework.jar]\smali

Please read the tutorial properly befor editing files.