Advertisement

To start decoding or get source code of an application,first you have to download the target application.

Then open the terminal by pressing “ctrl+alt+t” keys simultaneously.

hgc9e8zhacwxa8ezg
au.1

Then type

sudo apt-get install apktool  or  sudo apt install apktool

i2rhtajtjqhqd5azg
au.2

press enter.

l3qt9f9fiajp4a2zg
au.3

It takes few seconds to install,after completion type apktool in terminal and press enter.

08exxj72k3t44c7zg
au.4
ekpbc13ld1ac5wazg
au.5

then if it shows like fig au.5 your installation is completed.

then change the directory where the target application ie apk file is present.

To change directory use cd directory-path

for example if app is in Downloads folder use cd Downloads/ if it is in a sub-folder of downloads folder use cd Downloads/sub-folder_name . Then type ls to check the items present in the specified directory.

pml1h5w6bbxavuuzg
au.6

in above case ie in fig au.6 target file is in apk folder of downloads directory.(here Downloads is main folder and targetapk is the sub-folder.

Then type ls to view the files present in them.

7za95lt23la13ouzg
au.7

In my case my target apk is “HelloWorld.apk” it varies from your target apk.

Lets go ahead, now type the command to decompile the android application

apktool d "yourapkname.apk" replace “yourapkname.apk” with your apk filename.apk in my case i replace it as apktool d HelloWorld.apk .

ajuvycfyeydf9iyzg
au.8
6qm04fhca8r9eh9zg.png
au.9

Then the tool decompiles and creates a folder named as like the target apk filename without apk extension.As shown in fig au.10

ALSO READ  Best CSS frameworks - 2018
c4kcr9dwyac52lpzg
au.10

Now you can see the decompiled files using file explorer or nautilus.It has  the contents shown in fig au.11

m9f7gh70fcr73d2zg
au.11

The files in the decompiled folder were xml files and image files(like app-icon etc..)

You can modify them by using any text editor.

NOTE: apktool decompiles only xml files,to edit java files we have to use “dex2jar and jd-gui”.We will post a tutorial leading them as soon as possible.

Fine,after editing how can i rebuild them,here it is

just go to terminal and type apktool b filename to create a modified apk file.

szl3gmuk4d3dvr2zg
au.12
mlh7almo7evz4szzg
au.13

 

The modified apk file will be present in a newly created dist folder.And an important thing that matters is before going to use the modified apk you have to sign the apk.

au.14

 

 

Signing the apk could be done through “keytooljarsigner”.

 

If you have any doubts comment us we will provide you solutions.

 

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.