How to get the Address of the function call dynamically from the process

I am looking for a way to get the address of the function call programatically: public abstract void onKey (int primaryCode, int[] keyCodes) from KeyboardView.OnKeyboardActionListener interface.

Are the address of these functions static? i.e is it loaded always in the same memory.

I'm trying to achieve tamper protection from key loggers.

Answers


Your question fundamentally doesn't make sense, because you are asking how to take a function pointer when, in fact, Java does not have the equivalent of function pointers (you only see references to functions in dynamic dispatch through an object).

Addresses of functions may be static or may not exist at all, but this is all transparent to you, as the code is run in the virtual machine. If you are instead asking at the NDK level, you can surely take the address of the function using a simple & in C. However, at the Java level this is not possible.

You do not clarify, however, why this would help you prevent keyloggers.


Need Your Help

Returning a variable from an ExternalInterface.call() back into Flash

javascript flash actionscript-3 actionscript

I'm calling a JS function with ExternalInterface.call and trying to get a return value inside Flash. When I trace out the op variable I get 0 instead of 500. Is there something wrong with my embed ...

Android - Get Twitter timeline using fabric

android twitter twitter-fabric

I'm working on an Android application, where I have to show an specific timeline. Well I have added fabric.io and I also created a twitter app(I mean I got the keys). So I really don't know how can...