Friday, March 6, 2015

Reverse Engineer Android App. Decompile with dex2jar(using Mac)

Work in progress....

Setup:
1. First download dex2jar fille from:
http://karanbalkar.com/2014/05/convert-apk-file-to-jar-using-dex2jar/

2. Download JD-GUI:
http://jd.benow.ca/

3. Pull apk from device to machine.


How to use:
1. Now run Dex2jar, drag and drop file "MyApp.apk" to the dex2jar directory(terminal)
Command:
/Dex2-jar/dex2jar-0.0.9.15$ sh d2j-dex2jar.sh '/home/andsand/Desktop/dex2jar_Dir/apk_location/MyApp.apk'

Output:
dex2jar /home/andsand/Desktop/dex2jar_Dir/apk_location/MyApp-1.apk -> MyApp-1-dex2jar.jar


6. Output will generate a jar file in the dex2jar directory...
In this case is name: MyApp-1-dex2jar.jar


Next step:
1. open MyApp-1-dex2jar.jar with JD-GUI  to see code.
2. Click on icon  JD-GUI
3. Now select and open the MyApp-1-dex2jar.jar file, you can  see the code. You can drag and drop jar file to JD-GUI.
4. File -> Save all Sources (this will create a zip file with all the source code)
5. PS. You can open the source code file with sublime or any other code editor, to analyze the code.

And done now you can analyze the code of the app, make changes, compile and sign manually the app.


No comments:

Post a Comment