I'm using cydia substrate to hook a method in a third party app, which means I have no access to the source code of it. The method I want to hook has a custom type parameter, like this :
methodToHook(com.thirdparty.app.CustomClass param1)
But to hook the method, I need to "tell" cydia the parameters' type of this method, like this:
MS.hookClassLoad("com.thirdparty.app.CustomClass",
new MS.ClassLoadHook() {
@SuppressWarnings("unchecked")
public void classLoaded(Class<?> CustomClass) {
Log.i("misty", "CustomClassclassLoaded");
Constructor constructor1;
try {
constructor1 = CustomClass.getMethod("CustomClass", CustomClass.class);
So how could I give it the real "CustomClass.class" to complete the hook?