private void hookAvatrPathPlay(ClassLoader classLoader) {
try {
XposedHelpers.findAndHookMethod("hook的类名", classLoader, "hook的方法名",String.class,int.class,int.class,
//入参的属性
new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
//返回值
byte[] byte1 = (byte[]) param.getResult(); //固定写法
//第一个参数
String str1 = (String) param.args[0]; //根据他的类的类型生成对应的对象
//第二个参数
int int1= (int) param.args[1];
//第三个参数
int int2= (int) param.args[2];
Log.d(TAG, "arge1==="+ str1); //log.d为输出
Log.d(TAG, "arge2==="+ int1);
Log.d(TAG, "arge3==="+ int2);
Log.d(TAG, "Result==="+ Arrays.toString(byte1));
super.afterHookedMethod(param);
}
});
} catch (Exception e) {
e.printStackTrace();
}
}