I'm using a custom ROM that added some things in a system method (newApplication) and I would like to replace its behaviour depending on the application passed as argument.
Is it possible to use Xposed Framework to hook a system method, particularly my method of interest:
- https://developer.android.com/reference/android/app/Instrumentation#newApplication(java.lang.ClassLoader,%20java.lang.String,%20android.content.Context)
- https://android.googlesource.com/platform/frameworks/base/+/8f6f1f43eeb0d7263b626978ee2c21d4053bf610/core/java/android/app/Instrumentation.java#972
If yes, how can I do that? Because I can't figure out the package name I should be scoping the Xposed module to (using LSposed).
Many thanks.
Even though the method
newApplicationis in the system framework, it is called during runtime of each application.So the Xposed scope I had to specify is actually the package name of the application that's passed as argument.