Android : Android: LD_PRELOAD alternative for native executable

on Tuesday, October 7, 2014


I would like to execute a prebuilt/existing executable on an Android-device which comes shipped with the ROM.


The binary is using a function "systemTime" of a shared library (libutils.so) which I would like to hook/intercept for analysis.


It seems like



LD_PRELOAD=/incercept.so binary


has no effect and



setprop wrap.$process LD_PRELOAD=/incercept.so


is also not working, as it's a native binary and not an android-app.


Before I'm now implementing a complex hooking-hijacking-workaround which has to be executed as root and hijacks the process which is created by me once executing that binary, I will try to find a more simple way to intercept that function-call.


Can anyone tell me if there is maybe another way to execute that binary, but intercept the call to the "systemTime"-function?


Maybe something like a little C-code which defines the "systemTime"-method by itself and then executes the binary in the same/its own process?


Is something like this possible?


0 comments:

Post a Comment