I've attempting to learn how to use Frida to instrument android app, just for person interest.
So far I've managed to get my environment set up with a physical android tablet and I can successfully run the example on Frida's website. In addition to changing variables in the method I want to change the arugment passed to the method. I know how to do this with Xposed but I'm not sure with Frida.
Generic Question: How can the arugments passed to method be maniputed with Frida and what is good souce of documentation and examples for Frida?
More specific question:
I wanted something that was more of a challenge so I moved onto Snapchat. My aim is to emulate the speed spoofing feature of the SnapPrefs Xposed module as this seemed fairly simple to do and its effect can be easily seen in the app. I looked through the SnapPrefs souce and found that I need to hook the "adL" class and change the argument passed to the "a" method.
The code for the method in the APK is:
public final void a(float paramFloat)
{
....
}
I'm using this JavaScript code in order to print "Speed showing" to the screen whenever the method is active.
Java.perform(function () {
// Function to hook is defined here
var SpeedometerView = Java.use('adL');
// Whenever button is clicked
SpeedometerView.a.overload('float').implementation = function (v) {
// Show a message to know that the function got called
send('Speed showing');
// Call the original onClick handler
this.a.overload('float');
};
});
So from this: What would be the easiest way to manipulate the paramFloat argument?