Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xposed : How to hook a method of a nested class(inner class) in xposed framework.

I am trying to hook a method using:

 findAndHookMethod("com.android.keyguard.KeyguardPatternView.UnlockPatternListener", lpparam.classLoader, "onPatternDetected", new XC_MethodHook()

Where UnlockPatternListener is a nested class(inner class) and it has a method called onPatternDetected. The inner class is private.

I am unable to hook this method. Can you tell me the way to do it?

like image 859
compilerNayan Avatar asked Oct 20 '22 12:10

compilerNayan


1 Answers

Should work this way

 findAndHookMethod("com.android.keyguard.KeyguardPatternView$UnlockPatternListener", lpparam.classLoader, "onPatternDetected", new XC_MethodHook()
                                                            ^
like image 190
defim Avatar answered Oct 23 '22 05:10

defim