how to get source file from apk file - android

in android there is any possibility to getting source file from .apk file.

It is possible. You need a decompiler for that. But be careful to consider the legal issues.
I use Dedexer or dex2jar. Most times there are good results, but sometimes it is not possible to decompile all sources.

Well, normally you can't or shouldn't be able to, but you can try to 'reverse engineer' the apk (as its called) by using android-apktool:
http://ibotpeaches.github.io/Apktool/
I have no experience with the program yet by the way

just go to this tutorial
http://forum.xda-developers.com/showthread.php?t=1108798
i hope it will help u.

Related

an issue about extract source code of an apk

Hello I lost my last backup of my project and there is just installed the app on my phone so I need to rescue my codes.
I searched dex2jar,apktools etc but they did not work.
In my apk there is 6 dex class so I can not reach my code
You can extract your code from http://www.javadecompilers.com/apk this link
Note: It can give you all your java classes and resources, but you
have to work on it for some missing constraints. Please do not make
misuse of that....
But its better to have something than nothing.

Android, Is there any way to recover app files from an installed app?

I had a problem with my pc and I had to format the c drive without being able to access it, good things is that i only lost my app files, bad news is that I lost my app files hahah (not really laughing at all, more like a crying laugh). I used to test my app in my phone so i have it installed there, i have half of the progress I've made backed up (too bad i didn't change the app's folder, I am gonna do it from now on) but i would reaply like to recover it, so... Is there any way that can be done? If not well... learned the lesson the hard way I guess
You may be able to retrieve the java classes and resources from the apk. First, you can try pulling the apk from your Android device:
How do I get an apk file from an Android device?
Second, try retrieving java files from the apk:
how to extract code of apk file
It is called reverse engineering.
Here's a tool that might help you: https://ibotpeaches.github.io/Apktool/
Hope you will recover your code ;)

How to encrypt jar file of android application

I want to encrypt .jar file of my android application so that it can't be decoded by any one to view the source code.
How can I achieve this?
It will always be possible to decompile it.
You can only obfuscate your code to make it harder to understand for humans. If your project insists of more than a few classes the effort to understand it will be higher than any one is willing to invest.
One tool to achieve this, which also reduces the size of your class-files is
ProGuard: http://proguard.sourceforge.net/
But there are quite some similar tools out there.
Firstly - you can exclude source code from jar files. It is not required at runtime. Class files are sufficient.
Encrypting will not help you, if you encrypt the files JVM will not be able to understand it.
As responded in the earlier answer, there will always be tools to decompile the byte codes, you can make it harder for the attacker to read so that it is not worth his time

Running decompiled file

I was working on an Android app but yesterday my Hard disk got crashed and all the data has been gone. What I'm now left with is a .apk file which I kept as a back up. I somehow managed to get my code back from that .apk file but not sure of how to import the whole project in Eclipse. The source along with other folders like drawables, values, manifest etc are saved in one folder. Any help would be highly appreciated.
I have two methods :
Download APKTool (url) and decompile your apk package. Here you have a tutorial.
After this you should can import your code into Ecplise.
Go to a specialist and try to restore your harddisk.
I hope I helped
ok, first of all, if you tried to decompile an app, I suposed you have used apk-tool or smali/backsmali tools for the code.
AFAIK you can't get your java code back. after decompile, you get smali code, which is some dalvik assembly language. I don't think you want to write apps in that.
If you were the developer of the app, you would've make a backup of your code, not APK. So, are you sure you're not lying to us?

android c2dm navigate the jumpNote source code

all,when i open jumpNote project in eclipse,i encounter some mistakes like the following description.
many variables related with c2dm like
Config.C2DM_ACCOUNT_EXTRA,
Config.C2DM_MESSAGE_SYNC,
Config.C2DM_SENDER etc
****cannot be resolved.****
i uses the latest sdk(2.2).
any one konws the reasons, i think that if i miss some jar files?
any help is grateful.
You need to check out trunk/src.shared and merge it into the src dir of jumpnote. Then clean/build. If it still doesn't work re-import it into eclipse.
Those are just examples of what you can do in your own app, they don't actually exist within the Android API.
There is a Config class if you browse the source code, com.example.jumpnote.android.Config.java

Categories

Resources