You are on page 1of 3

Like HOME PROJECTS ARTICLES TUTORIALS DOWNLOADS FORUM ANNOUNCEMENTS

138

Search

RetrievesourcecodefromAndroid.apkfile
byMIDHUNGOPIonMARCH28,2013

Login APPLICATIONS MarketAnalysis

PostActiontoTimeLine RetrievingsourcecodefromandroidapkalongwithallthexmlfileslikeAndroidManifest.xmletc.cangetreallytricky sometimes.Thisneedsabunchoftoolsandastepbystepprocedurewhichistobefollowed. Firstthingyouneedtodoistogetthefollowingtools 1. Androidapktool 2. Dex2jar 3. JDGui Firstonecanbedownloadedfromhttp://code.google.com/p/androidapktool/.Itisatoolforreverseengineering3rd party,closed,binaryAndroidapps.Itcandecoderesourcesclosetotheiroriginalformandrebuildthemaftermaking somemodificationsitmakesitpossibletodebugsmallamountsofcodestepbystep.Alsoitmakesworkingwithapps easierbecauseofprojectlikefilesstructureandautomationofsomerepetitivetaskslikebuildingapk,etc. Dex2jarisavailableathttp://code.google.com/p/dex2jar/.Weusethistooltocreateclasses.dex.jarfilefrom classes.dexfile.Dex2jarcontains4components 1. dexreaderisdesignedtoreadtheDalvikExecutable(.dex/.odex)format.IthasalightweightAPIsimilarwith ASM. 2. dextranslatorisdesignedtodotheconvertjob.Itreadsthedexinstructiontodexirformat,aftersomeoptimize, converttoASMformat. 3. dexirusedbydextranslator,isdesignedtorepresentthedexinstruction 4. dextoolstoolstoworkwith.classfiles. JDGUIisastandalonegraphicalutilitythatdisplaysJavasourcecodesof.classfiles.Youcanbrowsethe reconstructedsourcecodewiththeJDGUIforinstantaccesstomethodsandfields.Thisisavailablefordownloadat http://java.decompiler.free.fr/?q=jdgui. Now,wehavealltheresourcesandletusmoveontoextractingthesourcecodefromapkfile.Followthestepsgiven below: Opentheapkfilewithsomefilearchivingprogramslikewinrarorwinzip.Extractthefilenamedclasses.dexto somefolder. Nexttogetjarfilefromthis,wehavetousedex2jartool.Copytheclasses.dexfiletothefolderwheredex2jaris extracted(otherwiseyoucanincludetheminpathvariable).Thenopencommandprompt,navigatetothe directoryandtypethefollowingcommand dex2jarclasses.dex Thiswillcreateclasses_dex2jar.jarfileinthecurrentdirectory. Now,toobtainthesourcecode,openjdguiandopentheclasses_dex2jar.jarcreated.Hence,youwillbeableto seeentirejavafilesoftheapk.Now,tosaveallfiles,gotoFile>SaveAllSourcesandsavefilestoanewdirectory.
RECENTARTICLES InsiderTradingProblemand Solution Comet(ReverseAjax) Retrievesourcecodefrom Android.apkfile UnderstandingAndroidApps Metasploitexploits NiftyGuessing TrendsinInvestments

DemoVersionEvoPdfTools

HTMLinHeaderandFooterDemo

Thisispage1of3

Togettheotherfiles,wehavetouseapktool.Youcanfollowthemethodgiveninthescreenshotoryoucangofor thiscommandifyourapkislocatedintherootdirectoryofapktool.jarfileandthecurrentdirectoryofcommand promptpointstothesame. javajarapktool.jardGooglePlayStore.apkGooglePlayStore

Now,movethefoldersyougotfromclasses_dex2jar.jartotheabovefolderandyouhavethecompletesource code.

SharethisArticle!

LeaveaReply
Youremailaddresswillnotbepublished.Requiredfieldsaremarked* Name*

DemoVersionEvoPdfTools

Email*

Website

CAPTCHACode*

Comment
YoumayusetheseHTMLtagsandattributes:
<ahref=""title=""><abbrtitle=""><acronymtitle=""><b><blockquotecite=""><cite><code><deldatetime=""> <em><i><qcite=""><strike><strong><p>

PostComment

Tocomment,clickbelowtologin.

SecurityResearch
Pagegeneratedin0.2709seconds.

SecurityResearch,2013.

HTMLinHeaderandFooterDemo

Thisispage2of3

DemoVersionEvoPdfTools

HTMLinHeaderandFooterDemo

Thisispage3of3

You might also like