How can i know which java file is used at the current time at that current interface. I know we can do this with a logcat when we know the source code , we can make everything log.i and stuff. but what happens when we don't know the source code or while assessing a black box android app
If you don't have access to the files how you supposed to know which file you are getting?
The best way to achieve what you want is to use a decompiler in your APK and do a debug.
http://www.decompileandroid.com/
Related
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.
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 ;)
I am absolutely new to Android. As a research curricular project, I want to make some changes in Android's activity manager's source code. I have downloaded the source code from here and built it for emulator. Now, to start with, I want to do some very simple things e.g. adding print statements to the module that I want to modify. This is just to make sure that my changes are actually showing effect. But how can I
See the changes I made. In this case, where can I see words/sentences printed by my print statements?
Even if I make such small change, do I need to build entire code base again using "make" command? Cant I just compile that particular class or file? I tried "mmm" and "mm" but they dont seem to be working. One says "nothing to build" even if I introduce syntax error and other says "no android.mk file found"
Can I add my own method to the ActivityManager class?
Thank you...
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?
I am using Eclipse to write my Android app and I keep getting this error when running it. I have no idea what the error means or how to go about debugging.
I should add that this all started when I wrote a method to parse an XML file. Before I wrote that, the app worked fine. I tried adding some try/catch block that contain "log.e" statements, but I don't see anything strange in the log.
Does anyone have any idea?
The error message is in the screen shot below:
It means you don't have the source files of the Android code in you eclipse workspace. check
Android source
By default you only have the compiled class files in you android.jar. if you want to see the source(*.java files) you need to add them yourself. So, you have no source files at all by default
I have had this error come up before for a lot of reasons. Almost always it is because I tried to refer to a resource that either is not there, or is incorrectly formatted. Seeing as how this started when you worked with one of your XML files I would check there for incorrect formatting.
Although this error is referring to the fact that you do not have the full android source code, having it will not fix the error, it will only allow you to see where the source code is failing either to find or open your XML file.