Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

findAndHookMethod help!

OP slvrbllt

26th June 2014, 02:47 PM   |  #1  
slvrbllt's Avatar
OP Senior Member
Flag Rome
Thanks Meter: 46
 
218 posts
Join Date:Joined: Feb 2005
More
Hi all,

I need to set an hook to a method whose signature is

public ArrayList<Object> populateList(Map<String, Object> paramMap, boolean paramBoolean1, boolean paramBoolean2)

I do not seem able to retrieve the class for the first parameter (ie: Map<String, Object>). What sintax am I supposed to use when invoking the hook method?

findAndHookMethod(classString, lpparam.classloader, "populateList", ?????, boolean.class, boolean.class, new XC_MethodHook() {...}

Thanks in advance
Silver.
26th June 2014, 11:33 PM   |  #2  
Tungstwenty's Avatar
Recognized Contributor
Thanks Meter: 4,408
 
1,824 posts
Join Date:Joined: Nov 2011
Donate to Me
More
Quote:
Originally Posted by slvrbllt

Hi all,

I need to set an hook to a method whose signature is

public ArrayList<Object> populateList(Map<String, Object> paramMap, boolean paramBoolean1, boolean paramBoolean2)

I do not seem able to retrieve the class for the first parameter (ie: Map<String, Object>). What sintax am I supposed to use when invoking the hook method?

findAndHookMethod(classString, lpparam.classloader, "populateList", ?????, boolean.class, boolean.class, new XC_MethodHook() {...}

Thanks in advance
Silver.

Try "Map.class".
Off the top of my head, I think generics are not part of the method signatures with regards to uniqueness; they only serve to aid the compiler in checking types during compilation.
27th June 2014, 10:46 AM   |  #3  
slvrbllt's Avatar
OP Senior Member
Flag Rome
Thanks Meter: 46
 
218 posts
Join Date:Joined: Feb 2005
More
Thumbs up
Quote:
Originally Posted by Tungstwenty

Try "Map.class".

Duh!! It worked...
Thanks mate!
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes