[Android Themes] girakshay:
Below are the instructions. I've followed these and it worked for me.

You can down the tool which i mentioned earlier from

http://xdaforums.com/showpost.php?p=43353411&postcount=54

Have Fun. Let me know when you encounter errors. I'll be more than happy to assist you.

How to Decompile/Recompile apk & jar + Basic editing xml/smali

Android General - xda-developers - xdaforums.com

TOOL/GUIDE GB/ICS/JB] How to Decompile/Recompile apk & jar + Basic editing xml/smali

I want to share the tool for editing apk, and making a slightly guide for decompile/recompile apk and basic editing xml/smali... and this guide and tool for Windows user...

REQUIREMENTS :

Download and Install on your computer

1. JDK here

2. 7zip here

3. Notepad++ here

4. Android SDK for patch 9.png until Zipalign the apk (Optional) here

5. Apktool & baksmali + Signer for all GB/ICS/JB ROM here

Save or extract apktool to folder directory :

Windows XP : C:\Document and Settings\folder your computer name\here

Windows 7 : C:\User\folder your computer name\here

CREDITS & BIG THANKS TO :

- Brut.all for apktool

- Team Reject for Quick baksmali/smali file

- Yorzua for Sign apk file

- Rizal Lovins for support me

1. How to Decompile and Recompile *.jar file or classes.dex

- Copy *.jar file to apktool folder (make sure is the same folder). for example : android.policy.jar

- Open android.policy.jar using Winrar or 7zip and extract classes.dex file

- Drag & drop classes.dex to Quick-Baksmali.cmd (decompile process)

- wait and you will see a folder with the name "classout"

- now you can start editing smali file on classout folder (use Notepad++ for editing it)

- After editing is complete, Drag & drop classout folder to Quick-Smali.cmd (recompile process)

- After recompile is complete, there will be a file with a name "new-classes.dex"

- Open android.policy.jar using Winrar or 7zip

- Rename new-classes.dex to classes.dex, and Drag & drop to android.policy.jar with normal compression

- finally, push back android.policy.jar into the system your device. push manual using root explorer/similar application or make a flashable zip.

2. How to Decompile and Recompile *.apk file

a. Copy framework-res.apk to apktool folder (make sure is the same folder).

(Attention : to edit other default apk on system/app like Contacts.apk, Phone.apk. MusicPlayer.apk etc.. needed framework 2. for example : twframework-res.apk)

b. Copy other *.apk you want to edit to apktool folder. for example : SystemUI.apk

c. Open Command Prompt.bat

d. Decompile and install framework

Code:

apktool if framework-res.apk

apktool d SystemUI.apk

if your apk is Contacs.apk, Phone.apk, Camera.apk etc.. follow this guide :

Code:

apktool if framework-res.apk

apktool if twframework-res.apk

apktool d Camera.apk

e. wait and you will see a folder with the name "SystemUI or Camera"

f. now you can start editing png, xml, even smali file

g. After editing is complete, Now Recompile

Code:

apktool b -f -d SystemUI

or

Code:

apktool b -f -d Camera

h. After recompile is complete, go to SystemUI or Camera folder, Open dist folder and open SystemUI.apk or Camera.apk using Winrar/7zip

i. Open Original SystemUI.apk or Camera.apk Using Winrar/7zip

j. Drag & drop META-INF folder and android.manifest.xml (if you not edit android.manifest.xml), also lib folder if there in Original apk to SystemUI.apk or Camera.apk on dist folder. (screenshot wiil come)

k. Now Sign apk, example :

Code:

java -jar SignApk.jar testkey.x509.pem testkey.pk8 Camera.apk Camera_signed.apk

(Attention : Sign apk is only for 3rd Party apps, you can sign apk from system/app. but not all apk on system/app support)

l. Rename Camera_signed.apk to Camera.apk

m. finally, push back xxxxxx.apk into the system your device. push manual using root explorer/similar application or make a flashable zip.

Other Guide will come for GB, ICS and JB