I am new in this forum... please help me to make my tut more effective and easy. and ya sorry for my bad bad bad English !!
Lets start the tut..
Software You Need.
1. Winrar
2. Dex2Jar
3. jd-gui (Java Code Decompilation)
4. .Net Framework 2.0 or version 3 (Recommanded if your using XP)
1.You need to extract codes and resources from the .apk file. Download and Install winrar
open your apk file with winrar. Check screenshot below
Step 2
Now we need to convert .dex (Dalvik Executable) into .jar file
copy your .dex file in same in dex2jar folder and open cmd and locate the dex2jar directory.
type this command in cmd:
>>> "dex2jar.bat classes.dex" without quotes
After successfully you converted your dex file into jar.
Step 3
Now we need to extract .class files from converted .jar file
Now select classes_dex2jar.jar file and Click Extract files " wait until the extraction process compelete"
Step 4
Now open classes_dex2jar folder. Now look all around there are lots of .dex files.
now we need to open .class files for Analysing the Decompiled Code. !!!
Now Open "jd-gui.exe"
Now Open any .class file you want u can easily read All codes...
Please comment and Say thanks.... if you think this tutorial see helpfull for you..
Great.. it works !!!!!!!
thank u :laugh:
Related
Well, not Sure if the past should be here, I think so.
*I was tinkering with a rom (Ledro id for desire), and wanted to take a look at the xml, in such framework-res.apk, but that open from the pc, I get: hexadecimal value 0x03 is an invalid character (with xml notepad). I still open it but it is unintelligible.
What are apk's trying to open with java (do not know if I have what it takes to open them) and that makes me: failed to load main-class manifest attribute ....
I just want to tweak a little, have if I learn slowly.
Sorry for my english I am from spain
Sent from my HTC Desire using XDA App
XML files in apks are compiled to binary form, so you can't open them directly. You have to use some decoding tool: apktool (in my signature), Apk Manager (a wrapper around apktool) or AXMLPrinter2 (older and less powerful tool: can't rebuild XML and only partial info is decoded).
And no, you can't run apk files using Java on your PC.
Brut.all said:
XML files in apks are compiled to binary form, so you can't open them directly. You have to use some decoding tool: apktool (in my signature), Apk Manager (a wrapper around apktool) or AXMLPrinter2 (older and less powerful tool: can't rebuild XML and only partial info is decoded).
And no, you can't run apk files using Java on your PC.
Click to expand...
Click to collapse
Thanks, I will try
Edit: lol I dont know how I can install apktol in Windows...
I unpack the files into c:/ and now?
dany_danay said:
Thanks, I will try
Edit: lol I dont know how I can install apktol in Windows...
I unpack the files into c:/ and now?
Click to expand...
Click to collapse
So How can do this?
dany_danay said:
I unpack the files into c:/ and now?
Click to expand...
Click to collapse
You don't read carefully:
http://code.google.com/p/android-apktool/
Unpack both to your Windows directory
Click to expand...
Click to collapse
please i have come across a lot of these zipped android application files that when i unzip them on the laptop i cant find any apk file therein i only find some folders with the name
lib
META-INF
and then some files with these names
AndroidManifest
classes.dex
resources.arsc
please can someone explain to me how i can install such zip files
Hello sir, I have the same problem.
What is the solution, please ?
mortallkombat said:
please i have come across a lot of these zipped android application files that when i unzip them on the laptop i cant find any apk file therein i only find some folders with the name
lib
META-INF
and then some files with these names
AndroidManifest
classes.dex
resources.arsc
please can someone explain to me how i can install such zip files
Click to expand...
Click to collapse
An APK file by nature is a ZIP file. The reported files/folders make up an APK file.
Read also here:
Structure of an Android App Binary (.apk)
Structure of an Android App Binary (.apk)
www.appdome.com
To install the APK replace file's extension "ZIP" by "APK".
Hello thank you sir,
but the problem I have exactly, is, when I download a zip file from github, your mentioned method wouldn't work.
Maybe you have another solution
I found dex2jar that is intended to convert .dex files to human readable .class files in java. The tutorial however is not very complete and even after putting both the .apk and the dex2jar unzipped file into a folder and running the code in command prompt, all I receive is the opening of dex2jar.sh. I do not find the .jar file that should be generated in the same folder. Anybody with experience with dex2jar want to post a tutorial or some help?
1. dex2jar.sh file.apk
2. profit
I feel like an idiot right now. The sh file is for Linux computers, I am on windows, so I should have ran the batch file.
im going to bump this thread...
i am having some problems with dex2jar right now. ive been able to properly run baksmali, but for some reason im not able to run dex2jar.
im on windows 7, and ive tried saving the .zip file to a folder then unzipping with command prompt, and etc. however, this process does not unzip for me. maybe, i need to look up the unzip command lines to make sure, if im even entering the informaiton correctly. though, i assume that i could just unzip the .zip program into a folder using winace, or something. And, the dex2jar program would work the same. i might be wrong, but i manually unzipped dex2jar to a folder.
then, since my phone is rooted. I easily have access to classes.dex files. So, I put the classes.dex files in the same folders as the dex2jar files and etc.
now, i run command prompt and try to pull up all the directories to the dex2jar.bat and classes.dex files. after i have the directories set up. I run the command line of dex2jar.bat classes.dex
and usually gives me an error of
'java' not recognized on internet or/and external etce etc etc..
ive had the same error with baksmali, but i was doing something wrong, as in the file system and using the wrong command line.
i've tried moving up a few directories too the lib files, and running the dex2jar-0.0.7.8-SNAPSHOT.jar file, (or whatever it is called) in the command line with classes.dex and it gives an error, but the last line says batch (or something) is operational.
SORRY, for the lOOOOOOOnnnng run down, but i really need help.
@badmonopoly
Initially, I struggled a bit, but here's what i did to make it work (on XP)
1. Extract all the files in the zip file to a folder. You can use any extracting tool in windows.
2. Copy you .dex file to this folder.
3. Run setclasspath.bat. This should be run because this data is used in the next step.
4. Go to Windows Command prompt, change the folder path to the folder where you extracted the zip file in step 1 and run the command as follows:
dex2jar.bat classes.dex
5. Tada!! Your jar file will be ready in the same folder.
Hope this helps..
P.S.: You need to have Java installed on your Windows machine for this to work.
this is what you're looking for:
http://forum.xda-developers.com/showthread.php?t=873466
I got it all working but i have one problem probably a noob question but how do i get it back to a dex?
ok well nevermind smali and baksmali is way easier to use
jar2dex
HI I have got a serious problem and i have edited one of this but now i need to convert jar file to dex how ???? this is really serious for me plz help!!!
msri3here said:
@badmonopoly
Initially, I struggled a bit, but here's what i did to make it work (on XP)
1. Extract all the files in the zip file to a folder. You can use any extracting tool in windows.
2. Copy you .dex file to this folder.
3. Run setclasspath.bat. This should be run because this data is used in the next step.
4. Go to Windows Command prompt, change the folder path to the folder where you extracted the zip file in step 1 and run the command as follows:
dex2jar.bat classes.dex
5. Tada!! Your jar file will be ready in the same folder.
Hope this helps..
P.S.: You need to have Java installed on your Windows machine for this to work.
Click to expand...
Click to collapse
Great...........Nice Work
msri3here said:
@badmonopoly
Initially, I struggled a bit, but here's what i did to make it work (on XP)
1. Extract all the files in the zip file to a folder. You can use any extracting tool in windows.
2. Copy you .dex file to this folder.
3. Run setclasspath.bat. This should be run because this data is used in the next step.
4. Go to Windows Command prompt, change the folder path to the folder where you extracted the zip file in step 1 and run the command as follows:
dex2jar.bat classes.dex
5. Tada!! Your jar file will be ready in the same folder.
Hope this helps..
P.S.: You need to have Java installed on your Windows machine for this to work.
Click to expand...
Click to collapse
cant open the file.
file is corrupted
why??
I use Bluestacks 0.9.11.4119 . I Install android applications and games, from root folder (i.e. device/android/data/data) i copy all the folders to windows directory (i.e. publicfolder/pictures), now many of the apps or games have two type of similar files and i need to see what's inside of the files,
1st.- .so files and database files
2nd.- some of the files have no extension so if i open it on notepad then it comes in Alphanumeric symbolic format,i think its encrypted so i am not able to see even i have tried many language decrypter but failed
3rd.- how to dissemble the apk file and how to modify it.
4th.- how to read XML file of android apps, when i open it on notepad or Microsoft XML it shows error.
I want to learn something so please help me with these issues, and thank you for previous help
To edit any apk is necessary Apktool. Look this guide and try edit:
http://www.xda-developers.com/decompile-edit-and-recompile-in-one-tool-with-apk-studio/
gamer22881 said:
I use Bluestacks 0.9.11.4119 . I Install android applications and games, from root folder (i.e. device/android/data/data) i copy all the folders to windows directory (i.e. publicfolder/pictures), now many of the apps or games have two type of similar files and i need to see what's inside of the files,
1st.- .so files and database files
2nd.- some of the files have no extension so if i open it on notepad then it comes in Alphanumeric symbolic format,i think its encrypted so i am not able to see even i have tried many language decrypter but failed
3rd.- how to dissemble the apk file and how to modify it.
4th.- how to read XML file of android apps, when i open it on notepad or Microsoft XML it shows error.
I want to learn something so please help me with these issues, and thank you for previous help
Click to expand...
Click to collapse
In addition to apktool (thanks, @kaiodduarte), you're also going to need a good text editor (I use Notepad++), an archive manager (like 7zip or WinRAR), and the ZipSigner app for your device.
ИΘΘK¡€ said:
In addition to apktool (thanks, @kaiodduarte), you're also going to need a good text editor (I use Notepad++), an archive manager (like 7zip or WinRAR), and the ZipSigner app for your device.
Click to expand...
Click to collapse
thank you for the advice but i have 1 worries
if the text file or a file is encrypted the how is notepad++ is going to help me..??
gamer22881 said:
thank you for the advice but i have 1 worries
if the text file or a file is encrypted the how is notepad++ is going to help me..??
Click to expand...
Click to collapse
It will help you with actually being able to make edits to text files without screwing up all of the line endings and encoding.
He Guys,
i have a little Problem.
I want to extract an APK File. It worked fine with the APK Tool. Also i got the classes.dex and decoded to an Java File for reading.
My Issue is that i have similuar .xml Files that contains the needed Stuff. But when i try to open this Files i get an completely nonsense Output.
Can you help me to get the correct Output ?
Here is the download for the APK --> http.apk4fun.com/apk/3770/ --> müsst das WWW hinzufügen
I need this XML Files --> extracted APK --> assets --> cc_data --> .xml Files
Output:
Code:
Ÿ:†ÈeQA„)TcíÔ÷ÃXÌÉ´&PíÐ3Y …NÏ÷í¼ã»¸Oô~*Û
øUZ•¢ŠÐ¥>XBµniöå¢1ð4m!_ŒÊ‚ôŸi©«ÇÔŽ£ºžQ¦?µï‡,ÝN.ã“i?bÙÿAÁ¶»7E'à?mã6]qu–Í·ˆ“kÀ1šõ lòųßÅ]€Ör‡qAwùrOõöE,*™µè‹ibÏ¥dÝGÕ÷¨fHé®EàÐŽ¤ÑèÃ{\¹pÂê[²*ö°°-çÏŒ¸8Ôúe†™¹£Îlët“§CªýE,*™µè‹ibÏ¥dÎQò\èùXqâsO½6Ë„ÂxNqê[²*ö°ÛŸOÚ¾êÕ{˜VÛM¦ 7º”ýfÈ*S8ˆõî£I*Ê#?™†[ùß淑Üa=s†ù!*ÎPi=faÝ#ÁZ8*ÝŒˆ9æmB—¦‚z-€fHücÄt%ìMÁM¹¤–üÛPϸPi†Ø{ñn˜§eq€“Vgí=…Éðýb€V«izî‹çE,*™µè‹ibÏ¥dVF`™J†Ž¸}™C*ŒAlÑÿŸ~:Yzû@KëíŠ#Bîàe҃Ђ¦ ÞÛN‰ðáköaÀf¢–‘³a§©½Ý [email protected]ˆR>ONþªétÂbò_¿+üdS8ˆõî£I*Ê#?™†[à2…\ ç.»ÏºøßTí›a늷û@KëíŠ#BNÕî@\a4æID.ÅËaþ—è@‘¸S8ˆõî£I*Ê#?™†[T<È•¶Ônö.»ÏºøßTU-"ýgàŒû@KëíŠ#BTr*v¯š€Mr_dYK§Ú/su™qS8ˆõî£I*Ê#?™†[²Lʆ?:tz
PñU“`¹ÏŸc&ï Sí8*ÝŒˆ9æmB—¦‚z-€”
¹k´B¼øbBÈr'ªPϸPi†Ø{ñn!…HŒI³ŒÖr‡qAw;u”›ð&¼E,*™µè‹ibÏ¥d(Gyt¢šS5è§ÛRøáÖiŽ¶û@KëíŠ#BãP+aI‡S¬g*fy+Ô}:!ú·Ú”eøL¶î>Ū‡›¦>*w.ÌJÓ]qÅE9ý傹—ËÆ㎡~ãÂBѨF"óÿnÎŒ°ƒwä2ça§0œ~øvHé®EàÐŽ¤Ë„ÂxNqê[²*ö°‰MtŽª,È™VêaÓÆv¶KˆàÇS8ˆõî£I*Ê#?™†[Lç‹éy7á
PñU“`¹eÆ‘î²ê8*ÝŒˆ9æmB—¦‚z-€»x_ßLjö"®ÞňËñPϸPi†Ø{ñn¹›3Ô'Ör‡qAwáiÒ"ê;Y"½î-g[]SÝë[†I+}ñ†[]‹Ç,(]ÚPÔ”õO=F"óÿnÎŒ°ƒwä2ç?…÷=*Hús7×* ß UPϸPi†Ø{ñnz,ËÕý%¹—ËÆ㎹÷:u7GíF"óÿnÎŒ°ƒwä2çÈ(gæ ³G?F½‘2DÈPϸPi†Ø{ñn#C†Nͧ¹—ËÆãŽÖu1"8*ÝŒˆ9æmB—¦‚z-€78ýèxÌ*%Œ£e7l>L¶î>Ū‡›¦>*w.ÌJÓ\LLªº¯eþ¹—ËÆãŽyŸ*ÒRQR&8*ÝŒˆ9æmB—¦‚z-€Žj‡ÐôÞ\üÏÀb4xŸL¶î>Ū‡›¦>*w.ÌJÓ7¨¾²(OÞB¹—ËÆãŽ2(oŠ}ñªF"óÿnÎŒ°ƒwä2çj…2²2ø-çû®2ýv~ÔË„ÂxNqê[²*ö°À’Ö<:߈lfå©ýE&[ùù²zbáíªñ×*fø˜ŸC¯dÓ’1بjVô%ЊÜKÿ:ܳ·
Thank you,
Daniel