Showing posts with label Apktool. Show all posts
Showing posts with label Apktool. Show all posts

Monday, April 14, 2014

APKTool Basics: Modding Android Apps

I know there's so many of you who wants to try editing or creating their own taste by modifying android apps or APK files. Here is the guide which you can use as your start to modding.

Here are the process which you need to know about APKTool Basics: Modding Android Apps.

First we must setup everything required apps. Download them here.
Now extract APKTool to:
C:\APKTool\
After all mentioned above, we are now ready for modding.

I. Installing Framework
II. Decompiling
III. Start Editing
IV. Recompile
V. Signing


APKTool Basics: Modding Android Apps

I. INSTALLING FRAMEWORK

Installing your ROM's framework will be the first thing to do when modding to obtain compatibility.

1. You must take/copy the "framework-res.apk" file from your current ROM and place it to APKTool folder, you can find it at "system/framework/framework-res.apk".

2. Go to APKTool folder and run "Command Prompt" file as administrator.

3. A command prompt will appear and type this command.
apktool if framework-res.apk

II. DECOMPILING

Decompiling is the process of decoding or producing the source codes of any program. Without decompiling a program, it is impossible to be read by human. We must decompile APK files so we can be able to edit XML files and smali files. 

To decompile an APK file, you must place it to APKTool folder and run command prompt. So this is the command to decompile.
apktool d sample.apk sample_folder
In my case I want to decompile my SystemUI.apk which is responsible for Statusbar elements.


After successful decompiling APK, a folder will be created as what you named it.

III. EDITING

This is the difficult part of modding. For now, start with replacing icons and PNGs but be sure it has the same file extension and the same size. 
You can find the icons and PNGs used in the APK by opening the decompiled APK folder

\res\drawable-nodpi
\res\drawable-hdpi or mdpi or ldpi, depends on your screen resolution.

I'll be posting more of it soon so let's just stick with the basic guides.

IV. RECOMPILING

This will be the stage of rebuilding the codes, XMLs and smali files back into a single APK file. To recompile, simply run the command prompt follow this command:
apktool b sample_folder_name new_sample.apk
In my case, I want to recompile my decompiled SystemUI folder.


V. SIGNING APK

Sign only non system apps unless you have modified AndroidManifest.xml file. From command prompt, type:
java -jar SignApk.jar testkey.x509.pem testkey.pk8 sample.apk signed_sample.apk

Done!




Credits to Rizal Lovins for the signing keys.

Sunday, April 13, 2014

Make Your First MOD Now with Android APKTool


As an android user, I'm sure you are aware what does an android OS is capable of, one of the best part of it is modding. There's to many android mods that exist in the internet but the problem is its compatibility to our device.

Make Your First MOD Now with Android APKTool


I present to your APKTOOL, the tool which most android modders are using to modify any android application. APKTool is a tool used to decode and rebuild android applications to apply some fixes or modifications. Other than that, what I like most of this is it's very lightweight and easy to use.

To make your first mod now with android APKTool, you must have:

1. JDK (Java Development Kit) - Download

2. Android SDK (OPTIONAL. install this if you want to edit 9.png, use ADB, zipalign and other utilities)
- Download

3. Notepad++ to edit XML files - Download

4. Winrar (to open compressed files and APK files) - Download

5. APKTool - Download

You can now start modding by following APKTool Basics: Modding Android Apps

I'll be posting here the tutorials so Subscribe Now with Facebook.






Credits:

https://code.google.com/p/android-apktool/

http://forum.xda-developers.com/showthread.php?t=2195680