It can only be said that after the xposed, the hook for Java code is very simple
Paste the code directly, for xposed how to get started, please refer to https://github.com/rovo89/XposedBridge/wiki/Development-tutorial
The key is to find the Addjavascriptinterface function and hook it, and then find the name and object to inject.
Public class Tutorial implements ixposedhookloadpackage {
???? Public void handleloadpackage (final loadpackageparam lpparam) throws throwable {
???? //xposedbridge.log ("Loaded app:" + lpparam.packagename);
???????? If (!lpparam.packagename.equals ("Com.ali.tg.testapp"))
???? return;
???? Findandhookmethod ("Android.webkit.WebView", Lpparam. ClassLoader,"addjavascriptinterface", Object. class , String. class,new Xc_methodhook () {
???? @Override
protected void beforehookedmethod (methodhookparam param) throws throwable {
This'll be called before the clock is updated by the original method
???? Xposedbridge. Log ("Before Addjavascriptinterface:"+param. Args[1].tostring ());
???? Xposedbridge. Log ("Methods:");
???? Object Obj=param. args[0];
???? Class<?> cls= Obj.getclass ();
???? Method[] Ms=cls.getdeclaredmethods ();
???? For ( int i=0;i<ms.length; i++)
???? {
???????? Xposedbridge. Log (Ms[i].tostring ());
????}
}
@Override
protected void afterhookedmethod (methodhookparam param) throws throwable {
?
}
});
???? ?
???? ?
???? }
}
Use xposed to solve Ali ctf-2014 third question