Search code examples
xposed

Log all methods called in an app by Xposed


As title said, I want to use xposed to log all methods called in an app from it start till I stop it. I only want to log Class name, Method name, don't want to hook all method. I try this code, but get error getMethod not found.

findAndHookMethod("java.lang.Class", lpparam.classLoader, "getMethod", String.class, Object.class, new XC_MethodHook()

Thanks in advance!


Solution

  • As mentioned before Xposed is not the way to go in this situation due to its overhead.

    The simplest solution is just to use dmtracedump as provided by Google. Most x86 Android images and emulator come with the debuggable flag on (ro.debuggable) so you can even use it for closed source apps.

    Additionally other tools such as Emma are known to work with Android as well, but these might need modifications to the source code.