Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't hook static call to System.loadLibrary (Android) #255

Open
ErnestoRG95 opened this issue Jan 8, 2018 · 0 comments
Open

I can't hook static call to System.loadLibrary (Android) #255

ErnestoRG95 opened this issue Jan 8, 2018 · 0 comments

Comments

@ErnestoRG95
Copy link

I'm trying to hook an early static call in the main activity:

public class MainActivity extends c {
    private CodeCheck m;

    static {
        System.loadLibrary("foo");
    }

    public MainActivity() {
        super();
    }
. . .

with this hook :

. . .
var rt = Java.use("java.lang.Runtime");
rt.loadLibrary.overload('java.lang.String','java.lang.ClassLoader').implementation = function(arg, arg2){
		send("hooking loadLibrary")
		this.loadLibrary(arg , arg2);
	}
. . .

I know that the call is System and I'm hooking Runtime, but System actually calls Runtime.

In spite of my attempts frida does not make the hook and does not print "hooking loadLibrary".
Someone can help me?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant