• Skip to primary navigation
  • Skip to main content
  • Skip to footer
  • Home
  • Advertise With Us
  • Contact

TechWalls

Technology News | Gadget Reviews | Tutorials

  • Reviews
  • Tech Guide
  • Home Improvement
  • Gadget & Apps
  • Deals
  • News

How to Extract Java Source code from Apk file

By Guest Authors

Sometimes anyhow we lost our data due to some reasons then there is great trick to extract apk file and get the source code from that apk file. There are two tools you have to need for getting java source code from apk file.

These tools are listed following:

  • Dex2jar
  • Jd-GUI(Java Decompiles)

You can also download these softwares from following links:

  • (dex2jar)
  • (jd-gui)

There are some steps to getting source code from the apk file.

Step 1:

First make a new folder and put that .apk file (which you want to extract for getting the source code) into that folder. Now you have to change the name of that .apk file with extension .zip. Also change the file name for example supposesyour file name is file.apk and you changed that file1.apk.zip.  For example file.apk changes with file1.apk.zip and save this file in that folder.

After that you have to extract this zip file withWinRAR. Write click on that zip file and extract here. Then new folder will be created after extract that folder. When you click on new folder (generated after extract files) then you are only able to see draw able data there is no source code. From this you can get classess.dex files etc.

Step 2:

After first step now you have to download software from this link  and extract it in same folder. And extract dex2jar.zip file. And open the dex2jar file. When you open that folder you can see files and folder in it. Select all files and folder and copy. In your app folder (from which you want to fetch java source code) you have to paste all copied data in it.

Now open the command prompt. Go to left top of the window click file menu in that you have to click open command prompt. Then command prompt is open. After this you have to write in command prompt “dex2jar classes.dex” command and press enter. Then classes.dex2jar.jar is created in same folder.

cmd

Step 3:

Now you have to download java decompiler from given link . When download is completed put that downloaded zip file into same folder and extract that file. Open “jd-gui-0.3.5.windows” this folder. Now double click on jd-gui.exe and click on open classes.dex.dex2jar file. When you clicked jd-gui.exe file the new window will be open.  That window is the java decompiler window. In this window you have to open classess.dex.dex2jar file.

java-decompiler

When you click open button then you can see your java source files as shown in picture.

Here you get your java source code successfully. Hopefully this information is helpful to you

Thank you.

Reader Interactions

Comments

  1. Tariqur Rahman says

    Dec 25, 2013 at 4:54 am

    woo awesome tips.I need it very much.thanks you author.

  2. Nancy says

    Dec 26, 2013 at 8:23 am

    Thanks alot Tariqur Rahman

  3. Jonty says

    Jan 4, 2014 at 8:27 am

    I downloaded an apk file.
    I extracted the source code from it by the methods provided on the net.
    I want ot learn the coding of the app..
    On extracting and importing into the adt it does not shows errors but when i upload the same app on the phone it crashes “unfortunatly the app stopped working”
    I am a newbie and i want to learn the code and so if i get the correct code i will be learn it faster..
    Is there any reason why the app doesnt start.
    Is it because we cannot extract the code properly from the app??
    Thanks..

    I want to kwon how this app is coded
    for that i want to check the source code files

  4. Nancy says

    Jan 5, 2014 at 3:25 am

    Hi Jonty

    i learnt it from my office. you can also learn from youtube.

    Thanks

Disclosure: We might earn commission from qualifying purchases. The commission help keep the rest of my content free, so thank you!

Footer

INIU Pocket Rocket P50 Power Bank Review – A Pocket-Sized Powerhouse

WURKKOS HD03 Clip Light Review – A Pocket-Sized Clip-On Flashlight with a Colorful Personality

GOOLOO AP150 PRO Portable Air Compressor Review – Inflate Anything, Anywhere

GLACIER FRESH GFU03 Under-Sink RO Water Filter System Review

Follow TechWalls

YoutubeFacebookXInstagram

Recent Posts

  • Baseus Unveils Ultra-Slim, Ultra-Small PicoGo Wireless Charging Solutions
  • FreSound Launches Inspiration Open Earbuds: A High-Performance Open-Ear Solution for Modern Tech Users
  • INIU Pocket Rocket P50 Power Bank Review – A Pocket-Sized Powerhouse
  • WURKKOS HD03 Clip Light Review – A Pocket-Sized Clip-On Flashlight with a Colorful Personality

Copyright © 2025 · All Rights Reserved