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

Hooking 2 methods in Dalvik VM with same name in the same class #50

Closed
hesio opened this issue May 17, 2015 · 2 comments
Closed

Hooking 2 methods in Dalvik VM with same name in the same class #50

hesio opened this issue May 17, 2015 · 2 comments

Comments

@hesio
Copy link

hesio commented May 17, 2015

Concerning hooking methods inside the Dalvik VM (Android),
1 - is it possible to hook two methods with the same name (but differents prototypes) in the same class ?
2 - inside the hook (function) the documentation does not explain how to retreive the function parameters ? Is it just an array of parameters ?
Thanks

@oleavr
Copy link
Member

oleavr commented May 18, 2015

1 - Yes, use method.overload(), e.g.:

var handler = Handler.$new.overload("android.os.Looper").call(Handler, looper);

2 - Correct. They're function arguments, so you just declare your JavaScript function with the arguments it expects.

@hesio
Copy link
Author

hesio commented Jun 4, 2015

Thanks for your explanations, it's perfect.

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

2 participants