0

Is it possible to load an android sdk class dynamically at runtime? Let's say I want to reload the class android.os.Debug dynamically at runtime, is it possible to reload it dynamically.

I tried extending ClassLoader and android provided DexClassLoader but these require full file path of the class to load it into memory, I don't know where does android sdk class files resides in apk/dex.

DexClassLoader classLoader = new DexClassLoader(dexPath, optimizedDirectory,librarySearchPath ,Parent);
  • Why do you want to do this? – Zun Feb 08 '19 at 08:42
  • I am working on a POC project to harden android application security. The project assumes the runtime objects are not reliable (they can be tempered with by frameworks like frida), to solve this problem, I want to load/refresh all the crucial classes (the classes which are used to implement security). – neeraj_nigam Feb 11 '19 at 04:51

0 Answers0