FORUMS
Remove All Ads from XDA
Thread Deleted Email Thread
Prev Previous Post   Next Post Next
The Ultimate Guide

Preliminary Requirements:-

PC with Windows(Please avoid Windows Vista)
Java JRE or JDK
APK Multitool
framework-res.apk, SystemUI.apk, twframework-res.apk, com.htc.resources for installing
7-zip
Notepad++
Android Device for testing
Photoshop or equivalent image editing software
android-sdk(for 9 png editing)
Lots and lots of patience and mind


What this guide includes:-

Main Part:
1. Easiest Decompiling and Recompiling Guide *Must Read before continuing*
Theming Part:
2. APK png resources(General Location of General pngs)
3. Explanation of 9 pngs and how to edit or make them
4. How to Batch edit pngs (Not 9 pngs) (Changing color, etc)



All of us like if all things are present in one guide
This guide covers topics like decompiling, 9 png editing, theming in a very newbie friendly manner.

I have worked upon this guide to make it so that no problem arises during performing certain tasks which I faced.
I have covered workarounds such that they ensure LEAST no. of errors while performing these tasks.

However, if even then any problem arises, I am always there to help you out





Main Part:

Decompiling: [MUST READ]



We are assuming that you have installed JAVA, Android SDK and apk-multitool without any problems

1. Copy your mobile's framework-res.apk, SystemUI.apk and twframework-res.apk in others folder in directory where you have extracted apk-multiool
2. Open Setup.bat. Choose 2 :- Installing Framework-res


Setup.bat

Choose 1 (framework-res.apk)
Choose 2 (twframework-res.apk) [similarly install OEM specific files such as com.htc.resources , etc]
Choose 4 (SystemUI.apk)

Window will close each time you choose an option
You will have to restart Setup.bat each time

3. Now place the apk you want to edit in place-apk-here-for-modding

4. Now open script.bat. (If you see any error, either you haven't installed JAVA and SDK[adb] or they aren't implented, Please install them properly before continuing). Click any key to continue


APK-Multitool Window

5. You will see the above window. Now, make sure you have installed all frameworks and Compression level is set to 9.

6. Now, we will choose our project. Click 24. A list of files present in place-apk-here-for-modding will be in front of you. Choose any file

7. Click on 9. Now decompiling will be in process.

8. After it is complete, go to projects folder, you will see a folder with the name of apk you decompiled


Decompiled apk example

If it is decompiled properly, then there will be apktool.yml file in it

9. Do your modifications. Now, you can edit .9.png files (they will be discussed later) and xml files which were uneditable first

You will notice that there will be many new folders which weren't present in compiled form of apk. These all folders are generated from a file called resources.arsc present in compiled form which is absent in decompiled form


Such an example is of values folder which contains crucial xml files like styles.xml, strings.xml, ids.xml, etc

Always open xml files with Notepad++, it will mark commands and syntax making it look aligned and making it easy to understand


Example of decompiled xml file

Also, you can edit 9 patch files also which will be changed from now on

Example:-



We will discuss 9 png in detail later on

10. After you have done your modifications and you are ready to recompile the app, choose 11 (Compile System APK) if you are editing System App or 12(Compile Non-System App) if you are editing other than System App

11. a) If System App:-

After some time it will ask that if you want to copy additional files other than signatures to ensure less amount of errors, then choose y

After extracting some files, it will ask you to delete files from keep folder

Simply go to keep folder,
If you edited any pngs and there are many and you are lazy enough to delete one by one, then delete the whole folder in which you edited pngs


If you edited any xml file, then delete that xml file AND ALSO DELETE RESOURCES.ARSC


Why? Because we told that values and several other folders are generated from resources.arsc while decompiling
Now, if we don't delete resources.arsc, the modification we did in values folder will be reverted to original state


After doing this, go to script.bat again and press any key to continue


11. b)If its not system app:
Just recompile it and sign it man through the menu in apk multitool man.
It is easy as hell. Tutorial of non-system app has been ended here


12. Now, you will get another apk name System_ apkname.apk

Open both apks as archives by 7-zip


13. Last and most important step:-

Just drop the files you edited from new apk to old apk in correct folders. By now, you may have understood that resouces.arsc INCLUDES your edited xmls


14. Now, the final apk is not System_apkname.apk but apkname.apk (the original file you started with). Push it and enjoy













This is a work in progress.
Will add more things soon

Don't hesitate to ask any questions about anything


Credits:

@d3cka for teaching best about 9 pngs
@deathnotice01 for helping me
Miscellaneous Google and xda posts
The Following 56 Users Say Thank You to iamareebjamal For This Useful Post: [ View ] Gift iamareebjamal Ad-Free
Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes