I have an application that run a method from a class via DexClassLoader like that :
Class<?> classToLoad = new DexClassLoader(codeFile.getAbsolutePath(), tmpDir.getAbsolutePath(), null,ClassLoader.getSystemClassLoader()).loadClass("com.payload.mypayload.Payload"); classToLoad.getDeclaredMethod("run", new Class).invoke(classToLoad, new Object);
So it run the “run” method from the Payload class and I would like to access the attributes of the class that calls my payload from the code of the “run” method.
I tried a lot of things but I can’t find how to access attributes/methods of the class that calls it..
Do you have an idea of how should I do that ? Thank you