Thursday, April 21, 2011

Cracking apk to get java code

By Magesh Kumar   Posted at  1:25 AM   Android 1 comment


.dex format to .jar format

Now very easy to convert the .apk file to ordinary java file before going that we should want two jar files


1. JD-GUI.zip
2. dex2jar.zip
3.Eclipse


Download that two zip files extract and store in your local directory....


      Steps to extract the .dex to .jar


Step 1 : Now You just create one java project in eclipse like the following.....




Step 2: Right click the project --> Select build path --> then configure build path
             one  window appear  like


        
Step 3 : Now select Add external JARs option --> browse upto dex2jar lib directory select all jar files -->            
             Click OK
             Ensure all jar are added or not
        

Step 4 : Now copy the .apk file and paste into the project



               Check the folder structure  should look like above


Step 5: Now you want to configure
            Right click the project ---> Select Run As  --> Then Select Run Configurations...
            one window show like


            On that window select Java Application Option which is placed in left side menu.
          
Step 6 : Then Enter  this one in pxb.android.dex2jar.v3.Main Main Class Text box
        


 Step 7: select Argument tab Enter the Apk name with .apk extension in Program arguments text field
        
Step 8 : Click Apply and Run




     U just go and check in console It will give result like this.


              
                                      
  Now refresh the Java project one new file created with the name of  (xxx.apk.dex2jar.jar) copy that file and then paste to your local drive








Step  to convert .jar file to ordinary class file


 Now you go to Jd-gui tools select xxx.apk.dex2jar.jar file
          
              It will show like


            


Now you got ordinary java file from .dex file...

About the Author

Nulla sagittis convallis arcu. Sed sed nunc. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo.
View all posts by: BT9

1 comment:

  1. Everything worked perfectly but I had to change the class name on step 6 from

    pxb.android.dex2jar.v3.Main
    to
    com.googlecode.dex2jar.v3.Main

    Because I'm new to android and java programing I don't know how to import the extracted files to eclipse in order to build the project again, any tips ?
    Thanks !

    ReplyDelete

Back to top ↑
Connect with Us

What they says

© 2013 MaGeSH 2 help. WP Mythemeshop Converted by BloggerTheme9
Blogger templates. Proudly Powered by Blogger.