[Galaxy Ace S5830i General] Powerhouse:
HOW TO DE-COMPILE , RE-COMPILE USING "APKTOOL"​

WHAT IS APK-TOOL : ​

ABOUT : ​

It is a tool for re-engineering 3rd party, closed, binary Android apps.

It can decode resources to nearly original form and rebuild them after making some modifications; it makes possible to debug smali code step by step.

Also it makes working with app easier because of project-like files structure and automation of some repetitive tasks like building apk, etc.​

​

EXPLANATION : ​

Suppose you want to modify an App according to the way you want it to be ..!!! This can't be done without any Tool .. So [MENTION=3924617]iBotPeaches[/MENTION] introduced the legendary Tool "APK-TOOL" ... It is used to modify the apps ..!! De-odexed app's make the work more easier ..It can decode resources to nearly original form..It hepls us with many repetitive tasks ..​

​

​

​

[/INDENT][/INDENT]

SETTING UP APK-TOOL :​

1) Install Java JDK :-

Before installing the Android SDK, you’ll have to install Oracle’s Java development kit. You can download it from here...(click me !!)

Even if you already have the Java runtime (JRE) installed, you’ll need to install the JDK as well... :)

​

After installing Java JDK , you can now download the Android SDK from Google .

NOTE :- If you see a any type of Java-related error during installation, then download and install the x86 version of the JDK, not the x64 one ...

2) Install Android SDK :-

Download Android SDK from here...(click me !!!)

​

After clicking on "DOWNLOAD FOR OTHER PLATFORMS" , you will get an extended menu ..

After downloading the .exe file , then Double click on the .exe file and install it in C:\ Drive or on whichever drive you wanna install .
​

3) Android SDK Setup :

Once the Android SDK is downloaded and installed, launch the SDK Manager application from your Start menu.

Enable the Android SDK tools and SDK Platform-tools checkbox and click the Install button. This downloads and installs the platform-tools package, which contains ADB and other utilities.

4) SETTING UP APK-TOOL :

Download Apk-tool from here ...(click me ...!! )

Now extract the Tar file...Open the extracted Apk-tool Folder...

Now hold shift and right-click button ..Now select "open command prompt here" in the new extended menu ..

​

And now , you gotta install Framework-res.apk,system-UI.apk ..etc ..

apktool if framework-res.apk

or

apktool if [I]name_of_apk_you_wanna_install[/I] .apk

Now lets decompile a .apk file .. :)

Here i will take Framework-res.apk as example ..

apktool d framework-res.apk

or

apktool d [I]name_of_app_you_wanna_decompile [/I].apk

After Modding the app it's time to re-compile the app ... Note that here you need not to enter the .apk extension as weel Just add the Decompiled folder name .. Like in my case the folder name is "framework-res"

apktool b framework-res

or

apktool b name_of _the_folder_of_app_you_decompiled

Now you can find your Modified new app in the 'dist" folder which is present in the De-compiled app Folder ..

​

Most important part is that you gotta sign your modified app .. In case of a system app there is no need . But if you modded any non-system app then signing the app is necessary or else the app won't install ..

SIGNING APP

Download this..{click me..!!}

Extract the .zip file and place the app which is to be signed in the folder..Now

java -jar signapk.jar certificate.pem key.pk8 path_of-folder-having-the-apkWhichIsToBeSigned .apk path-of-the-new-signed-apk.apk

eg ::

java -jar signapk.jar certificate.pem key.pk8 c:/xda/apktool/system_unsigned.apk c:/xda/apktool/system_signed.apk

ZIPALIGNING THE APP

copy zipalign.exe from C:\Program Files\Android\android-sdk\tools

Open cmd and type this code

zipalign -fv 4 nameOfAppYouWantToZipalign.apk New_NameOfZipalignedApp.apk

eg :

zipalign -fv 4 framework-res.apk framework-new.apk[/CENTER]

CREDITS ::

brut.all

iBotPeaches

All the guys who supported me and whatsapp friends ..

android-blog {learn it from 'em when i was new}​