[Q] decompiling the apk file and extracting all source files - Android Q&A, Help & Troubleshooting

i built an app from online site appyet.com.they only provided me the apk file..can anyone help me to get the source files..i.e menifest.xml and all other related files.
i got the files by opening it in zip format but those files are encrypted..i want the source code in proper format to edit in the sdk tool...if any one can..then do help...

Related

Extract *.apk?

If I have a *.apk that I download, is there anyway to backup/extract it?
The apk is really just a ZIP file. Try renaming the file to whatever.apk.zip and open using your favorite ZIP utility. You should be able to view all the contents. Resources (such as images) can be extracted. The java code is compiled into a .dex file so you can't view the raw code, but there are utilities (like this one) to decompile it: http://dedexer.sourceforge.net/
ghostfaced said:
The apk is really just a ZIP file. Try renaming the file to whatever.apk.zip and open using your favorite ZIP utility. You should be able to view all the contents. Resources (such as images) can be extracted. The java code is compiled into a .dex file so you can't view the raw code, but there are utilities (like this one) to decompile it: http://dedexer.sourceforge.net/
Click to expand...
Click to collapse
Right but how do I find the *.apk if I am downloading it off of the market?
apps are located in data/app/
There are also various apps in the market that will backup apps.
I use appmonster incedently.
7zip can extract and view contents of an apk without renaming.
backup and reinstalling apps....
view the first link in my signature.
I used MyBackup Pro to do a backup of my apps onto the sd card, then I used ASTRO file manager to navigate to /sdcard/rerware/MyBackup/AllAppsBackups where I found the file LastBackupApps.zip. I then used androzip or something similar to unzip that file and it contained the apk for every one of the apps I backed up.
how to extract .apk.p files
ghostfaced said:
The apk is really just a ZIP file. Try renaming the file to whatever.apk.zip and open using your favorite ZIP utility. You should be able to view all the contents. Resources (such as images) can be extracted. The java code is compiled into a .dex file so you can't view the raw code, but there are utilities (like this one) to decompile it: http://dedexer.sourceforge.net/
Click to expand...
Click to collapse
I have a zip file with .apk.p files in it which are exracted with package_extract_file in the updater script. Is there a way to manually extract these, since renaming to .zip doesn't help if I open them with any unzipper program?
Thanks
lxrose said:
I have a zip file with .apk.p files in it which are exracted with package_extract_file in the updater script. Is there a way to manually extract these, since renaming to .zip doesn't help if I open them with any unzipper program?
Thanks
Click to expand...
Click to collapse
I believe the files you are referring to - the files ending in ".p" - are "patch" files. They only appear in the OTA download .zip file, and they are worthless to you. They are not complete files, but just enough data to patch the corresponding 1.5 app .apk so that it turns into the 2.1 version.
If you want the complete .apk files which they correspond to, just download the Leak-V3 .zip file, extract the "system.img" file, and then unpack that file using the "unyaffs" utility (search for it, you'll find it at code.Google.com).
bftb0
bftb0 said:
I believe the files you are referring to - the files ending in ".p" - are "patch" files. They only appear in the OTA download .zip file, and they are worthless to you. They are not complete files, but just enough data to patch the corresponding 1.5 app .apk so that it turns into the 2.1 version.
If you want the complete .apk files which they correspond to, just download the Leak-V3 .zip file, extract the "system.img" file, and then unpack that file using the "unyaffs" utility (search for it, you'll find it at code.Google.com).
bftb0
Click to expand...
Click to collapse
Thanks for the info. I thought I can update the apk files manually, because from recovery it doesn't work (it is a rooted image, so signature not accepted) and there are some fixes in the new update that I wanted to give a chance.
Unable to install ddx1.14.jar in my HTC wildire
I hve downloaded dexeder.jar file in to my SD card. but i can't install it in my HTC wildfire...
it shows an error...
"ddx1.14.jar cannot be installed because critical information is missing from the application file (MIDlet-Name). Please contact the application provider for more information."
Help me Pls..... Thanks in advance.....
apk download
did you search for the apk online?

[Q] Modify java code in framework.jar

Hey everyone,
My stock rom on my phone has issues with MVNO's (mobile virtual network operator). Basically this means that my data connection only works when Roaming. This is a know issue that has already been fixed on several roms (but not on mine).
To fix this I would like to modify the source of the framework.jar file (`/system/framework/framework.jar`), more specific the file : `/com/android/internal/telephony/gsm/GsmServiceStateTracker.java`
To start I will list the steps I have take to show you where I'm stuck at the momoment:
- I have fully deodexed my stock rom, both the JAR files and the APK files in both /system/framework/ and /system/app
- I have downloaded the deodexed framework.jar file and extracted the classes.dex file from it
- I have decompiled the classes.dex file using baksmali to end up with several *.class files
- I have converted these *.class files to a .jar file using dex2jar
- I have unpacked opened this jar file using jdqui to end up with several *.java files
This is where I'm stuck, I need to figure out how to edit the java file I want and end up with a working framework.jar again that I can upload to my phone.
Am I doing this the wrong way? Any other way to resolve my issue? I hope to get some help from people who have experience in doing this...
Any help would be appreciated!
Bump, anyone?

[Q] Why people use smali instead of java decompiler to reverse apk files ?

Hi,
I spent 1 month coding an android app, and then I lost the source code in an hdd crash. Well, those things sux, but hopefully I managed to find an old apk build of this app. I was able to recover part of the source code by extracting the classes.dex file, decrypting it with dex2jar, and then opening the decrypted file with java decompiler (jd-gui.exe)... I remained amazed when I saw that my source code was so easy to found...
Now I wonder, why people use smali to reverse apk files instead of dex2jar+jd-gui ??
No one ??

Edit compiled source to create own custom ROM

After a week i finally managed to build a ROM from source. I have in my /out/target/product/angler folder several files incl. the system.img, boot.img etc. etc (see attachments)
But from i have heard i could edit some of those files to build a new ROM from the files which are in that directory. In the early days you had a file there with a tree format of which apps are installed. Editing that file by removing the apps you didn't want anymore resulted in a ROM without those apps. But with the new structure i cant figure out where i need to do that.
Also if someone knows how i can compile from the source in that directory, that would be great. If i would do it with lunch && make it start over again from the original source.
Nobody can help me with this? or am i in the wrong section?

Modifying framework.jar file only in Stock ROM.

Good evening folks,
I just grabbed the stock ROM of my phone (Lenovo A6000plus lollipop) and started tweaking in it. Now I have to change the files located inside framework.jar which is in the system folder. I tried dex decompiler and apk tool for grabbing the source from the jar. But I failed to repack them again into a framework.jar file. I found the same source code in the source.google.com's git repo and I downloaded it. Now how can I create the framework.jar file from the source code itself?
The documentation of AOSP is little hard to understand for a newbie like me. Can anyone properly guide me for the same?

Categories

Resources