5,814,863 Members 47,978 Now Online
XDA Developers Android and Mobile Development Forum

findAndHookMethod help!

Tip us?
 
slvrbllt
Old
#1  
slvrbllt's Avatar
Senior Member - OP
Thanks Meter 46
Posts: 218
Join Date: Feb 2005
Location: Rome
Question findAndHookMethod help!

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.
Silver Bullet
________________________________
Nexus 7 (2013) 32Gb
HTC One (M7) 32Gb
Samsung Galaxy Note 10.1 2014 Edition LTE (SM-P605)
Samsung Galaxy Tab 4 8.0 LTE (SM-T335)
 
Tungstwenty
Old
#2  
Tungstwenty's Avatar
Recognized Contributor
Thanks Meter 4,384
Posts: 1,813
Join Date: Nov 2011

 
DONATE TO ME
Quote:
Originally Posted by slvrbllt View Post
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.

Device: Xperia Z (C6603)
ROM: Stock 4.4.2 10.5.A.0.230
Locked bootloader, rooted, XZDualRecovery
Retired device: Samsung Galaxy S2 (GT-I9100)

My threads that you might find useful:

SUPERCOMPUTER: what it sounded like before you bought it
 
slvrbllt
Old
#3  
slvrbllt's Avatar
Senior Member - OP
Thanks Meter 46
Posts: 218
Join Date: Feb 2005
Location: Rome
Quote:
Originally Posted by Tungstwenty View Post
Try "Map.class".
Duh!! It worked...
Thanks mate!
Silver Bullet
________________________________
Nexus 7 (2013) 32Gb
HTC One (M7) 32Gb
Samsung Galaxy Note 10.1 2014 Edition LTE (SM-P605)
Samsung Galaxy Tab 4 8.0 LTE (SM-T335)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes