Replace method implementation in Android via reflection / class loader

1.5k Views Asked by At

I am currently doing research on techniques for runtime manipulation on mobile applications. On the iOS platform I can easily do method swizzling by calling objective-c runtime library functions such as class_replaceMethod(...). Is an equivalent way possible on Android?

If I use the JDB, I can alter local variables and I can evaluate expressions. By means of the latter, I assume it is possible to change entire implementation bodies of methods. How would you exactly do this, e.g. with using reflections? What are the required steps?

Thanks in advance!

0

There are 0 best solutions below