Hi, I have instrumented dalvik VM to intercept API calls. To get the API calls of a particular application, I am printing the process ID in the print statements, filtering out unwanted calls. However, what I would like to have is this: print only those API calls that are part of the source code of the application, and get rid of the library API calls that are generated in the output. Is there any way that I can distinguish between API calls in the source code of the application and the android library API calls (which are part of the same process, and hence have the same process ID) ?
Is it possible to find out the .dex file name inside dalvik VM? and then, perhaps, print only those calls which are part of the .dex file corresponding to the application? (I am assuming that from the .apk file, I can find out the .dex files corresponding to the application and the library API calls belong to a different .dex file) I was browsing through the android source code, and found a 'C' structure named "DexFile" inside libdex/DexFile.h. But I could not find any field which gives access to the file name of the .dex file. Further, the comment in that file says this: * The code here assumes that * the DEX file has been rewritten (byte-swapped, word-aligned) and that * the contents can be directly accessed as a collection of C arrays. If this means that .dex file name is not accessible, can anyone suggest any other way to achieve this? I may not have access to the source code of the application. And even if I get the source code by reverse-engineering, looking at the source code is a time-consuming approach which I would like to avoid. Thanks for any insights! Amruta -- You received this message because you are subscribed to the Google Groups "Android Discuss" group. To view this discussion on the web visit https://groups.google.com/d/msg/android-discuss/-/ZPixaS9ioqMJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/android-discuss?hl=en.
