---
title: "decompiling DEX into Java sourcecode"  
description: "decompiling DEX into Java sourcecode"  
author: "Royce Roy"  
published: 2015-06-11  
updated: 2015-06-11  
canonical: https://www.mindstick.com/forum/23291/decompiling-dex-into-java-sourcecode  
category: "android"  
tags: ["android"]  
reading_time: 1 minute  

---

# decompiling DEX into Java sourcecode

How can one decompile [Android](https://www.mindstick.com/articles/13046/10-reasons-why-i-prefer-android-vs-iphone-ios) [DEX](https://www.mindstick.com/interview/22882/what-is-dex-extension) (VM bytecode) [files](https://www.mindstick.com/articles/23302/the-importance-and-advantage-of-keeping-your-important-files-on-the-cloud) into corresponding [Java](https://www.mindstick.com/articles/12214/web-development-company-in-india-laid-on-the-foundation-of-concrete-java-programming) sourcecode?

## Replies

### Reply by Anonymous User

Get these tools:\
1) [dex2jar](http://code.google.com/p/dex2jar/), , which is made by a Chinese student. It will translate dex files to jar files\
2) jd-gui to view the java files in the jar\
The source code is quite readable as dex2jar makes some optimizations.\
Procedure:\
And here's the procedure on how to decompile:\
Step 1:\
Convert classes.dex in test_apk-debug.apk to test_apk-debug_dex2jar.jar\
d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apkNote: In the Windows machines all the .sh scripts are replaced by .bat scripts[dex2jar documentation](http://code.google.com/p/dex2jar/wiki/ModifyApkWithDexTool)\
\
Step 2:\
Open the jar in JD-GUI


---

Original Source: https://www.mindstick.com/forum/23291/decompiling-dex-into-java-sourcecode

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
