{"id":5435,"date":"2013-12-23T17:18:35","date_gmt":"2013-12-23T22:18:35","guid":{"rendered":"http:\/\/www.techwalls.com\/?p=5435"},"modified":"2014-02-14T11:18:11","modified_gmt":"2014-02-14T16:18:11","slug":"extract-java-source-code-apk-file","status":"publish","type":"post","link":"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/","title":{"rendered":"How to Extract Java Source code from Apk file"},"content":{"rendered":"<p>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.<!--more--><\/p>\n<p>These tools are listed following:<\/p>\n<ul>\n<li>Dex2jar<\/li>\n<li>Jd-GUI(Java Decompiles)<\/li>\n<\/ul>\n<p>You can also download these softwares from following links:<\/p>\n<ul>\n<li><a href=\"http:\/\/code.google.com\/p\/dex2jar\/\" target=\"_blank\" rel=\"nofollow\">(dex2jar)<\/a><\/li>\n<li>(jd-gui)<\/li>\n<\/ul>\n<p>There are some steps to getting source code from the apk file.<\/p>\n<h2>Step 1:<\/h2>\n<p>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.\u00a0 For example file.apk changes with file1.apk.zip and save this file in that folder.<\/p>\n<p>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.<\/p>\n<h2>Step 2:<\/h2>\n<p>After first step now you have to download software from this <a href=\"http:\/\/code.google.com\/p\/dex2jar\/\" target=\"_blank\" rel=\"nofollow\">link <\/a>\u00a0and 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.<\/p>\n<p>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 &#8220;dex2jar classes.dex&#8221; command and press enter. Then classes.dex2jar.jar is created in same folder.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5469\" alt=\"cmd\" src=\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/cmd.jpg\" width=\"700\" height=\"414\" srcset=\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/cmd.jpg 700w, https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/cmd-300x177.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<h2>Step 3:<\/h2>\n<p>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 &#8220;jd-gui-0.3.5.windows&#8221; 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.\u00a0 That window is the java decompiler window. In this window you have to open classess.dex.dex2jar file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5470\" alt=\"java-decompiler\" src=\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/java-decompiler.jpg\" width=\"800\" height=\"450\" srcset=\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/java-decompiler.jpg 800w, https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/java-decompiler-300x169.jpg 300w, https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/java-decompiler-768x432.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>When you click open button then you can see your java source files as sho<span style=\"line-height: 1.5em;\">wn in picture.<\/span><\/p>\n<p>Here you get your java source code successfully. Hopefully this information is helpful to you<\/p>\n<p>Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.<\/p>\n","protected":false},"author":89,"featured_media":5470,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[1146],"tags":[31,1147],"class_list":{"0":"post-5435","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-guide","8":"tag-android","9":"tag-guide-2","10":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Extract Java Source code from Apk file<\/title>\n<meta name=\"description\" content=\"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.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Guest Authors\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/\",\"url\":\"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/\",\"name\":\"How to Extract Java Source code from Apk file\",\"isPartOf\":{\"@id\":\"https:\/\/www.techwalls.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/java-decompiler.jpg\",\"datePublished\":\"2013-12-23T22:18:35+00:00\",\"dateModified\":\"2014-02-14T16:18:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.techwalls.com\/#\/schema\/person\/440f216965cffca997e53e754f489c84\"},\"description\":\"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.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/#primaryimage\",\"url\":\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/java-decompiler.jpg\",\"contentUrl\":\"https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/java-decompiler.jpg\",\"width\":800,\"height\":450},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.techwalls.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tech Guide\",\"item\":\"https:\/\/www.techwalls.com\/guide\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Extract Java Source code from Apk file\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.techwalls.com\/#website\",\"url\":\"https:\/\/www.techwalls.com\/\",\"name\":\"TechWalls\",\"description\":\"Technology News | Gadget Reviews | Tutorials\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.techwalls.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.techwalls.com\/#\/schema\/person\/440f216965cffca997e53e754f489c84\",\"name\":\"Guest Authors\",\"url\":\"https:\/\/www.techwalls.com\/author\/guestauthor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Extract Java Source code from Apk file","description":"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.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/","twitter_misc":{"Written by":"Guest Authors","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/","url":"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/","name":"How to Extract Java Source code from Apk file","isPartOf":{"@id":"https:\/\/www.techwalls.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/#primaryimage"},"image":{"@id":"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/#primaryimage"},"thumbnailUrl":"https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/java-decompiler.jpg","datePublished":"2013-12-23T22:18:35+00:00","dateModified":"2014-02-14T16:18:11+00:00","author":{"@id":"https:\/\/www.techwalls.com\/#\/schema\/person\/440f216965cffca997e53e754f489c84"},"description":"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.","breadcrumb":{"@id":"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/#primaryimage","url":"https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/java-decompiler.jpg","contentUrl":"https:\/\/www.techwalls.com\/wp-content\/uploads\/2013\/12\/java-decompiler.jpg","width":800,"height":450},{"@type":"BreadcrumbList","@id":"https:\/\/www.techwalls.com\/extract-java-source-code-apk-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.techwalls.com\/"},{"@type":"ListItem","position":2,"name":"Tech Guide","item":"https:\/\/www.techwalls.com\/guide\/"},{"@type":"ListItem","position":3,"name":"How to Extract Java Source code from Apk file"}]},{"@type":"WebSite","@id":"https:\/\/www.techwalls.com\/#website","url":"https:\/\/www.techwalls.com\/","name":"TechWalls","description":"Technology News | Gadget Reviews | Tutorials","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.techwalls.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.techwalls.com\/#\/schema\/person\/440f216965cffca997e53e754f489c84","name":"Guest Authors","url":"https:\/\/www.techwalls.com\/author\/guestauthor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/posts\/5435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/users\/89"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/comments?post=5435"}],"version-history":[{"count":0,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/posts\/5435\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/media\/5470"}],"wp:attachment":[{"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/media?parent=5435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/categories?post=5435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techwalls.com\/wp-json\/wp\/v2\/tags?post=5435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}